diff --git a/package-lock.json b/package-lock.json index 15f0a3eb..5c8815d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,9 +2,6 @@ "requires": true, "lockfileVersion": 1, "dependencies": { - "Leaflet.Geodesic": { - "version": "git+https://git@github.com/henrythasler/Leaflet.Geodesic.git#c5fe36b0b39fc8e7d0bf295267e1223b56683649" - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -210,7 +207,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" }, "arr-union": { "version": "3.1.0", @@ -369,7 +366,7 @@ "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", "requires": { - "follow-redirects": "1.2.6", + "follow-redirects": "1.4.1", "is-buffer": "1.1.6" } }, @@ -2031,21 +2028,42 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "copy-webpack-plugin": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.2.tgz", - "integrity": "sha512-tf1XKKQ5h+BPvXJ5/zx2xKVdF0/6J8XNvhB6fdmIReMnAfQGMbzph8F7ok2QF9kqWMfIgkCxwzk1zXkYqcLIqg==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.1.tgz", + "integrity": "sha512-OlTo6DYg0XfTKOF8eLf79wcHm4Ut10xU2cRBRPMW/NA5F9VMjZGTfRHWDIYC3s+1kObGYrBLshXWU1K0hILkNQ==", "dev": true, "requires": { - "cacache": "10.0.1", + "cacache": "10.0.4", "find-cache-dir": "1.0.0", "globby": "7.1.1", "is-glob": "4.0.0", - "loader-utils": "0.2.17", + "loader-utils": "1.1.0", "minimatch": "3.0.4", "p-limit": "1.1.0", "serialize-javascript": "1.4.0" }, "dependencies": { + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "dev": true, + "requires": { + "bluebird": "3.5.1", + "chownr": "1.0.1", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "lru-cache": "4.1.1", + "mississippi": "2.0.0", + "mkdirp": "0.5.1", + "move-concurrently": "1.0.1", + "promise-inflight": "1.0.1", + "rimraf": "2.6.2", + "ssri": "5.2.4", + "unique-filename": "1.1.0", + "y18n": "4.0.0" + } + }, "globby": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", @@ -2075,17 +2093,58 @@ "is-extglob": "2.1.1" } }, - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "mississippi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", + "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "dev": true, "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" + "concat-stream": "1.6.0", + "duplexify": "3.5.1", + "end-of-stream": "1.4.0", + "flush-write-stream": "1.0.2", + "from2": "2.3.0", + "parallel-transform": "1.1.0", + "pump": "2.0.1", + "pumpify": "1.3.5", + "stream-each": "1.2.2", + "through2": "2.0.3" } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "1.4.0", + "once": "1.4.0" + } + }, + "ssri": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.2.4.tgz", + "integrity": "sha512-UnEAgMZa15973iH7cUi0AHjJn1ACDIkaMyZILoqwN6yzt+4P81I8tBc5Hl+qwi5auMplZtPQsHrPBR5vJLcQtQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true } } }, @@ -2162,12 +2221,12 @@ } }, "cross-env": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.3.tgz", - "integrity": "sha512-UOokgwvDzCT0mqRSLEkJzUhYXB1vK3E5UgDrD41QiXsm9UetcW2rCGHYz/O3p873lMJ1VZbFCF9Izkwh7nYR5A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.4.tgz", + "integrity": "sha512-Mx8mw6JWhfpYoEk7PGvHxJMLQwQHORAs8+2bX+C1lGQ4h3GkDb1zbzC2Nw85YH9ZQMlO0BHZxMacgrfPmMFxbg==", "requires": { "cross-spawn": "5.1.0", - "is-windows": "1.0.1" + "is-windows": "1.0.2" } }, "cross-spawn": { @@ -3044,7 +3103,7 @@ "requires": { "bootstrap": "3.3.7", "jquery": "3.3.1", - "moment": "2.20.1", + "moment": "2.21.0", "moment-timezone": "0.4.1" } }, @@ -3578,9 +3637,9 @@ } }, "follow-redirects": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.2.6.tgz", - "integrity": "sha512-FrMqZ/FONtHnbqO651UPpfRUVukIEwJhXMfdr/JWAmrDbeYBu773b1J6gdWDyRIj4hvvzQEHoEOTrdR8o6KLYA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", + "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", "requires": { "debug": "3.1.0" } @@ -5113,7 +5172,7 @@ "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=" }, "hpack.js": { "version": "2.1.6", @@ -5905,7 +5964,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "requires": { "isobject": "3.0.1" }, @@ -6009,9 +6068,9 @@ "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=" }, "is-windows": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.1.tgz", - "integrity": "sha1-MQ23D3QtJZoWo2kgK1GvhCMzENk=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "is-wsl": { "version": "1.1.0", @@ -6944,16 +7003,16 @@ } }, "moment": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", - "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==" + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", + "integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ==" }, "moment-timezone": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.4.1.tgz", "integrity": "sha1-gfWYw61eIs2teWtn7NjYjQ9bqgY=", "requires": { - "moment": "2.20.1" + "moment": "2.21.0" } }, "move-concurrently": { @@ -7274,7 +7333,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "requires": { "hosted-git-info": "2.5.0", "is-builtin-module": "1.0.0", @@ -7327,7 +7386,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -7835,9 +7894,9 @@ } }, "popper.js": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.13.0.tgz", - "integrity": "sha1-4ef/ZcxD98+c8W8VEKdegfhPRWU=" + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.0.tgz", + "integrity": "sha1-PXMTIQDIO/3F+rtHab6SX1flncI=" }, "portfinder": { "version": "1.0.13", @@ -9751,7 +9810,7 @@ "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", "requires": { "is-number": "3.0.0", "kind-of": "4.0.0" @@ -12938,7 +12997,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "requires": { "string-width": "1.0.2" } diff --git a/package.json b/package.json index 83118bac..8730a70b 100755 --- a/package.json +++ b/package.json @@ -11,10 +11,10 @@ }, "dependencies": { "Leaflet.Geodesic": "git+https://git@github.com/henrythasler/Leaflet.Geodesic.git", - "axios": "^0.17", + "axios": "^0.17.1", "bootstrap-sass": "^3.3.7", "bootstrap3": "^3.3.5", - "cross-env": "^5.1.3", + "cross-env": "^5.1.4", "eonasdan-bootstrap-datetimepicker": "^4.17.47", "flag-icon-css": "^2.9.0", "icheck": "^1.0.2", @@ -26,15 +26,15 @@ "leaflet-rotatedmarker": "^0.2.0", "lodash": "4.17.4", "marked": "0.3.9", - "moment": "^2.20.1", + "moment": "^2.21.0", "pjax": "^0.2.5", - "popper.js": "^1.13.0", + "popper.js": "^1.14.0", "rivets": "0.9.6", "select2": "^4.0.5", - "x-editable": "1.5.1", - "webpack": "^3.0" + "webpack": "^3.0", + "x-editable": "1.5.1" }, "devDependencies": { - "copy-webpack-plugin": "^4.4.2" + "copy-webpack-plugin": "^4.5.1" } } diff --git a/public/assets/admin/js/vendor.js b/public/assets/admin/js/vendor.js index b507b0ad..e093612b 100644 --- a/public/assets/admin/js/vendor.js +++ b/public/assets/admin/js/vendor.js @@ -17084,10 +17084,6 @@ }.call(this)); //! moment.js -//! version : 2.20.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : @@ -17746,7 +17742,6 @@ var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; - var regexes = {}; function addRegexToken (token, regex, strictRegex) { @@ -18859,10 +18854,6 @@ function localeMeridiem (hours, minutes, isLower) { // this rule. var getSetHour = makeGetSet('Hours', true); -// months -// week -// weekdays -// meridiem var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, @@ -18916,7 +18907,7 @@ function chooseLocale(names) { } i++; } - return null; + return globalLocale; } function loadLocale(name) { @@ -18951,6 +18942,12 @@ function getSetGlobalLocale (key, values) { // moment.duration._locale = moment._locale = data; globalLocale = data; } + else { + if ((typeof console !== 'undefined') && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn('Locale ' + key + ' not found. Did you forget to load it?'); + } + } } return globalLocale._abbr; @@ -18958,7 +18955,7 @@ function getSetGlobalLocale (key, values) { function defineLocale (name, config) { if (config !== null) { - var parentConfig = baseConfig; + var locale, parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', @@ -18971,14 +18968,19 @@ function defineLocale (name, config) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { - if (!localeFamilies[config.parentLocale]) { - localeFamilies[config.parentLocale] = []; + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config + }); + return null; } - localeFamilies[config.parentLocale].push({ - name: name, - config: config - }); - return null; } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); @@ -20326,7 +20328,7 @@ function isSameOrBefore (input, units) { function diff (input, units, asFloat) { var that, zoneDelta, - delta, output; + output; if (!this.isValid()) { return NaN; @@ -20399,7 +20401,7 @@ function toISOString(keepOffset) { if (utc) { return this.toDate().toISOString(); } else { - return new Date(this._d.valueOf()).toISOString().replace('Z', formatMoment(m, 'Z')); + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); } } return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); @@ -20953,48 +20955,26 @@ proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; - -// Year proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; - -// Week Year proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; - -// Quarter proto.quarter = proto.quarters = getSetQuarter; - -// Month proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; - -// Week proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.isoWeeksInYear = getISOWeeksInYear; - -// Day proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; - -// Hour proto.hour = proto.hours = getSetHour; - -// Minute proto.minute = proto.minutes = getSetMinute; - -// Second proto.second = proto.seconds = getSetSecond; - -// Millisecond proto.millisecond = proto.milliseconds = getSetMillisecond; - -// Offset proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; @@ -21005,12 +20985,8 @@ proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; - -// Timezone proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; - -// Deprecations proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); @@ -21041,19 +21017,15 @@ proto$1.relativeTime = relativeTime; proto$1.pastFuture = pastFuture; proto$1.set = set; -// Month proto$1.months = localeMonths; proto$1.monthsShort = localeMonthsShort; proto$1.monthsParse = localeMonthsParse; proto$1.monthsRegex = monthsRegex; proto$1.monthsShortRegex = monthsShortRegex; - -// Week proto$1.week = localeWeek; proto$1.firstDayOfYear = localeFirstDayOfYear; proto$1.firstDayOfWeek = localeFirstDayOfWeek; -// Day of Week proto$1.weekdays = localeWeekdays; proto$1.weekdaysMin = localeWeekdaysMin; proto$1.weekdaysShort = localeWeekdaysShort; @@ -21063,7 +21035,6 @@ proto$1.weekdaysRegex = weekdaysRegex; proto$1.weekdaysShortRegex = weekdaysShortRegex; proto$1.weekdaysMinRegex = weekdaysMinRegex; -// Hours proto$1.isPM = localeIsPM; proto$1.meridiem = localeMeridiem; @@ -21170,6 +21141,7 @@ getSetGlobalLocale('en', { }); // Side effect imports + hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); @@ -21545,7 +21517,6 @@ proto$2.toJSON = toISOString$1; proto$2.locale = locale; proto$2.localeData = localeData; -// Deprecations proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); proto$2.lang = lang; @@ -21570,7 +21541,7 @@ addParseToken('x', function (input, array, config) { // Side effect imports -hooks.version = '2.20.1'; +hooks.version = '2.21.0'; setHookCallback(createLocal); @@ -24257,7 +24228,7 @@ if (typeof jQuery === 'undefined') { /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.13.0 + * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -24405,13 +24376,48 @@ function getScrollParent(element) { overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; - if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) { + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } +/** + * Tells if you are running Internet Explorer + * @method + * @memberof Popper.Utils + * @argument {number} version to check + * @returns {Boolean} isIE + */ +var cache = {}; + +var isIE = function () { + var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; + + version = version.toString(); + if (cache.hasOwnProperty(version)) { + return cache[version]; + } + switch (version) { + case '11': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1; + break; + case '10': + cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; + break; + case 'all': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; + break; + } + + //Set IE + cache.all = cache.all || Object.keys(cache).some(function (key) { + return cache[key]; + }); + return cache[version]; +}; + /** * Returns the offset parent of the given element * @method @@ -24420,16 +24426,23 @@ function getScrollParent(element) { * @returns {Element} offset parent */ function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + // NOTE: 1 DOM access here - var offsetParent = element && element.offsetParent; + var offsetParent = element.offsetParent; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - if (element) { - return element.ownerDocument.documentElement; - } - - return document.documentElement; + return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TD or TABLE in case @@ -24571,29 +24584,14 @@ function getBordersSize(styles, axis) { return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } -/** - * Tells if you are running Internet Explorer 10 - * @method - * @memberof Popper.Utils - * @returns {Boolean} isIE10 - */ -var isIE10 = undefined; - -var isIE10$1 = function () { - if (isIE10 === undefined) { - isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1; - } - return isIE10; -}; - function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); } function getWindowSizes() { var body = document.body; var html = document.documentElement; - var computedStyle = isIE10$1() && getComputedStyle(html); + var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), @@ -24685,8 +24683,8 @@ function getBoundingClientRect(element) { // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 - if (isIE10$1()) { - try { + try { + if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); @@ -24694,10 +24692,10 @@ function getBoundingClientRect(element) { rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; - } catch (err) {} - } else { - rect = element.getBoundingClientRect(); - } + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} var result = { left: rect.left, @@ -24729,7 +24727,9 @@ function getBoundingClientRect(element) { } function getOffsetRectRelativeToArbitraryNode(children, parent) { - var isIE10 = isIE10$1(); + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); @@ -24739,6 +24739,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && parent.nodeName === 'HTML') { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, @@ -24766,7 +24771,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { offsets.marginLeft = marginLeft; } - if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } @@ -24774,13 +24779,15 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { } function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); - var scrollTop = getScroll(html); - var scrollLeft = getScroll(html, 'left'); + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, @@ -24811,6 +24818,26 @@ function isFixed(element) { return isFixed(getParentNode(element)); } +/** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + +function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; +} + /** * Computed the boundaries limits and return them * @method @@ -24819,16 +24846,20 @@ function isFixed(element) { * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + // NOTE: 1 DOM access here + var boundaries = { top: 0, left: 0 }; - var offsetParent = findCommonOffsetParent(popper, reference); + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; @@ -24843,7 +24874,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { boundariesNode = boundariesElement; } - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { @@ -24944,11 +24975,14 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { - var commonOffsetParent = findCommonOffsetParent(popper, reference); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** @@ -25121,7 +25155,7 @@ function update() { }; // compute reference element offsets - data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference); + data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed @@ -25131,9 +25165,11 @@ function update() { // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; + data.positionFixed = this.options.positionFixed; + // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); - data.offsets.popper.position = 'absolute'; + data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); @@ -25173,7 +25209,7 @@ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); - for (var i = 0; i < prefixes.length - 1; i++) { + for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { @@ -25194,9 +25230,12 @@ function destroy() { // touch DOM only if `applyStyle` modifier is enabled if (isModifierEnabled(this.modifiers, 'applyStyle')) { this.popper.removeAttribute('x-placement'); - this.popper.style.left = ''; this.popper.style.position = ''; this.popper.style.top = ''; + this.popper.style.left = ''; + this.popper.style.right = ''; + this.popper.style.bottom = ''; + this.popper.style.willChange = ''; this.popper.style[getSupportedPropertyName('transform')] = ''; } @@ -25384,12 +25423,12 @@ function applyStyle(data) { * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as popper. + * @param {HTMLElement} popper - The HTML element used as popper * @param {Object} options - Popper.js options */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets - var referenceOffsets = getReferenceOffsets(state, popper, reference); + var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed @@ -25400,7 +25439,7 @@ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations - setStyles(popper, { position: 'absolute' }); + setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); return options; } @@ -25703,7 +25742,7 @@ function flip(data, options) { return data; } - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); @@ -25995,7 +26034,7 @@ function preventOverflow(data, options) { boundariesElement = getOffsetParent(boundariesElement); } - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); options.boundaries = boundaries; var order = options.priority; @@ -26492,6 +26531,12 @@ var Defaults = { */ placement: 'bottom', + /** + * Set this to true if you want popper to position it self in 'fixed' mode + * @prop {Boolean} positionFixed=false + */ + positionFixed: false, + /** * Whether events (resize, scroll) are initially enabled * @prop {Boolean} eventsEnabled=true @@ -26703,7 +26748,7 @@ return Popper; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.13.0 + * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -26789,13 +26834,48 @@ function getScrollParent(element) { overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; - if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) { + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } +/** + * Tells if you are running Internet Explorer + * @method + * @memberof Popper.Utils + * @argument {number} version to check + * @returns {Boolean} isIE + */ +var cache = {}; + +var isIE = function () { + var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; + + version = version.toString(); + if (cache.hasOwnProperty(version)) { + return cache[version]; + } + switch (version) { + case '11': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1; + break; + case '10': + cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; + break; + case 'all': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; + break; + } + + //Set IE + cache.all = cache.all || Object.keys(cache).some(function (key) { + return cache[key]; + }); + return cache[version]; +}; + /** * Returns the offset parent of the given element * @method @@ -26804,16 +26884,23 @@ function getScrollParent(element) { * @returns {Element} offset parent */ function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + // NOTE: 1 DOM access here - var offsetParent = element && element.offsetParent; + var offsetParent = element.offsetParent; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - if (element) { - return element.ownerDocument.documentElement; - } - - return document.documentElement; + return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TD or TABLE in case @@ -26955,29 +27042,14 @@ function getBordersSize(styles, axis) { return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } -/** - * Tells if you are running Internet Explorer 10 - * @method - * @memberof Popper.Utils - * @returns {Boolean} isIE10 - */ -var isIE10 = undefined; - -var isIE10$1 = function () { - if (isIE10 === undefined) { - isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1; - } - return isIE10; -}; - function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); } function getWindowSizes() { var body = document.body; var html = document.documentElement; - var computedStyle = isIE10$1() && getComputedStyle(html); + var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), @@ -27026,8 +27098,8 @@ function getBoundingClientRect(element) { // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 - if (isIE10$1()) { - try { + try { + if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); @@ -27035,10 +27107,10 @@ function getBoundingClientRect(element) { rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; - } catch (err) {} - } else { - rect = element.getBoundingClientRect(); - } + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} var result = { left: rect.left, @@ -27070,7 +27142,9 @@ function getBoundingClientRect(element) { } function getOffsetRectRelativeToArbitraryNode(children, parent) { - var isIE10 = isIE10$1(); + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); @@ -27080,6 +27154,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && parent.nodeName === 'HTML') { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, @@ -27107,7 +27186,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { offsets.marginLeft = marginLeft; } - if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } @@ -27115,13 +27194,15 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { } function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); - var scrollTop = getScroll(html); - var scrollLeft = getScroll(html, 'left'); + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, @@ -27152,6 +27233,26 @@ function isFixed(element) { return isFixed(getParentNode(element)); } +/** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + +function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; +} + /** * Computed the boundaries limits and return them * @method @@ -27160,16 +27261,20 @@ function isFixed(element) { * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + // NOTE: 1 DOM access here + var boundaries = { top: 0, left: 0 }; - var offsetParent = findCommonOffsetParent(popper, reference); + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; @@ -27184,7 +27289,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { boundariesNode = boundariesElement; } - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { @@ -27482,11 +27587,14 @@ function getPopperOffsets(popper, referenceOffsets, placement) { * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { - var commonOffsetParent = findCommonOffsetParent(popper, reference); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** @@ -27500,7 +27608,7 @@ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); - for (var i = 0; i < prefixes.length - 1; i++) { + for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { diff --git a/public/assets/system/js/vendor.js b/public/assets/system/js/vendor.js index b8b3f7f2..90aa9aef 100644 --- a/public/assets/system/js/vendor.js +++ b/public/assets/system/js/vendor.js @@ -17083,6 +17083,1607 @@ } }.call(this)); +/* axios v0.17.1 | (c) 2017 by Matt Zabriskie */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["axios"] = factory(); + else + root["axios"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(1); + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + var bind = __webpack_require__(3); + var Axios = __webpack_require__(5); + var defaults = __webpack_require__(6); + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + return instance; + } + + // Create the default instance to be exported + var axios = createInstance(defaults); + + // Expose Axios class to allow class inheritance + axios.Axios = Axios; + + // Factory for creating new instances + axios.create = function create(instanceConfig) { + return createInstance(utils.merge(defaults, instanceConfig)); + }; + + // Expose Cancel & CancelToken + axios.Cancel = __webpack_require__(23); + axios.CancelToken = __webpack_require__(24); + axios.isCancel = __webpack_require__(20); + + // Expose all/spread + axios.all = function all(promises) { + return Promise.all(promises); + }; + axios.spread = __webpack_require__(25); + + module.exports = axios; + + // Allow use of default import syntax in TypeScript + module.exports.default = axios; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var bind = __webpack_require__(3); + var isBuffer = __webpack_require__(4); + + /*global toString:true*/ + + // utils is a library of generic helper functions non-specific to axios + + var toString = Object.prototype.toString; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Array, otherwise false + */ + function isArray(val) { + return toString.call(val) === '[object Array]'; + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + function isArrayBuffer(val) { + return toString.call(val) === '[object ArrayBuffer]'; + } + + /** + * Determine if a value is a FormData + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an FormData, otherwise false + */ + function isFormData(val) { + return (typeof FormData !== 'undefined') && (val instanceof FormData); + } + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a String, otherwise false + */ + function isString(val) { + return typeof val === 'string'; + } + + /** + * Determine if a value is a Number + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Number, otherwise false + */ + function isNumber(val) { + return typeof val === 'number'; + } + + /** + * Determine if a value is undefined + * + * @param {Object} val The value to test + * @returns {boolean} True if the value is undefined, otherwise false + */ + function isUndefined(val) { + return typeof val === 'undefined'; + } + + /** + * Determine if a value is an Object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is an Object, otherwise false + */ + function isObject(val) { + return val !== null && typeof val === 'object'; + } + + /** + * Determine if a value is a Date + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Date, otherwise false + */ + function isDate(val) { + return toString.call(val) === '[object Date]'; + } + + /** + * Determine if a value is a File + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a File, otherwise false + */ + function isFile(val) { + return toString.call(val) === '[object File]'; + } + + /** + * Determine if a value is a Blob + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Blob, otherwise false + */ + function isBlob(val) { + return toString.call(val) === '[object Blob]'; + } + + /** + * Determine if a value is a Function + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + function isFunction(val) { + return toString.call(val) === '[object Function]'; + } + + /** + * Determine if a value is a Stream + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a Stream, otherwise false + */ + function isStream(val) { + return isObject(val) && isFunction(val.pipe); + } + + /** + * Determine if a value is a URLSearchParams object + * + * @param {Object} val The value to test + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + function isURLSearchParams(val) { + return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; + } + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * @returns {String} The String freed of excess whitespace + */ + function trim(str) { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + */ + function isStandardBrowserEnv() { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + return false; + } + return ( + typeof window !== 'undefined' && + typeof document !== 'undefined' + ); + } + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + */ + function forEach(obj, fn) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (var i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + fn.call(null, obj[key], key, obj); + } + } + } + } + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ + function merge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = merge(result[key], val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * @return {Object} The resulting value of object a + */ + function extend(a, b, thisArg) { + forEach(b, function assignValue(val, key) { + if (thisArg && typeof val === 'function') { + a[key] = bind(val, thisArg); + } else { + a[key] = val; + } + }); + return a; + } + + module.exports = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isObject: isObject, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isBlob: isBlob, + isFunction: isFunction, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isStandardBrowserEnv: isStandardBrowserEnv, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + 'use strict'; + + module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + + // The _isBuffer check is for Safari 5-7 support, because it's missing + // Object.prototype.constructor. Remove this eventually + module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) + } + + function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) + } + + // For Node v0.10 support. Remove this eventually. + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) + } + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var defaults = __webpack_require__(6); + var utils = __webpack_require__(2); + var InterceptorManager = __webpack_require__(17); + var dispatchRequest = __webpack_require__(18); + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + */ + function Axios(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; + } + + /** + * Dispatch a request + * + * @param {Object} config The config specific for this request (merged with this.defaults) + */ + Axios.prototype.request = function request(config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof config === 'string') { + config = utils.merge({ + url: arguments[0] + }, arguments[1]); + } + + config = utils.merge(defaults, this.defaults, { method: 'get' }, config); + config.method = config.method.toLowerCase(); + + // Hook up interceptors middleware + var chain = [dispatchRequest, undefined]; + var promise = Promise.resolve(config); + + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + chain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + chain.push(interceptor.fulfilled, interceptor.rejected); + }); + + while (chain.length) { + promise = promise.then(chain.shift(), chain.shift()); + } + + return promise; + }; + + // Provide aliases for supported request methods + utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url + })); + }; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, data, config) { + return this.request(utils.merge(config || {}, { + method: method, + url: url, + data: data + })); + }; + }); + + module.exports = Axios; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + var normalizeHeaderName = __webpack_require__(7); + + var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' + }; + + function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } + } + + function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(8); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(8); + } + return adapter; + } + + var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { /* Ignore */ } + } + return data; + }], + + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } + }; + + defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } + }; + + utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; + }); + + utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); + }); + + module.exports = defaults; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + module.exports = function normalizeHeaderName(headers, normalizedName) { + utils.forEach(headers, function processHeader(value, name) { + if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { + headers[normalizedName] = value; + delete headers[name]; + } + }); + }; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + var settle = __webpack_require__(9); + var buildURL = __webpack_require__(12); + var parseHeaders = __webpack_require__(13); + var isURLSameOrigin = __webpack_require__(14); + var createError = __webpack_require__(10); + var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(15); + + module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + var loadEvent = 'onreadystatechange'; + var xDomain = false; + + // For IE 8/9 CORS support + // Only supports POST and GET calls and doesn't returns the response headers. + // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. + if (("production") !== 'test' && + typeof window !== 'undefined' && + window.XDomainRequest && !('withCredentials' in request) && + !isURLSameOrigin(config.url)) { + request = new window.XDomainRequest(); + loadEvent = 'onload'; + xDomain = true; + request.onprogress = function handleProgress() {}; + request.ontimeout = function handleTimeout() {}; + } + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request[loadEvent] = function handleLoad() { + if (!request || (request.readyState !== 4 && !xDomain)) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201) + status: request.status === 1223 ? 204 : request.status, + statusText: request.status === 1223 ? 'No Content' : request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(16); + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var createError = __webpack_require__(10); + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ + module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var enhanceError = __webpack_require__(11); + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ + module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); + }; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ + module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + error.request = request; + error.response = response; + return error; + }; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + function encode(val) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ + module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } + + if (!utils.isArray(val)) { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; + }; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + // Headers whose duplicates are ignored by node + // c.f. https://nodejs.org/api/http.html#http_message_headers + var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' + ]; + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ + module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; + }; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() + ); + + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + + 'use strict'; + + // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js + + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function E() { + this.message = 'String contains an invalid character'; + } + E.prototype = new Error; + E.prototype.code = 5; + E.prototype.name = 'InvalidCharacterError'; + + function btoa(input) { + var str = String(input); + var output = ''; + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars; + // if the next str index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + str.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = str.charCodeAt(idx += 3 / 4); + if (charCode > 0xFF) { + throw new E(); + } + block = block << 8 | charCode; + } + return output; + } + + module.exports = btoa; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() + ); + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + function InterceptorManager() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; + }; + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ + InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + }; + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ + InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + }; + + module.exports = InterceptorManager; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + var transformData = __webpack_require__(19); + var isCancel = __webpack_require__(20); + var defaults = __webpack_require__(6); + var isAbsoluteURL = __webpack_require__(21); + var combineURLs = __webpack_require__(22); + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ + module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData( + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers || {} + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData( + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData( + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); + }; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var utils = __webpack_require__(2); + + /** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ + module.exports = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; + }; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + + 'use strict'; + + module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); + }; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + module.exports = function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); + }; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ + module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; + }; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ + function Cancel(message) { + this.message = message; + } + + Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); + }; + + Cancel.prototype.__CANCEL__ = true; + + module.exports = Cancel; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var Cancel = __webpack_require__(23); + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @class + * @param {Function} executor The executor function. + */ + function CancelToken(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + var token = this; + executor(function cancel(message) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new Cancel(message); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `Cancel` if cancellation has been requested. + */ + CancelToken.prototype.throwIfRequested = function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + }; + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + CancelToken.source = function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; + }; + + module.exports = CancelToken; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + + 'use strict'; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} + */ + module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + }; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=axios.map /*! * jQuery JavaScript Library v3.3.1 * https://jquery.com/ @@ -29814,7 +31415,7 @@ if (typeof jQuery === 'undefined') { /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.13.0 + * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -29962,13 +31563,48 @@ function getScrollParent(element) { overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; - if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) { + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } +/** + * Tells if you are running Internet Explorer + * @method + * @memberof Popper.Utils + * @argument {number} version to check + * @returns {Boolean} isIE + */ +var cache = {}; + +var isIE = function () { + var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; + + version = version.toString(); + if (cache.hasOwnProperty(version)) { + return cache[version]; + } + switch (version) { + case '11': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1; + break; + case '10': + cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; + break; + case 'all': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; + break; + } + + //Set IE + cache.all = cache.all || Object.keys(cache).some(function (key) { + return cache[key]; + }); + return cache[version]; +}; + /** * Returns the offset parent of the given element * @method @@ -29977,16 +31613,23 @@ function getScrollParent(element) { * @returns {Element} offset parent */ function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + // NOTE: 1 DOM access here - var offsetParent = element && element.offsetParent; + var offsetParent = element.offsetParent; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - if (element) { - return element.ownerDocument.documentElement; - } - - return document.documentElement; + return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TD or TABLE in case @@ -30128,29 +31771,14 @@ function getBordersSize(styles, axis) { return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } -/** - * Tells if you are running Internet Explorer 10 - * @method - * @memberof Popper.Utils - * @returns {Boolean} isIE10 - */ -var isIE10 = undefined; - -var isIE10$1 = function () { - if (isIE10 === undefined) { - isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1; - } - return isIE10; -}; - function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); } function getWindowSizes() { var body = document.body; var html = document.documentElement; - var computedStyle = isIE10$1() && getComputedStyle(html); + var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), @@ -30242,8 +31870,8 @@ function getBoundingClientRect(element) { // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 - if (isIE10$1()) { - try { + try { + if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); @@ -30251,10 +31879,10 @@ function getBoundingClientRect(element) { rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; - } catch (err) {} - } else { - rect = element.getBoundingClientRect(); - } + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} var result = { left: rect.left, @@ -30286,7 +31914,9 @@ function getBoundingClientRect(element) { } function getOffsetRectRelativeToArbitraryNode(children, parent) { - var isIE10 = isIE10$1(); + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); @@ -30296,6 +31926,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && parent.nodeName === 'HTML') { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, @@ -30323,7 +31958,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { offsets.marginLeft = marginLeft; } - if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } @@ -30331,13 +31966,15 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { } function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); - var scrollTop = getScroll(html); - var scrollLeft = getScroll(html, 'left'); + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, @@ -30368,6 +32005,26 @@ function isFixed(element) { return isFixed(getParentNode(element)); } +/** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + +function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; +} + /** * Computed the boundaries limits and return them * @method @@ -30376,16 +32033,20 @@ function isFixed(element) { * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + // NOTE: 1 DOM access here + var boundaries = { top: 0, left: 0 }; - var offsetParent = findCommonOffsetParent(popper, reference); + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; @@ -30400,7 +32061,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { boundariesNode = boundariesElement; } - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { @@ -30501,11 +32162,14 @@ function computeAutoPlacement(placement, refRect, popper, reference, boundariesE * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { - var commonOffsetParent = findCommonOffsetParent(popper, reference); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** @@ -30678,7 +32342,7 @@ function update() { }; // compute reference element offsets - data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference); + data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed @@ -30688,9 +32352,11 @@ function update() { // store the computed placement inside `originalPlacement` data.originalPlacement = data.placement; + data.positionFixed = this.options.positionFixed; + // compute the popper offsets data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); - data.offsets.popper.position = 'absolute'; + data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; // run the modifiers data = runModifiers(this.modifiers, data); @@ -30730,7 +32396,7 @@ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); - for (var i = 0; i < prefixes.length - 1; i++) { + for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { @@ -30751,9 +32417,12 @@ function destroy() { // touch DOM only if `applyStyle` modifier is enabled if (isModifierEnabled(this.modifiers, 'applyStyle')) { this.popper.removeAttribute('x-placement'); - this.popper.style.left = ''; this.popper.style.position = ''; this.popper.style.top = ''; + this.popper.style.left = ''; + this.popper.style.right = ''; + this.popper.style.bottom = ''; + this.popper.style.willChange = ''; this.popper.style[getSupportedPropertyName('transform')] = ''; } @@ -30941,12 +32610,12 @@ function applyStyle(data) { * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper - * @param {HTMLElement} popper - The HTML element used as popper. + * @param {HTMLElement} popper - The HTML element used as popper * @param {Object} options - Popper.js options */ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // compute reference element offsets - var referenceOffsets = getReferenceOffsets(state, popper, reference); + var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed @@ -30957,7 +32626,7 @@ function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations - setStyles(popper, { position: 'absolute' }); + setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); return options; } @@ -31260,7 +32929,7 @@ function flip(data, options) { return data; } - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); var placement = data.placement.split('-')[0]; var placementOpposite = getOppositePlacement(placement); @@ -31552,7 +33221,7 @@ function preventOverflow(data, options) { boundariesElement = getOffsetParent(boundariesElement); } - var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement); + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); options.boundaries = boundaries; var order = options.priority; @@ -32049,6 +33718,12 @@ var Defaults = { */ placement: 'bottom', + /** + * Set this to true if you want popper to position it self in 'fixed' mode + * @prop {Boolean} positionFixed=false + */ + positionFixed: false, + /** * Whether events (resize, scroll) are initially enabled * @prop {Boolean} eventsEnabled=true @@ -32260,7 +33935,7 @@ return Popper; /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.13.0 + * @version 1.14.0 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -32346,13 +34021,48 @@ function getScrollParent(element) { overflowX = _getStyleComputedProp.overflowX, overflowY = _getStyleComputedProp.overflowY; - if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) { + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return element; } return getScrollParent(getParentNode(element)); } +/** + * Tells if you are running Internet Explorer + * @method + * @memberof Popper.Utils + * @argument {number} version to check + * @returns {Boolean} isIE + */ +var cache = {}; + +var isIE = function () { + var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; + + version = version.toString(); + if (cache.hasOwnProperty(version)) { + return cache[version]; + } + switch (version) { + case '11': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1; + break; + case '10': + cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; + break; + case 'all': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; + break; + } + + //Set IE + cache.all = cache.all || Object.keys(cache).some(function (key) { + return cache[key]; + }); + return cache[version]; +}; + /** * Returns the offset parent of the given element * @method @@ -32361,16 +34071,23 @@ function getScrollParent(element) { * @returns {Element} offset parent */ function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + // NOTE: 1 DOM access here - var offsetParent = element && element.offsetParent; + var offsetParent = element.offsetParent; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + var nodeName = offsetParent && offsetParent.nodeName; if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { - if (element) { - return element.ownerDocument.documentElement; - } - - return document.documentElement; + return element ? element.ownerDocument.documentElement : document.documentElement; } // .offsetParent will return the closest TD or TABLE in case @@ -32512,29 +34229,14 @@ function getBordersSize(styles, axis) { return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } -/** - * Tells if you are running Internet Explorer 10 - * @method - * @memberof Popper.Utils - * @returns {Boolean} isIE10 - */ -var isIE10 = undefined; - -var isIE10$1 = function () { - if (isIE10 === undefined) { - isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1; - } - return isIE10; -}; - function getSize(axis, body, html, computedStyle) { - return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); } function getWindowSizes() { var body = document.body; var html = document.documentElement; - var computedStyle = isIE10$1() && getComputedStyle(html); + var computedStyle = isIE(10) && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), @@ -32583,8 +34285,8 @@ function getBoundingClientRect(element) { // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 - if (isIE10$1()) { - try { + try { + if (isIE(10)) { rect = element.getBoundingClientRect(); var scrollTop = getScroll(element, 'top'); var scrollLeft = getScroll(element, 'left'); @@ -32592,10 +34294,10 @@ function getBoundingClientRect(element) { rect.left += scrollLeft; rect.bottom += scrollTop; rect.right += scrollLeft; - } catch (err) {} - } else { - rect = element.getBoundingClientRect(); - } + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} var result = { left: rect.left, @@ -32627,7 +34329,9 @@ function getBoundingClientRect(element) { } function getOffsetRectRelativeToArbitraryNode(children, parent) { - var isIE10 = isIE10$1(); + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); var isHTML = parent.nodeName === 'HTML'; var childrenRect = getBoundingClientRect(children); var parentRect = getBoundingClientRect(parent); @@ -32637,6 +34341,11 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var borderTopWidth = parseFloat(styles.borderTopWidth, 10); var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && parent.nodeName === 'HTML') { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, left: childrenRect.left - parentRect.left - borderLeftWidth, @@ -32664,7 +34373,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { offsets.marginLeft = marginLeft; } - if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { offsets = includeScroll(offsets, parent); } @@ -32672,13 +34381,15 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { } function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var html = element.ownerDocument.documentElement; var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); var width = Math.max(html.clientWidth, window.innerWidth || 0); var height = Math.max(html.clientHeight, window.innerHeight || 0); - var scrollTop = getScroll(html); - var scrollLeft = getScroll(html, 'left'); + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; var offset = { top: scrollTop - relativeOffset.top + relativeOffset.marginTop, @@ -32709,6 +34420,26 @@ function isFixed(element) { return isFixed(getParentNode(element)); } +/** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + +function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; +} + /** * Computed the boundaries limits and return them * @method @@ -32717,16 +34448,20 @@ function isFixed(element) { * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */ function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + // NOTE: 1 DOM access here + var boundaries = { top: 0, left: 0 }; - var offsetParent = findCommonOffsetParent(popper, reference); + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); // Handle viewport case if (boundariesElement === 'viewport') { - boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent); + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); } else { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; @@ -32741,7 +34476,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { boundariesNode = boundariesElement; } - var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent); + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); // In case of HTML, we need a different computation if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { @@ -33039,11 +34774,14 @@ function getPopperOffsets(popper, referenceOffsets, placement) { * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */ function getReferenceOffsets(state, popper, reference) { - var commonOffsetParent = findCommonOffsetParent(popper, reference); - return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent); + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); } /** @@ -33057,7 +34795,7 @@ function getSupportedPropertyName(property) { var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; var upperProp = property.charAt(0).toUpperCase() + property.slice(1); - for (var i = 0; i < prefixes.length - 1; i++) { + for (var i = 0; i < prefixes.length; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; if (typeof document.body.style[toCheck] !== 'undefined') { @@ -40145,499 +41883,3 @@ module.exports = function() {} } }); })(); - -"use strict"; - -// This file is part of Leaflet.Geodesic. -// Copyright (C) 2017 Henry Thasler -// based on code by Chris Veness Copyright (C) 2014 https://github.com/chrisveness/geodesy -// -// Leaflet.Geodesic is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Leaflet.Geodesic is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Leaflet.Geodesic. If not, see . - - -/** Extend Number object with method to convert numeric degrees to radians */ -if (typeof Number.prototype.toRadians === "undefined") { - Number.prototype.toRadians = function() { - return this * Math.PI / 180; - }; -} - -/** Extend Number object with method to convert radians to numeric (signed) degrees */ -if (typeof Number.prototype.toDegrees === "undefined") { - Number.prototype.toDegrees = function() { - return this * 180 / Math.PI; - }; -} - -var INTERSECT_LNG = 179.999; // Lng used for intersection and wrap around on map edges - -L.Geodesic = L.Polyline.extend({ - options: { - color: "blue", - steps: 10, - dash: 1, - wrap: true - }, - - initialize: function(latlngs, options) { - this.options = this._merge_options(this.options, options); - this.options.dash = Math.max(1e-3, Math.min(1, parseFloat(this.options.dash) || 1)); - this.datum = {}; - this.datum.ellipsoid = { - a: 6378137, - b: 6356752.3142, - f: 1 / 298.257223563 - }; // WGS-84 - this._latlngs = this._generate_Geodesic(latlngs); - L.Polyline.prototype.initialize.call(this, this._latlngs, this.options); - }, - - setLatLngs: function(latlngs) { - this._latlngs = this._generate_Geodesic(latlngs); - L.Polyline.prototype.setLatLngs.call(this, this._latlngs); - }, - - /** - * Calculates some statistic values of current geodesic multipolyline - * @returns (Object} Object with several properties (e.g. overall distance) - */ - getStats: function() { - let obj = { - distance: 0, - points: 0, - polygons: this._latlngs.length - }, poly, points; - - for (poly = 0; poly < this._latlngs.length; poly++) { - obj.points += this._latlngs[poly].length; - for (points = 0; points < (this._latlngs[poly].length - 1); points++) { - obj.distance += this._vincenty_inverse(this._latlngs[poly][points], - this._latlngs[poly][points + 1]).distance; - } - } - return obj; - }, - - - /** - * Creates geodesic lines from geoJson. Replaces all current features of this instance. - * Supports LineString, MultiLineString and Polygon - * @param {Object} geojson - geosjon as object. - */ - geoJson: function(geojson) { - - let normalized = L.GeoJSON.asFeature(geojson); - let features = normalized.type === "FeatureCollection" ? normalized.features : [ - normalized - ]; - this._latlngs = []; - for (let feature of features) { - let geometry = feature.type === "Feature" ? feature.geometry : - feature, - coords = geometry.coordinates; - - switch (geometry.type) { - case "LineString": - this._latlngs.push(this._generate_Geodesic([L.GeoJSON.coordsToLatLngs( - coords, 0)])); - break; - case "MultiLineString": - case "Polygon": - this._latlngs.push(this._generate_Geodesic(L.GeoJSON.coordsToLatLngs( - coords, 1))); - break; - case "Point": - case "MultiPoint": - console.log("Dude, points can't be drawn as geodesic lines..."); - break; - default: - console.log("Drawing " + geometry.type + - " as a geodesic is not supported. Skipping..."); - } - } - L.Polyline.prototype.setLatLngs.call(this, this._latlngs); - }, - - /** - * Creates a great circle. Replaces all current lines. - * @param {Object} center - geographic position - * @param {number} radius - radius of the circle in metres - */ - createCircle: function(center, radius) { - let polylineIndex = 0; - let prev = { - lat: 0, - lng: 0, - brg: 0 - }; - let step; - - this._latlngs = []; - this._latlngs[polylineIndex] = []; - - let direct = this._vincenty_direct(L.latLng(center), 0, radius, this.options - .wrap); - prev = L.latLng(direct.lat, direct.lng); - this._latlngs[polylineIndex].push(prev); - for (step = 1; step <= this.options.steps;) { - direct = this._vincenty_direct(L.latLng(center), 360 / this.options - .steps * step, radius, this.options.wrap); - let gp = L.latLng(direct.lat, direct.lng); - if (Math.abs(gp.lng - prev.lng) > 180) { - let inverse = this._vincenty_inverse(prev, gp); - let sec = this._intersection(prev, inverse.initialBearing, { - lat: -89, - lng: ((gp.lng - prev.lng) > 0) ? -INTERSECT_LNG : INTERSECT_LNG - }, 0); - if (sec) { - this._latlngs[polylineIndex].push(L.latLng(sec.lat, sec.lng)); - polylineIndex++; - this._latlngs[polylineIndex] = []; - prev = L.latLng(sec.lat, -sec.lng); - this._latlngs[polylineIndex].push(prev); - } else { - polylineIndex++; - this._latlngs[polylineIndex] = []; - this._latlngs[polylineIndex].push(gp); - prev = gp; - step++; - } - } else { - this._latlngs[polylineIndex].push(gp); - prev = gp; - step++; - } - } - - L.Polyline.prototype.setLatLngs.call(this, this._latlngs); - }, - - /** - * Creates a geodesic Polyline from given coordinates - * Note: dashed lines are under work - * @param {Object} latlngs - One or more polylines as an array. See Leaflet doc about Polyline - * @returns (Object} An array of arrays of geographical points. - */ - _generate_Geodesic: function(latlngs) { - let _geo = [], _geocnt = 0; - - for (let poly = 0; poly < latlngs.length; poly++) { - _geo[_geocnt] = []; - let prev = L.latLng(latlngs[poly][0]); - for (let points = 0; points < (latlngs[poly].length - 1); points++) { - // use prev, so that wrapping behaves correctly - let pointA = prev; - let pointB = L.latLng(latlngs[poly][points + 1]); - if (pointA.equals(pointB)) { - continue; - } - let inverse = this._vincenty_inverse(pointA, pointB); - _geo[_geocnt].push(prev); - for (let s = 1; s <= this.options.steps;) { - let distance = inverse.distance / this.options.steps; - // dashed lines don't go the full distance between the points - let dist_mult = s - 1 + this.options.dash; - let direct = this._vincenty_direct(pointA, inverse.initialBearing, distance*dist_mult, this.options.wrap); - let gp = L.latLng(direct.lat, direct.lng); - if (Math.abs(gp.lng - prev.lng) > 180) { - let sec = this._intersection(pointA, inverse.initialBearing, { - lat: -89, - lng: ((gp.lng - prev.lng) > 0) ? -INTERSECT_LNG : INTERSECT_LNG - }, 0); - if (sec) { - _geo[_geocnt].push(L.latLng(sec.lat, sec.lng)); - _geocnt++; - _geo[_geocnt] = []; - prev = L.latLng(sec.lat, -sec.lng); - _geo[_geocnt].push(prev); - } else { - _geocnt++; - _geo[_geocnt] = []; - _geo[_geocnt].push(gp); - prev = gp; - s++; - } - } else { - _geo[_geocnt].push(gp); - // Dashed lines start a new line - if (this.options.dash < 1){ - _geocnt++; - // go full distance this time, to get starting point for next line - let direct_full = this._vincenty_direct(pointA, inverse.initialBearing, distance*s, this.options.wrap); - _geo[_geocnt] = []; - prev = L.latLng(direct_full.lat, direct_full.lng); - _geo[_geocnt].push(prev); - } - else prev = gp; - s++; - } - } - } - _geocnt++; - } - return _geo; - }, - - /** - * Vincenty direct calculation. - * based on the work of Chris Veness (https://github.com/chrisveness/geodesy) - * - * @private - * @param {number} initialBearing - Initial bearing in degrees from north. - * @param {number} distance - Distance along bearing in metres. - * @returns (Object} Object including point (destination point), finalBearing. - */ - - _vincenty_direct: function(p1, initialBearing, distance, wrap) { - var φ1 = p1.lat.toRadians(), - λ1 = p1.lng.toRadians(); - var α1 = initialBearing.toRadians(); - var s = distance; - - var a = this.datum.ellipsoid.a, - b = this.datum.ellipsoid.b, - f = this.datum.ellipsoid.f; - - var sinα1 = Math.sin(α1); - var cosα1 = Math.cos(α1); - - var tanU1 = (1 - f) * Math.tan(φ1), - cosU1 = 1 / Math.sqrt((1 + tanU1 * tanU1)), - sinU1 = tanU1 * cosU1; - var σ1 = Math.atan2(tanU1, cosα1); - var sinα = cosU1 * sinα1; - var cosSqα = 1 - sinα * sinα; - var uSq = cosSqα * (a * a - b * b) / (b * b); - var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * - uSq))); - var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq))); - - var σ = s / (b * A), - σʹ, iterations = 0; - var sinσ, cosσ; - var cos2σM; - do { - cos2σM = Math.cos(2 * σ1 + σ); - sinσ = Math.sin(σ); - cosσ = Math.cos(σ); - var Δσ = B * sinσ * (cos2σM + B / 4 * (cosσ * (-1 + 2 * cos2σM * - cos2σM) - - B / 6 * cos2σM * (-3 + 4 * sinσ * sinσ) * (-3 + 4 * cos2σM * - cos2σM))); - σʹ = σ; - σ = s / (b * A) + Δσ; - } while (Math.abs(σ - σʹ) > 1e-12 && ++iterations); - - var x = sinU1 * sinσ - cosU1 * cosσ * cosα1; - var φ2 = Math.atan2(sinU1 * cosσ + cosU1 * sinσ * cosα1, (1 - f) * - Math.sqrt(sinα * sinα + x * x)); - var λ = Math.atan2(sinσ * sinα1, cosU1 * cosσ - sinU1 * sinσ * cosα1); - var C = f / 16 * cosSqα * (4 + f * (4 - 3 * cosSqα)); - var L = λ - (1 - C) * f * sinα * - (σ + C * sinσ * (cos2σM + C * cosσ * (-1 + 2 * cos2σM * cos2σM))); - - var λ2; - if (wrap) { - λ2 = (λ1 + L + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // normalise to -180...+180 - } else { - λ2 = (λ1 + L); // do not normalize - } - - var revAz = Math.atan2(sinα, -x); - - return { - lat: φ2.toDegrees(), - lng: λ2.toDegrees(), - finalBearing: revAz.toDegrees() - }; - }, - - /** - * Vincenty inverse calculation. - * based on the work of Chris Veness (https://github.com/chrisveness/geodesy) - * - * @private - * @param {LatLng} p1 - Latitude/longitude of start point. - * @param {LatLng} p2 - Latitude/longitude of destination point. - * @returns {Object} Object including distance, initialBearing, finalBearing. - * @throws {Error} If formula failed to converge. - */ - _vincenty_inverse: function(p1, p2) { - var φ1 = p1.lat.toRadians(), - λ1 = p1.lng.toRadians(); - var φ2 = p2.lat.toRadians(), - λ2 = p2.lng.toRadians(); - - var a = this.datum.ellipsoid.a, - b = this.datum.ellipsoid.b, - f = this.datum.ellipsoid.f; - - var L = λ2 - λ1; - var tanU1 = (1 - f) * Math.tan(φ1), - cosU1 = 1 / Math.sqrt((1 + tanU1 * tanU1)), - sinU1 = tanU1 * cosU1; - var tanU2 = (1 - f) * Math.tan(φ2), - cosU2 = 1 / Math.sqrt((1 + tanU2 * tanU2)), - sinU2 = tanU2 * cosU2; - - var λ = L, - λʹ, iterations = 0; - var cosSqα, sinσ, cos2σM, cosσ, σ, sinλ, cosλ; - do { - sinλ = Math.sin(λ); - cosλ = Math.cos(λ); - var sinSqσ = (cosU2 * sinλ) * (cosU2 * sinλ) + (cosU1 * sinU2 - - sinU1 * cosU2 * cosλ) * (cosU1 * sinU2 - sinU1 * cosU2 * cosλ); - sinσ = Math.sqrt(sinSqσ); - if (sinσ == 0) return 0; // co-incident points - cosσ = sinU1 * sinU2 + cosU1 * cosU2 * cosλ; - σ = Math.atan2(sinσ, cosσ); - var sinα = cosU1 * cosU2 * sinλ / sinσ; - cosSqα = 1 - sinα * sinα; - cos2σM = cosσ - 2 * sinU1 * sinU2 / cosSqα; - if (isNaN(cos2σM)) cos2σM = 0; // equatorial line: cosSqα=0 (§6) - var C = f / 16 * cosSqα * (4 + f * (4 - 3 * cosSqα)); - λʹ = λ; - λ = L + (1 - C) * f * sinα * (σ + C * sinσ * (cos2σM + C * cosσ * (- - 1 + 2 * cos2σM * cos2σM))); - } while (Math.abs(λ - λʹ) > 1e-12 && ++iterations < 100); - if (iterations >= 100) { - console.log("Formula failed to converge. Altering target position."); - return this._vincenty_inverse(p1, { - lat: p2.lat, - lng: p2.lng - 0.01 - }); - // throw new Error('Formula failed to converge'); - } - - var uSq = cosSqα * (a * a - b * b) / (b * b); - var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * - uSq))); - var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq))); - var Δσ = B * sinσ * (cos2σM + B / 4 * (cosσ * (-1 + 2 * cos2σM * - cos2σM) - - B / 6 * cos2σM * (-3 + 4 * sinσ * sinσ) * (-3 + 4 * cos2σM * - cos2σM))); - - var s = b * A * (σ - Δσ); - - var fwdAz = Math.atan2(cosU2 * sinλ, cosU1 * sinU2 - sinU1 * cosU2 * - cosλ); - var revAz = Math.atan2(cosU1 * sinλ, -sinU1 * cosU2 + cosU1 * sinU2 * - cosλ); - - s = Number(s.toFixed(3)); // round to 1mm precision - return { - distance: s, - initialBearing: fwdAz.toDegrees(), - finalBearing: revAz.toDegrees() - }; - }, - - - /** - * Returns the point of intersection of two paths defined by point and bearing. - * based on the work of Chris Veness (https://github.com/chrisveness/geodesy) - * - * @param {LatLon} p1 - First point. - * @param {number} brng1 - Initial bearing from first point. - * @param {LatLon} p2 - Second point. - * @param {number} brng2 - Initial bearing from second point. - * @returns {Object} containing lat/lng information of intersection. - * - * @example - * var p1 = LatLon(51.8853, 0.2545), brng1 = 108.55; - * var p2 = LatLon(49.0034, 2.5735), brng2 = 32.44; - * var pInt = LatLon.intersection(p1, brng1, p2, brng2); // pInt.toString(): 50.9078°N, 4.5084°E - */ - _intersection: function(p1, brng1, p2, brng2) { - // see http://williams.best.vwh.net/avform.htm#Intersection - - var φ1 = p1.lat.toRadians(), - λ1 = p1.lng.toRadians(); - var φ2 = p2.lat.toRadians(), - λ2 = p2.lng.toRadians(); - var θ13 = Number(brng1).toRadians(), - θ23 = Number(brng2).toRadians(); - var Δφ = φ2 - φ1, - Δλ = λ2 - λ1; - - var δ12 = 2 * Math.asin(Math.sqrt(Math.sin(Δφ / 2) * Math.sin(Δφ / 2) + - Math.cos(φ1) * Math.cos(φ2) * Math.sin(Δλ / 2) * Math.sin(Δλ / - 2))); - if (δ12 == 0) return null; - - // initial/final bearings between points - var θ1 = Math.acos((Math.sin(φ2) - Math.sin(φ1) * Math.cos(δ12)) / - (Math.sin(δ12) * Math.cos(φ1))); - if (isNaN(θ1)) θ1 = 0; // protect against rounding - var θ2 = Math.acos((Math.sin(φ1) - Math.sin(φ2) * Math.cos(δ12)) / - (Math.sin(δ12) * Math.cos(φ2))); - var θ12, θ21; - if (Math.sin(λ2 - λ1) > 0) { - θ12 = θ1; - θ21 = 2 * Math.PI - θ2; - } else { - θ12 = 2 * Math.PI - θ1; - θ21 = θ2; - } - - var α1 = (θ13 - θ12 + Math.PI) % (2 * Math.PI) - Math.PI; // angle 2-1-3 - var α2 = (θ21 - θ23 + Math.PI) % (2 * Math.PI) - Math.PI; // angle 1-2-3 - - if (Math.sin(α1) == 0 && Math.sin(α2) == 0) return null; // infinite intersections - if (Math.sin(α1) * Math.sin(α2) < 0) return null; // ambiguous intersection - - //α1 = Math.abs(α1); - //α2 = Math.abs(α2); - // ... Ed Williams takes abs of α1/α2, but seems to break calculation? - - var α3 = Math.acos(-Math.cos(α1) * Math.cos(α2) + - Math.sin(α1) * Math.sin(α2) * Math.cos(δ12)); - var δ13 = Math.atan2(Math.sin(δ12) * Math.sin(α1) * Math.sin(α2), - Math.cos(α2) + Math.cos(α1) * Math.cos(α3)); - var φ3 = Math.asin(Math.sin(φ1) * Math.cos(δ13) + - Math.cos(φ1) * Math.sin(δ13) * Math.cos(θ13)); - var Δλ13 = Math.atan2(Math.sin(θ13) * Math.sin(δ13) * Math.cos(φ1), - Math.cos(δ13) - Math.sin(φ1) * Math.sin(φ3)); - var λ3 = λ1 + Δλ13; - λ3 = (λ3 + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // normalise to -180..+180º - - return { - lat: φ3.toDegrees(), - lng: λ3.toDegrees() - }; - }, - - /** - * Overwrites obj1's values with obj2's and adds obj2's if non existent in obj1 - * @param obj1 - * @param obj2 - * @returns obj3 a new object based on obj1 and obj2 - */ - _merge_options: function(obj1, obj2) { - let obj3 = {}; - for (let attrname in obj1) { - obj3[attrname] = obj1[attrname]; - } - for (let attrname in obj2) { - obj3[attrname] = obj2[attrname]; - } - return obj3; - } -}); - -L.geodesic = function(latlngs, options) { - return new L.Geodesic(latlngs, options); -}; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 45437b7a..c8d8bac0 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -3,14 +3,14 @@ "/assets/frontend/css/now-ui-kit.css": "/assets/frontend/css/now-ui-kit.css?id=9923ce002ceafb1d740a", "/assets/fonts/glyphicons-halflings-regular.woff2": "/assets/fonts/glyphicons-halflings-regular.woff2?id=b5b5055c6d812c0f9f0d", "/assets/admin/fonts/glyphicons-halflings-regular.woff2": "/assets/admin/fonts/glyphicons-halflings-regular.woff2?id=b5b5055c6d812c0f9f0d", - "/assets/admin/css/clear.png": "/assets/admin/css/clear.png?id=0e92f4c3efc6988a3c96", - "/assets/admin/css/loading.gif": "/assets/admin/css/loading.gif?id=90a4b76b4f11558691f6", + "/assets/admin/img/clear.png": "/assets/admin/img/clear.png?id=0e92f4c3efc6988a3c96", + "/assets/admin/img/loading.gif": "/assets/admin/img/loading.gif?id=90a4b76b4f11558691f6", "/assets/admin/css/vendor.min.css": "/assets/admin/css/vendor.min.css?id=cae3dbc399c60b06b967", - "/assets/admin/js/vendor.js": "/assets/admin/js/vendor.js?id=3e46e22d29a6e6d54ed5", + "/assets/admin/js/vendor.js": "/assets/admin/js/vendor.js?id=f418a91f9cb835e4e2de", "/assets/admin/css/blue.png": "/assets/admin/css/blue.png?id=753a3c0dec86d3a38d9c", "/assets/admin/css/blue@2x.png": "/assets/admin/css/blue@2x.png?id=97da23d47b838cbd4bef", "/assets/system/js/jquery.js": "/assets/system/js/jquery.js?id=6a07da9fae934baf3f74", - "/assets/system/js/vendor.js": "/assets/system/js/vendor.js?id=27fbd48dbae92e5aef14", + "/assets/system/js/vendor.js": "/assets/system/js/vendor.js?id=79d997fd74bdb7f37b0b", "/assets/system/css/vendor.min.css": "/assets/system/css/vendor.min.css?id=23451051c1ac99cae5fb", "/assets/system/css/installer.css": "/assets/system/css/installer.css?id=1101b178b0383008aaa1", "/assets/system/js/installer-vendor.js": "/assets/system/js/installer-vendor.js?id=efb330ef732d2f856623" diff --git a/resources/views/admin/app.blade.php b/resources/views/admin/app.blade.php index 7782406e..e6454f73 100644 --- a/resources/views/admin/app.blade.php +++ b/resources/views/admin/app.blade.php @@ -7,6 +7,7 @@ + diff --git a/resources/views/layouts/default/app.blade.php b/resources/views/layouts/default/app.blade.php index 8d516102..6e4f2bc3 100644 --- a/resources/views/layouts/default/app.blade.php +++ b/resources/views/layouts/default/app.blade.php @@ -4,10 +4,14 @@ - + + {{-- Don't remove this! It's required --}} + @yield('title') - {!! config('app.name') !!} + + diff --git a/webpack.mix.js b/webpack.mix.js index 346c8707..815e807a 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -75,6 +75,7 @@ mix.autoload({ mix.scripts([ 'node_modules/lodash/lodash.js', + 'node_modules/axios/dist/axios.js', 'node_modules/jquery/dist/jquery.js', 'node_modules/bootstrap3/dist/js/bootstrap.js', 'node_modules/popper.js/dist/umd/popper.js',