|
|
|
|
@@ -17084,6 +17084,10 @@
|
|
|
|
|
}.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() :
|
|
|
|
|
@@ -17742,6 +17746,7 @@ 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) {
|
|
|
|
|
@@ -18854,6 +18859,10 @@ function localeMeridiem (hours, minutes, isLower) {
|
|
|
|
|
// this rule.
|
|
|
|
|
var getSetHour = makeGetSet('Hours', true);
|
|
|
|
|
|
|
|
|
|
// months
|
|
|
|
|
// week
|
|
|
|
|
// weekdays
|
|
|
|
|
// meridiem
|
|
|
|
|
var baseConfig = {
|
|
|
|
|
calendar: defaultCalendar,
|
|
|
|
|
longDateFormat: defaultLongDateFormat,
|
|
|
|
|
@@ -18907,7 +18916,7 @@ function chooseLocale(names) {
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
return globalLocale;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadLocale(name) {
|
|
|
|
|
@@ -18942,12 +18951,6 @@ 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;
|
|
|
|
|
@@ -18955,7 +18958,7 @@ function getSetGlobalLocale (key, values) {
|
|
|
|
|
|
|
|
|
|
function defineLocale (name, config) {
|
|
|
|
|
if (config !== null) {
|
|
|
|
|
var locale, parentConfig = baseConfig;
|
|
|
|
|
var parentConfig = baseConfig;
|
|
|
|
|
config.abbr = name;
|
|
|
|
|
if (locales[name] != null) {
|
|
|
|
|
deprecateSimple('defineLocaleOverride',
|
|
|
|
|
@@ -18968,19 +18971,14 @@ function defineLocale (name, config) {
|
|
|
|
|
if (locales[config.parentLocale] != null) {
|
|
|
|
|
parentConfig = locales[config.parentLocale]._config;
|
|
|
|
|
} else {
|
|
|
|
|
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;
|
|
|
|
|
if (!localeFamilies[config.parentLocale]) {
|
|
|
|
|
localeFamilies[config.parentLocale] = [];
|
|
|
|
|
}
|
|
|
|
|
localeFamilies[config.parentLocale].push({
|
|
|
|
|
name: name,
|
|
|
|
|
config: config
|
|
|
|
|
});
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
locales[name] = new Locale(mergeConfigs(parentConfig, config));
|
|
|
|
|
@@ -20328,7 +20326,7 @@ function isSameOrBefore (input, units) {
|
|
|
|
|
function diff (input, units, asFloat) {
|
|
|
|
|
var that,
|
|
|
|
|
zoneDelta,
|
|
|
|
|
output;
|
|
|
|
|
delta, output;
|
|
|
|
|
|
|
|
|
|
if (!this.isValid()) {
|
|
|
|
|
return NaN;
|
|
|
|
|
@@ -20401,7 +20399,7 @@ function toISOString(keepOffset) {
|
|
|
|
|
if (utc) {
|
|
|
|
|
return this.toDate().toISOString();
|
|
|
|
|
} else {
|
|
|
|
|
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
|
|
|
|
|
return new Date(this._d.valueOf()).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');
|
|
|
|
|
@@ -20955,26 +20953,48 @@ 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;
|
|
|
|
|
@@ -20985,8 +21005,12 @@ 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);
|
|
|
|
|
@@ -21017,15 +21041,19 @@ 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;
|
|
|
|
|
@@ -21035,6 +21063,7 @@ proto$1.weekdaysRegex = weekdaysRegex;
|
|
|
|
|
proto$1.weekdaysShortRegex = weekdaysShortRegex;
|
|
|
|
|
proto$1.weekdaysMinRegex = weekdaysMinRegex;
|
|
|
|
|
|
|
|
|
|
// Hours
|
|
|
|
|
proto$1.isPM = localeIsPM;
|
|
|
|
|
proto$1.meridiem = localeMeridiem;
|
|
|
|
|
|
|
|
|
|
@@ -21141,7 +21170,6 @@ 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);
|
|
|
|
|
|
|
|
|
|
@@ -21517,6 +21545,7 @@ 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;
|
|
|
|
|
|
|
|
|
|
@@ -21541,7 +21570,7 @@ addParseToken('x', function (input, array, config) {
|
|
|
|
|
// Side effect imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hooks.version = '2.21.0';
|
|
|
|
|
hooks.version = '2.20.1';
|
|
|
|
|
|
|
|
|
|
setHookCallback(createLocal);
|
|
|
|
|
|
|
|
|
|
@@ -25829,7 +25858,7 @@ if (typeof jQuery === 'undefined') {
|
|
|
|
|
|
|
|
|
|
/**!
|
|
|
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
|
|
|
* @version 1.14.0
|
|
|
|
|
* @version 1.13.0
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
|
|
|
*
|
|
|
|
|
@@ -25977,48 +26006,13 @@ function getScrollParent(element) {
|
|
|
|
|
overflowX = _getStyleComputedProp.overflowX,
|
|
|
|
|
overflowY = _getStyleComputedProp.overflowY;
|
|
|
|
|
|
|
|
|
|
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
|
|
|
|
|
if (/(auto|scroll)/.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
|
|
|
|
|
@@ -26027,23 +26021,16 @@ var isIE = function () {
|
|
|
|
|
* @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.offsetParent;
|
|
|
|
|
// Skip hidden elements which don't have an offsetParent
|
|
|
|
|
while (offsetParent === noOffsetParent && element.nextElementSibling) {
|
|
|
|
|
offsetParent = (element = element.nextElementSibling).offsetParent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var offsetParent = element && element.offsetParent;
|
|
|
|
|
var nodeName = offsetParent && offsetParent.nodeName;
|
|
|
|
|
|
|
|
|
|
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
|
|
|
|
|
return element ? element.ownerDocument.documentElement : document.documentElement;
|
|
|
|
|
if (element) {
|
|
|
|
|
return element.ownerDocument.documentElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return document.documentElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// .offsetParent will return the closest TD or TABLE in case
|
|
|
|
|
@@ -26185,14 +26172,29 @@ 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], isIE(10) ? 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], isIE10$1() ? 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 = isIE(10) && getComputedStyle(html);
|
|
|
|
|
var computedStyle = isIE10$1() && getComputedStyle(html);
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
height: getSize('Height', body, html, computedStyle),
|
|
|
|
|
@@ -26284,8 +26286,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
|
|
|
|
|
try {
|
|
|
|
|
if (isIE(10)) {
|
|
|
|
|
if (isIE10$1()) {
|
|
|
|
|
try {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
var scrollTop = getScroll(element, 'top');
|
|
|
|
|
var scrollLeft = getScroll(element, 'left');
|
|
|
|
|
@@ -26293,10 +26295,10 @@ function getBoundingClientRect(element) {
|
|
|
|
|
rect.left += scrollLeft;
|
|
|
|
|
rect.bottom += scrollTop;
|
|
|
|
|
rect.right += scrollLeft;
|
|
|
|
|
} else {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
} catch (err) {}
|
|
|
|
|
} else {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var result = {
|
|
|
|
|
left: rect.left,
|
|
|
|
|
@@ -26328,9 +26330,7 @@ function getBoundingClientRect(element) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
|
|
|
|
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
|
|
|
|
|
|
var isIE10 = isIE(10);
|
|
|
|
|
var isIE10 = isIE10$1();
|
|
|
|
|
var isHTML = parent.nodeName === 'HTML';
|
|
|
|
|
var childrenRect = getBoundingClientRect(children);
|
|
|
|
|
var parentRect = getBoundingClientRect(parent);
|
|
|
|
|
@@ -26340,11 +26340,6 @@ 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,
|
|
|
|
|
@@ -26372,7 +26367,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
|
|
|
|
offsets.marginLeft = marginLeft;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
|
|
|
|
if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
|
|
|
|
offsets = includeScroll(offsets, parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -26380,15 +26375,13 @@ 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 = !excludeScroll ? getScroll(html) : 0;
|
|
|
|
|
var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
|
|
|
|
|
var scrollTop = getScroll(html);
|
|
|
|
|
var scrollLeft = getScroll(html, 'left');
|
|
|
|
|
|
|
|
|
|
var offset = {
|
|
|
|
|
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
|
|
|
|
|
@@ -26419,26 +26412,6 @@ 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
|
|
|
|
|
@@ -26447,20 +26420,16 @@ function getFixedPositionOffsetParent(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 = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
|
|
|
|
|
var offsetParent = findCommonOffsetParent(popper, reference);
|
|
|
|
|
|
|
|
|
|
// Handle viewport case
|
|
|
|
|
if (boundariesElement === 'viewport') {
|
|
|
|
|
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
|
|
|
|
|
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
|
|
|
|
|
} else {
|
|
|
|
|
// Handle other cases based on DOM element used as boundaries
|
|
|
|
|
var boundariesNode = void 0;
|
|
|
|
|
@@ -26475,7 +26444,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
|
|
|
|
|
boundariesNode = boundariesElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
|
|
|
|
|
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
|
|
|
|
|
|
|
|
|
|
// In case of HTML, we need a different computation
|
|
|
|
|
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
|
|
|
|
|
@@ -26576,14 +26545,11 @@ 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 fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
|
|
|
|
|
|
|
|
var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
|
|
|
|
|
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
|
|
|
|
|
var commonOffsetParent = findCommonOffsetParent(popper, reference);
|
|
|
|
|
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -26756,7 +26722,7 @@ function update() {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// compute reference element offsets
|
|
|
|
|
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
|
|
|
|
|
data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);
|
|
|
|
|
|
|
|
|
|
// compute auto placement, store placement inside the data object,
|
|
|
|
|
// modifiers will be able to edit `placement` if needed
|
|
|
|
|
@@ -26766,11 +26732,9 @@ 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 = this.options.positionFixed ? 'fixed' : 'absolute';
|
|
|
|
|
data.offsets.popper.position = 'absolute';
|
|
|
|
|
|
|
|
|
|
// run the modifiers
|
|
|
|
|
data = runModifiers(this.modifiers, data);
|
|
|
|
|
@@ -26810,7 +26774,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; i++) {
|
|
|
|
|
for (var i = 0; i < prefixes.length - 1; i++) {
|
|
|
|
|
var prefix = prefixes[i];
|
|
|
|
|
var toCheck = prefix ? '' + prefix + upperProp : property;
|
|
|
|
|
if (typeof document.body.style[toCheck] !== 'undefined') {
|
|
|
|
|
@@ -26831,12 +26795,9 @@ 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')] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -27024,12 +26985,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, options.positionFixed);
|
|
|
|
|
var referenceOffsets = getReferenceOffsets(state, popper, reference);
|
|
|
|
|
|
|
|
|
|
// compute auto placement, store placement inside the data object,
|
|
|
|
|
// modifiers will be able to edit `placement` if needed
|
|
|
|
|
@@ -27040,7 +27001,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: options.positionFixed ? 'fixed' : 'absolute' });
|
|
|
|
|
setStyles(popper, { position: 'absolute' });
|
|
|
|
|
|
|
|
|
|
return options;
|
|
|
|
|
}
|
|
|
|
|
@@ -27343,7 +27304,7 @@ function flip(data, options) {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
|
|
|
|
|
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);
|
|
|
|
|
|
|
|
|
|
var placement = data.placement.split('-')[0];
|
|
|
|
|
var placementOpposite = getOppositePlacement(placement);
|
|
|
|
|
@@ -27635,7 +27596,7 @@ function preventOverflow(data, options) {
|
|
|
|
|
boundariesElement = getOffsetParent(boundariesElement);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
|
|
|
|
|
var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);
|
|
|
|
|
options.boundaries = boundaries;
|
|
|
|
|
|
|
|
|
|
var order = options.priority;
|
|
|
|
|
@@ -28132,12 +28093,6 @@ 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
|
|
|
|
|
@@ -28349,7 +28304,7 @@ return Popper;
|
|
|
|
|
|
|
|
|
|
/**!
|
|
|
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
|
|
|
* @version 1.14.0
|
|
|
|
|
* @version 1.13.0
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
|
|
|
*
|
|
|
|
|
@@ -28435,48 +28390,13 @@ function getScrollParent(element) {
|
|
|
|
|
overflowX = _getStyleComputedProp.overflowX,
|
|
|
|
|
overflowY = _getStyleComputedProp.overflowY;
|
|
|
|
|
|
|
|
|
|
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
|
|
|
|
|
if (/(auto|scroll)/.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
|
|
|
|
|
@@ -28485,23 +28405,16 @@ var isIE = function () {
|
|
|
|
|
* @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.offsetParent;
|
|
|
|
|
// Skip hidden elements which don't have an offsetParent
|
|
|
|
|
while (offsetParent === noOffsetParent && element.nextElementSibling) {
|
|
|
|
|
offsetParent = (element = element.nextElementSibling).offsetParent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var offsetParent = element && element.offsetParent;
|
|
|
|
|
var nodeName = offsetParent && offsetParent.nodeName;
|
|
|
|
|
|
|
|
|
|
if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
|
|
|
|
|
return element ? element.ownerDocument.documentElement : document.documentElement;
|
|
|
|
|
if (element) {
|
|
|
|
|
return element.ownerDocument.documentElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return document.documentElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// .offsetParent will return the closest TD or TABLE in case
|
|
|
|
|
@@ -28643,14 +28556,29 @@ 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], isIE(10) ? 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], isIE10$1() ? 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 = isIE(10) && getComputedStyle(html);
|
|
|
|
|
var computedStyle = isIE10$1() && getComputedStyle(html);
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
height: getSize('Height', body, html, computedStyle),
|
|
|
|
|
@@ -28699,8 +28627,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
|
|
|
|
|
try {
|
|
|
|
|
if (isIE(10)) {
|
|
|
|
|
if (isIE10$1()) {
|
|
|
|
|
try {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
var scrollTop = getScroll(element, 'top');
|
|
|
|
|
var scrollLeft = getScroll(element, 'left');
|
|
|
|
|
@@ -28708,10 +28636,10 @@ function getBoundingClientRect(element) {
|
|
|
|
|
rect.left += scrollLeft;
|
|
|
|
|
rect.bottom += scrollTop;
|
|
|
|
|
rect.right += scrollLeft;
|
|
|
|
|
} else {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {}
|
|
|
|
|
} catch (err) {}
|
|
|
|
|
} else {
|
|
|
|
|
rect = element.getBoundingClientRect();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var result = {
|
|
|
|
|
left: rect.left,
|
|
|
|
|
@@ -28743,9 +28671,7 @@ function getBoundingClientRect(element) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
|
|
|
|
var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
|
|
|
|
|
|
var isIE10 = isIE(10);
|
|
|
|
|
var isIE10 = isIE10$1();
|
|
|
|
|
var isHTML = parent.nodeName === 'HTML';
|
|
|
|
|
var childrenRect = getBoundingClientRect(children);
|
|
|
|
|
var parentRect = getBoundingClientRect(parent);
|
|
|
|
|
@@ -28755,11 +28681,6 @@ 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,
|
|
|
|
|
@@ -28787,7 +28708,7 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
|
|
|
|
offsets.marginLeft = marginLeft;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
|
|
|
|
if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
|
|
|
|
offsets = includeScroll(offsets, parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -28795,15 +28716,13 @@ 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 = !excludeScroll ? getScroll(html) : 0;
|
|
|
|
|
var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
|
|
|
|
|
var scrollTop = getScroll(html);
|
|
|
|
|
var scrollLeft = getScroll(html, 'left');
|
|
|
|
|
|
|
|
|
|
var offset = {
|
|
|
|
|
top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
|
|
|
|
|
@@ -28834,26 +28753,6 @@ 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
|
|
|
|
|
@@ -28862,20 +28761,16 @@ function getFixedPositionOffsetParent(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 = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
|
|
|
|
|
var offsetParent = findCommonOffsetParent(popper, reference);
|
|
|
|
|
|
|
|
|
|
// Handle viewport case
|
|
|
|
|
if (boundariesElement === 'viewport') {
|
|
|
|
|
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
|
|
|
|
|
boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
|
|
|
|
|
} else {
|
|
|
|
|
// Handle other cases based on DOM element used as boundaries
|
|
|
|
|
var boundariesNode = void 0;
|
|
|
|
|
@@ -28890,7 +28785,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) {
|
|
|
|
|
boundariesNode = boundariesElement;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
|
|
|
|
|
var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
|
|
|
|
|
|
|
|
|
|
// In case of HTML, we need a different computation
|
|
|
|
|
if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
|
|
|
|
|
@@ -29188,14 +29083,11 @@ 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 fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
|
|
|
|
|
|
|
|
var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
|
|
|
|
|
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
|
|
|
|
|
var commonOffsetParent = findCommonOffsetParent(popper, reference);
|
|
|
|
|
return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -29209,7 +29101,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; i++) {
|
|
|
|
|
for (var i = 0; i < prefixes.length - 1; i++) {
|
|
|
|
|
var prefix = prefixes[i];
|
|
|
|
|
var toCheck = prefix ? '' + prefix + upperProp : property;
|
|
|
|
|
if (typeof document.body.style[toCheck] !== 'undefined') {
|
|
|
|
|
|