@popperjs/core
Advanced tools
Comparing version 2.10.2 to 2.11.0
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -4,0 +4,0 @@ |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -9,38 +9,2 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindow(node) { | ||
@@ -59,12 +23,2 @@ if (node == null) { | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function isElement(node) { | ||
@@ -90,2 +44,51 @@ var OwnElement = getWindow(node).Element; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
includeScale = false; | ||
} | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function getHTMLElementScroll(element) { | ||
@@ -143,4 +146,4 @@ return { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -157,5 +160,5 @@ } // Returns the composite rect of an element relative to its offsetParent. | ||
var isOffsetParentAnElement = isHTMLElement(offsetParent); | ||
isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var documentElement = getDocumentElement(offsetParent); | ||
var rect = getBoundingClientRect(elementOrVirtualElement); | ||
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); | ||
var scroll = { | ||
@@ -177,3 +180,3 @@ scrollLeft: 0, | ||
if (isHTMLElement(offsetParent)) { | ||
offsets = getBoundingClientRect(offsetParent); | ||
offsets = getBoundingClientRect(offsetParent, true); | ||
offsets.x += offsetParent.clientLeft; | ||
@@ -578,5 +581,2 @@ offsets.y += offsetParent.clientTop; | ||
var max = Math.max; | ||
var min = Math.min; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -653,3 +653,3 @@ | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -671,3 +671,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -674,0 +674,0 @@ } // Gets the maximum area that the element is visible in due to any number of |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -9,38 +9,2 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindow(node) { | ||
@@ -59,12 +23,2 @@ if (node == null) { | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function isElement(node) { | ||
@@ -90,2 +44,51 @@ var OwnElement = getWindow(node).Element; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
includeScale = false; | ||
} | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function getHTMLElementScroll(element) { | ||
@@ -143,4 +146,4 @@ return { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -157,5 +160,5 @@ } // Returns the composite rect of an element relative to its offsetParent. | ||
var isOffsetParentAnElement = isHTMLElement(offsetParent); | ||
isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var documentElement = getDocumentElement(offsetParent); | ||
var rect = getBoundingClientRect(elementOrVirtualElement); | ||
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); | ||
var scroll = { | ||
@@ -177,3 +180,3 @@ scrollLeft: 0, | ||
if (isHTMLElement(offsetParent)) { | ||
offsets = getBoundingClientRect(offsetParent); | ||
offsets = getBoundingClientRect(offsetParent, true); | ||
offsets.x += offsetParent.clientLeft; | ||
@@ -578,6 +581,2 @@ offsets.y += offsetParent.clientTop; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -654,3 +653,3 @@ | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -672,3 +671,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -1175,4 +1174,4 @@ } // Gets the maximum area that the element is visible in due to any number of | ||
return { | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
x: round(x * dpr) / dpr || 0, | ||
y: round(y * dpr) / dpr || 0 | ||
}; | ||
@@ -1192,3 +1191,4 @@ } | ||
adaptive = _ref2.adaptive, | ||
roundOffsets = _ref2.roundOffsets; | ||
roundOffsets = _ref2.roundOffsets, | ||
isFixed = _ref2.isFixed; | ||
@@ -1225,5 +1225,6 @@ var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
if (placement === top || (placement === left || placement === right) && variation === end) { | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
y -= offsetParent[heightProp] - popperRect.height; | ||
sideY = bottom; | ||
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] | ||
offsetParent[heightProp]; | ||
y -= offsetY - popperRect.height; | ||
y *= gpuAcceleration ? 1 : -1; | ||
@@ -1233,5 +1234,6 @@ } | ||
if (placement === left || (placement === top || placement === bottom) && variation === end) { | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
x -= offsetParent[widthProp] - popperRect.width; | ||
sideX = right; | ||
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] | ||
offsetParent[widthProp]; | ||
x -= offsetX - popperRect.width; | ||
x *= gpuAcceleration ? 1 : -1; | ||
@@ -1279,3 +1281,4 @@ } | ||
popperRect: state.rects.popper, | ||
gpuAcceleration: gpuAcceleration | ||
gpuAcceleration: gpuAcceleration, | ||
isFixed: state.options.strategy === 'fixed' | ||
}; | ||
@@ -1282,0 +1285,0 @@ |
@@ -1,4 +0,4 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
export default function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
import { isHTMLElement } from "./instanceOf.js"; | ||
import { round } from "../utils/math.js"; | ||
export default function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
@@ -10,20 +10,18 @@ includeScale = false; | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
@@ -30,0 +28,0 @@ width: rect.width / scaleX, |
@@ -30,3 +30,3 @@ import { viewport } from "../enums.js"; | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -48,3 +48,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -51,0 +51,0 @@ } // Gets the maximum area that the element is visible in due to any number of |
@@ -8,7 +8,8 @@ import getBoundingClientRect from "./getBoundingClientRect.js"; | ||
import isScrollParent from "./isScrollParent.js"; | ||
import { round } from "../utils/math.js"; | ||
function isElementScaled(element) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -15,0 +16,0 @@ } // Returns the composite rect of an element relative to its offsetParent. |
@@ -6,3 +6,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import getMainAxisFromPlacement from "../utils/getMainAxisFromPlacement.js"; | ||
import within from "../utils/within.js"; | ||
import { within } from "../utils/within.js"; | ||
import mergePaddingObject from "../utils/mergePaddingObject.js"; | ||
@@ -9,0 +9,0 @@ import expandToHashMap from "../utils/expandToHashMap.js"; |
@@ -25,4 +25,4 @@ import { top, left, right, bottom, end } from "../enums.js"; | ||
return { | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
x: round(x * dpr) / dpr || 0, | ||
y: round(y * dpr) / dpr || 0 | ||
}; | ||
@@ -42,3 +42,4 @@ } | ||
adaptive = _ref2.adaptive, | ||
roundOffsets = _ref2.roundOffsets; | ||
roundOffsets = _ref2.roundOffsets, | ||
isFixed = _ref2.isFixed; | ||
@@ -75,5 +76,6 @@ var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
if (placement === top || (placement === left || placement === right) && variation === end) { | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
y -= offsetParent[heightProp] - popperRect.height; | ||
sideY = bottom; | ||
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] | ||
offsetParent[heightProp]; | ||
y -= offsetY - popperRect.height; | ||
y *= gpuAcceleration ? 1 : -1; | ||
@@ -83,5 +85,6 @@ } | ||
if (placement === left || (placement === top || placement === bottom) && variation === end) { | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
x -= offsetParent[widthProp] - popperRect.width; | ||
sideX = right; | ||
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] | ||
offsetParent[widthProp]; | ||
x -= offsetX - popperRect.width; | ||
x *= gpuAcceleration ? 1 : -1; | ||
@@ -129,3 +132,4 @@ } | ||
popperRect: state.rects.popper, | ||
gpuAcceleration: gpuAcceleration | ||
gpuAcceleration: gpuAcceleration, | ||
isFixed: state.options.strategy === 'fixed' | ||
}; | ||
@@ -132,0 +136,0 @@ |
import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import { top, left, right, placements } from "../enums.js"; | ||
import { top, left, right, placements } from "../enums.js"; // eslint-disable-next-line import/no-unused-modules | ||
export function distanceAndSkiddingToXY(placement, rects, offset) { | ||
@@ -4,0 +5,0 @@ var basePlacement = getBasePlacement(placement); |
@@ -5,3 +5,3 @@ import { top, left, right, bottom, start } from "../enums.js"; | ||
import getAltAxis from "../utils/getAltAxis.js"; | ||
import within from "../utils/within.js"; | ||
import { within, withinMaxClamp } from "../utils/within.js"; | ||
import getLayoutRect from "../dom-utils/getLayoutRect.js"; | ||
@@ -12,3 +12,3 @@ import getOffsetParent from "../dom-utils/getOffsetParent.js"; | ||
import getFreshSideObject from "../utils/getFreshSideObject.js"; | ||
import { max as mathMax, min as mathMin } from "../utils/math.js"; | ||
import { min as mathMin, max as mathMax } from "../utils/math.js"; | ||
@@ -48,2 +48,10 @@ function preventOverflow(_ref) { | ||
})) : tetherOffset; | ||
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { | ||
mainAxis: tetherOffsetValue, | ||
altAxis: tetherOffsetValue | ||
} : Object.assign({ | ||
mainAxis: 0, | ||
altAxis: 0 | ||
}, tetherOffsetValue); | ||
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; | ||
var data = { | ||
@@ -58,3 +66,5 @@ x: 0, | ||
if (checkMainAxis || checkAltAxis) { | ||
if (checkMainAxis) { | ||
var _offsetModifierState$; | ||
var mainSide = mainAxis === 'y' ? top : left; | ||
@@ -64,4 +74,4 @@ var altSide = mainAxis === 'y' ? bottom : right; | ||
var offset = popperOffsets[mainAxis]; | ||
var min = popperOffsets[mainAxis] + overflow[mainSide]; | ||
var max = popperOffsets[mainAxis] - overflow[altSide]; | ||
var min = offset + overflow[mainSide]; | ||
var max = offset - overflow[altSide]; | ||
var additive = tether ? -popperRect[len] / 2 : 0; | ||
@@ -86,32 +96,41 @@ var minLen = variation === start ? referenceRect[len] : popperRect[len]; | ||
var arrowLen = within(0, referenceRect[len], arrowRect[len]); | ||
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue; | ||
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue; | ||
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; | ||
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; | ||
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); | ||
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; | ||
var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0; | ||
var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset; | ||
var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue; | ||
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; | ||
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; | ||
var tetherMax = offset + maxOffset - offsetModifierValue; | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
data[mainAxis] = preventedOffset - offset; | ||
} | ||
if (checkMainAxis) { | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
data[mainAxis] = preventedOffset - offset; | ||
} | ||
if (checkAltAxis) { | ||
var _offsetModifierState$2; | ||
if (checkAltAxis) { | ||
var _mainSide = mainAxis === 'x' ? top : left; | ||
var _mainSide = mainAxis === 'x' ? top : left; | ||
var _altSide = mainAxis === 'x' ? bottom : right; | ||
var _altSide = mainAxis === 'x' ? bottom : right; | ||
var _offset = popperOffsets[altAxis]; | ||
var _offset = popperOffsets[altAxis]; | ||
var _min = _offset + overflow[_mainSide]; | ||
var _len = altAxis === 'y' ? 'height' : 'width'; | ||
var _max = _offset - overflow[_altSide]; | ||
var _min = _offset + overflow[_mainSide]; | ||
var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max); | ||
var _max = _offset - overflow[_altSide]; | ||
popperOffsets[altAxis] = _preventedOffset; | ||
data[altAxis] = _preventedOffset - _offset; | ||
} | ||
var isOriginSide = [top, left].indexOf(basePlacement) !== -1; | ||
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; | ||
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; | ||
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; | ||
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); | ||
popperOffsets[altAxis] = _preventedOffset; | ||
data[altAxis] = _preventedOffset - _offset; | ||
} | ||
@@ -118,0 +137,0 @@ |
import { max as mathMax, min as mathMin } from "./math.js"; | ||
export default function within(min, value, max) { | ||
export function within(min, value, max) { | ||
return mathMax(min, mathMin(value, max)); | ||
} | ||
export function withinMaxClamp(min, value, max) { | ||
var v = within(min, value, max); | ||
return v > max ? max : v; | ||
} |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -4,0 +4,0 @@ |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -4,0 +4,0 @@ |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -11,38 +11,2 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindow(node) { | ||
@@ -61,12 +25,2 @@ if (node == null) { | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function isElement(node) { | ||
@@ -92,2 +46,51 @@ var OwnElement = getWindow(node).Element; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
includeScale = false; | ||
} | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function getHTMLElementScroll(element) { | ||
@@ -145,4 +148,4 @@ return { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -159,5 +162,5 @@ } // Returns the composite rect of an element relative to its offsetParent. | ||
var isOffsetParentAnElement = isHTMLElement(offsetParent); | ||
isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var documentElement = getDocumentElement(offsetParent); | ||
var rect = getBoundingClientRect(elementOrVirtualElement); | ||
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); | ||
var scroll = { | ||
@@ -179,3 +182,3 @@ scrollLeft: 0, | ||
if (isHTMLElement(offsetParent)) { | ||
offsets = getBoundingClientRect(offsetParent); | ||
offsets = getBoundingClientRect(offsetParent, true); | ||
offsets.x += offsetParent.clientLeft; | ||
@@ -580,5 +583,2 @@ offsets.y += offsetParent.clientTop; | ||
var max = Math.max; | ||
var min = Math.min; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -655,3 +655,3 @@ | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -673,3 +673,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -676,0 +676,0 @@ } // Gets the maximum area that the element is visible in due to any number of |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Popper={})}(this,(function(t){function e(t,e){return{width:(t=t.getBoundingClientRect()).width/1,height:t.height/1,top:t.top/1,right:t.right/1,bottom:t.bottom/1,left:t.left/1,x:t.left/1,y:t.top/1}}function n(t){return null==t?window:"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return{scrollLeft:(t=n(t)).pageXOffset,scrollTop:t.pageYOffset}}function i(t){return t instanceof n(t).Element||t instanceof Element}function r(t){return t instanceof n(t).HTMLElement||t instanceof HTMLElement}function f(t){return"undefined"!=typeof ShadowRoot&&(t instanceof n(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function a(t){return((i(t)?t.ownerDocument:t.document)||window.document).documentElement}function s(t){return e(a(t)).left+o(t).scrollLeft}function l(t){return n(t).getComputedStyle(t)}function u(t){return t=l(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function d(t,i,f){void 0===f&&(f=!1);var l=r(i);r(i)&&i.getBoundingClientRect();var d=a(i);t=e(t);var p={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(l||!l&&!f)&&(("body"!==c(i)||u(d))&&(p=i!==n(i)&&r(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:o(i)),r(i)?((h=e(i)).x+=i.clientLeft,h.y+=i.clientTop):d&&(h.x=s(d))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function p(t){var n=e(t),o=t.offsetWidth,i=t.offsetHeight;return 1>=Math.abs(n.width-o)&&(o=n.width),1>=Math.abs(n.height-i)&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:i}}function h(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||a(t)}function m(t){return 0<=["html","body","#document"].indexOf(c(t))?t.ownerDocument.body:r(t)&&u(t)?t:m(h(t))}function g(t,e){var o;void 0===e&&(e=[]);var i=m(t);return t=i===(null==(o=t.ownerDocument)?void 0:o.body),o=n(i),i=t?[o].concat(o.visualViewport||[],u(i)?i:[]):i,e=e.concat(i),t?e:e.concat(g(h(i)))}function v(t){return r(t)&&"fixed"!==l(t).position?t.offsetParent:null}function b(t){for(var e=n(t),o=v(t);o&&0<=["table","td","th"].indexOf(c(o))&&"static"===l(o).position;)o=v(o);if(o&&("html"===c(o)||"body"===c(o)&&"static"===l(o).position))return e;if(!o)t:{if(o=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!r(t)||"fixed"!==l(t).position)for(t=h(t);r(t)&&0>["html","body"].indexOf(c(t));){var i=l(t);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||o&&"filter"===i.willChange||o&&i.filter&&"none"!==i.filter){o=t;break t}t=t.parentNode}o=null}return o||e}function y(t){function e(t){o.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){o.has(t)||(t=n.get(t))&&e(t)})),i.push(t)}var n=new Map,o=new Set,i=[];return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){o.has(t.name)||e(t)})),i}function w(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}function x(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function O(t,i){if("viewport"===i){i=n(t);var f=a(t);i=i.visualViewport;var c=f.clientWidth;f=f.clientHeight;var u=0,d=0;i&&(c=i.width,f=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(u=i.offsetLeft,d=i.offsetTop)),t=x(t={width:c,height:f,x:u+s(t),y:d})}else r(i)?((t=e(i)).top+=i.clientTop,t.left+=i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top):(d=a(t),t=a(d),c=o(d),i=null==(f=d.ownerDocument)?void 0:f.body,f=W(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),u=W(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),d=-c.scrollLeft+s(d),c=-c.scrollTop,"rtl"===l(i||t).direction&&(d+=W(t.clientWidth,i?i.clientWidth:0)-f),t=x({width:f,height:u,x:d,y:c}));return t}function M(t,e,n){return e="clippingParents"===e?function(t){var e=g(h(t)),n=0<=["absolute","fixed"].indexOf(l(t).position)&&r(t)?b(t):t;return i(n)?e.filter((function(t){var e;if(e=i(t))t:if(e=n.getRootNode&&n.getRootNode(),t.contains(n))e=!0;else{if(e&&f(e)){e=n;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==c(t)})):[]}(t):[].concat(e),(n=(n=[].concat(e,[n])).reduce((function(e,n){return n=O(t,n),e.top=W(n.top,e.top),e.right=H(n.right,e.right),e.bottom=H(n.bottom,e.bottom),e.left=W(n.left,e.left),e}),O(t,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function E(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function L(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,o=void 0===(t=t.defaultOptions)?P:t;return function(t,e,r){function f(){a.forEach((function(t){return t()})),a=[]}void 0===r&&(r=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},P,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},a=[],s=!1,l={state:c,setOptions:function(r){return r="function"==typeof r?r(c.options):r,f(),c.options=Object.assign({},o,c.options,r),c.scrollParents={reference:i(t)?g(t):t.contextElement?g(t.contextElement):[],popper:g(e)},r=function(t){var e=y(t);return j.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,c.options.modifiers))),c.orderedModifiers=r.filter((function(t){return t.enabled})),c.orderedModifiers.forEach((function(t){var e=t.name,n=t.options;n=void 0===n?{}:n,"function"==typeof(t=t.effect)&&(e=t({state:c,name:e,instance:l,options:n}),a.push(e||function(){}))})),l.update()},forceUpdate:function(){if(!s){var t=c.elements,e=t.reference;if(E(e,t=t.popper))for(c.rects={reference:d(e,b(t),"fixed"===c.options.strategy),popper:p(t)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach((function(t){return c.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<c.orderedModifiers.length;e++)if(!0===c.reset)c.reset=!1,e=-1;else{var n=c.orderedModifiers[e];t=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof t&&(c=t({state:c,options:o,name:n,instance:l})||c)}}},update:w((function(){return new Promise((function(t){l.forceUpdate(),t(c)}))})),destroy:function(){f(),s=!0}};return E(t,e)?(l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l):l}}var T=["top","bottom","right","left"],j="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),W=Math.max,H=Math.min,P={placement:"bottom",modifiers:[],strategy:"absolute"},R=L();t.createPopper=R,t.detectOverflow=function(t,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?t.placement:n;var r=o.boundary,f=void 0===r?"clippingParents":r,c=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var s=o.altBoundary,l=void 0!==s&&s;o=void 0===(o=o.padding)?0:o,o=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof o?o:function(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}(o,T)),s=t.rects.popper,f=M(i(l=t.elements[l?"popper"===r?"reference":"popper":r])?l:l.contextElement||a(t.elements.popper),f,c),l=function(t){var e=t.reference,n=t.element,o=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;switch(o){case"top":i={x:i,y:e.y-n.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-n.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(o=o?0<=["top","bottom"].indexOf(o)?"x":"y":null))switch(r="y"===o?"height":"width",t){case"start":i[o]-=e[r]/2-n[r]/2;break;case"end":i[o]+=e[r]/2-n[r]/2}return i}({reference:c=e(t.elements.reference),element:s,strategy:"absolute",placement:n}),s=x(Object.assign({},s,l)),c="popper"===r?s:c;var u={top:f.top-c.top+o.top,bottom:c.bottom-f.bottom+o.bottom,left:f.left-c.left+o.left,right:c.right-f.right+o.right};if(t=t.modifiersData.offset,"popper"===r&&t){var d=t[n];Object.keys(u).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,n=0<=["top","bottom"].indexOf(t)?"y":"x";u[t]+=d[n]*e}))}return u},t.popperGenerator=L,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
"use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Popper={})}(this,(function(t){function e(t){return null==t?window:"[object Window]"!==t.toString()?(t=t.ownerDocument)&&t.defaultView||window:t}function o(t){return t instanceof e(t).Element||t instanceof Element}function n(t){return t instanceof e(t).HTMLElement||t instanceof HTMLElement}function i(t){return"undefined"!=typeof ShadowRoot&&(t instanceof e(t).ShadowRoot||t instanceof ShadowRoot)}function r(t,e){void 0===e&&(e=!1);var o=t.getBoundingClientRect(),i=1,r=1;return n(t)&&e&&(e=t.offsetHeight,0<(t=t.offsetWidth)&&(i=j(o.width)/t||1),0<e&&(r=j(o.height)/e||1)),{width:o.width/i,height:o.height/r,top:o.top/r,right:o.right/i,bottom:o.bottom/r,left:o.left/i,x:o.left/i,y:o.top/r}}function f(t){return{scrollLeft:(t=e(t)).pageXOffset,scrollTop:t.pageYOffset}}function a(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){return((o(t)?t.ownerDocument:t.document)||window.document).documentElement}function s(t){return r(c(t)).left+f(t).scrollLeft}function l(t){return e(t).getComputedStyle(t)}function d(t){return t=l(t),/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function u(t,o,i){void 0===i&&(i=!1);var l,u=n(o);if(l=n(o)){var p=o.getBoundingClientRect();l=j(p.width)/o.offsetWidth||1,p=j(p.height)/o.offsetHeight||1,l=1!==l||1!==p}p=l,l=c(o),t=r(t,p),p={scrollLeft:0,scrollTop:0};var h={x:0,y:0};return(u||!u&&!i)&&(("body"!==a(o)||d(l))&&(p=o!==e(o)&&n(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:f(o)),n(o)?((h=r(o,!0)).x+=o.clientLeft,h.y+=o.clientTop):l&&(h.x=s(l))),{x:t.left+p.scrollLeft-h.x,y:t.top+p.scrollTop-h.y,width:t.width,height:t.height}}function p(t){var e=r(t),o=t.offsetWidth,n=t.offsetHeight;return 1>=Math.abs(e.width-o)&&(o=e.width),1>=Math.abs(e.height-n)&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:o,height:n}}function h(t){return"html"===a(t)?t:t.assignedSlot||t.parentNode||(i(t)?t.host:null)||c(t)}function m(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:n(t)&&d(t)?t:m(h(t))}function g(t,o){var n;void 0===o&&(o=[]);var i=m(t);return t=i===(null==(n=t.ownerDocument)?void 0:n.body),n=e(i),i=t?[n].concat(n.visualViewport||[],d(i)?i:[]):i,o=o.concat(i),t?o:o.concat(g(h(i)))}function v(t){return n(t)&&"fixed"!==l(t).position?t.offsetParent:null}function b(t){for(var o=e(t),i=v(t);i&&0<=["table","td","th"].indexOf(a(i))&&"static"===l(i).position;)i=v(i);if(i&&("html"===a(i)||"body"===a(i)&&"static"===l(i).position))return o;if(!i)t:{if(i=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!n(t)||"fixed"!==l(t).position)for(t=h(t);n(t)&&0>["html","body"].indexOf(a(t));){var r=l(t);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||i&&"filter"===r.willChange||i&&r.filter&&"none"!==r.filter){i=t;break t}t=t.parentNode}i=null}return i||o}function w(t){function e(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){n.has(t)||(t=o.get(t))&&e(t)})),i.push(t)}var o=new Map,n=new Set,i=[];return t.forEach((function(t){o.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||e(t)})),i}function y(t){var e;return function(){return e||(e=new Promise((function(o){Promise.resolve().then((function(){e=void 0,o(t())}))}))),e}}function x(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function O(t,n){if("viewport"===n){n=e(t);var i=c(t);n=n.visualViewport;var a=i.clientWidth;i=i.clientHeight;var d=0,u=0;n&&(a=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(d=n.offsetLeft,u=n.offsetTop)),t=x(t={width:a,height:i,x:d+s(t),y:u})}else o(n)?((t=r(n)).top+=n.clientTop,t.left+=n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top):(u=c(t),t=c(u),a=f(u),n=null==(i=u.ownerDocument)?void 0:i.body,i=T(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),d=T(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-a.scrollLeft+s(u),a=-a.scrollTop,"rtl"===l(n||t).direction&&(u+=T(t.clientWidth,n?n.clientWidth:0)-i),t=x({width:i,height:d,x:u,y:a}));return t}function M(t,e,r){return e="clippingParents"===e?function(t){var e=g(h(t)),r=0<=["absolute","fixed"].indexOf(l(t).position),f=r&&n(t)?b(t):t;return o(f)?e.filter((function(t){var e;if(e=o(t))t:if(e=f.getRootNode&&f.getRootNode(),t.contains(f))e=!0;else{if(e&&i(e)){e=f;do{if(e&&t.isSameNode(e)){e=!0;break t}e=e.parentNode||e.host}while(e)}e=!1}return e&&"body"!==a(t)&&(!r||"static"!==l(t).position)})):[]}(t):[].concat(e),(r=(r=[].concat(e,[r])).reduce((function(e,o){return o=O(t,o),e.top=T(o.top,e.top),e.right=W(o.right,e.right),e.bottom=W(o.bottom,e.bottom),e.left=T(o.left,e.left),e}),O(t,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function E(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function L(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=void 0===(t=t.defaultOptions)?R:t;return function(t,e,r){function f(){c.forEach((function(t){return t()})),c=[]}void 0===r&&(r=i);var a={placement:"bottom",orderedModifiers:[],options:Object.assign({},R,i),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],s=!1,l={state:a,setOptions:function(r){return r="function"==typeof r?r(a.options):r,f(),a.options=Object.assign({},i,a.options,r),a.scrollParents={reference:o(t)?g(t):t.contextElement?g(t.contextElement):[],popper:g(e)},r=function(t){var e=w(t);return P.reduce((function(t,o){return t.concat(e.filter((function(t){return t.phase===o})))}),[])}(function(t){var e=t.reduce((function(t,e){var o=t[e.name];return t[e.name]=o?Object.assign({},o,e,{options:Object.assign({},o.options,e.options),data:Object.assign({},o.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers))),a.orderedModifiers=r.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,o=t.options;o=void 0===o?{}:o,"function"==typeof(t=t.effect)&&(e=t({state:a,name:e,instance:l,options:o}),c.push(e||function(){}))})),l.update()},forceUpdate:function(){if(!s){var t=a.elements,e=t.reference;if(E(e,t=t.popper))for(a.rects={reference:u(e,b(t),"fixed"===a.options.strategy),popper:p(t)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)})),e=0;e<a.orderedModifiers.length;e++)if(!0===a.reset)a.reset=!1,e=-1;else{var o=a.orderedModifiers[e];t=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof t&&(a=t({state:a,options:n,name:o,instance:l})||a)}}},update:y((function(){return new Promise((function(t){l.forceUpdate(),t(a)}))})),destroy:function(){f(),s=!0}};return E(t,e)?(l.setOptions(r).then((function(t){!s&&r.onFirstUpdate&&r.onFirstUpdate(t)})),l):l}}var T=Math.max,W=Math.min,j=Math.round,H=["top","bottom","right","left"],P="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),R={placement:"bottom",modifiers:[],strategy:"absolute"},k=L();t.createPopper=k,t.detectOverflow=function(t,e){void 0===e&&(e={});var n=e;e=void 0===(e=n.placement)?t.placement:e;var i=n.boundary,f=void 0===i?"clippingParents":i,a=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var s=n.altBoundary,l=void 0!==s&&s;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof n?n:function(t,e){return e.reduce((function(e,o){return e[o]=t,e}),{})}(n,H)),s=t.rects.popper,f=M(o(l=t.elements[l?"popper"===i?"reference":"popper":i])?l:l.contextElement||c(t.elements.popper),f,a),l=function(t){var e=t.reference,o=t.element,n=(t=t.placement)?t.split("-")[0]:null;t=t?t.split("-")[1]:null;var i=e.x+e.width/2-o.width/2,r=e.y+e.height/2-o.height/2;switch(n){case"top":i={x:i,y:e.y-o.height};break;case"bottom":i={x:i,y:e.y+e.height};break;case"right":i={x:e.x+e.width,y:r};break;case"left":i={x:e.x-o.width,y:r};break;default:i={x:e.x,y:e.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(r="y"===n?"height":"width",t){case"start":i[n]-=e[r]/2-o[r]/2;break;case"end":i[n]+=e[r]/2-o[r]/2}return i}({reference:a=r(t.elements.reference),element:s,strategy:"absolute",placement:e}),s=x(Object.assign({},s,l)),a="popper"===i?s:a;var d={top:f.top-a.top+n.top,bottom:a.bottom-f.bottom+n.bottom,left:f.left-a.left+n.left,right:a.right-f.right+n.right};if(t=t.modifiersData.offset,"popper"===i&&t){var u=t[e];Object.keys(d).forEach((function(t){var e=0<=["right","bottom"].indexOf(t)?1:-1,o=0<=["top","bottom"].indexOf(t)?"y":"x";d[t]+=u[o]*e}))}return d},t.popperGenerator=L,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-base.min.js.map |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
@@ -11,38 +11,2 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindow(node) { | ||
@@ -61,12 +25,2 @@ if (node == null) { | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function isElement(node) { | ||
@@ -92,2 +46,51 @@ var OwnElement = getWindow(node).Element; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
includeScale = false; | ||
} | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = 1; | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
width: rect.width / scaleX, | ||
height: rect.height / scaleY, | ||
top: rect.top / scaleY, | ||
right: rect.right / scaleX, | ||
bottom: rect.bottom / scaleY, | ||
left: rect.left / scaleX, | ||
x: rect.left / scaleX, | ||
y: rect.top / scaleY | ||
}; | ||
} | ||
function getWindowScroll(node) { | ||
var win = getWindow(node); | ||
var scrollLeft = win.pageXOffset; | ||
var scrollTop = win.pageYOffset; | ||
return { | ||
scrollLeft: scrollLeft, | ||
scrollTop: scrollTop | ||
}; | ||
} | ||
function getHTMLElementScroll(element) { | ||
@@ -145,4 +148,4 @@ return { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -159,5 +162,5 @@ } // Returns the composite rect of an element relative to its offsetParent. | ||
var isOffsetParentAnElement = isHTMLElement(offsetParent); | ||
isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent); | ||
var documentElement = getDocumentElement(offsetParent); | ||
var rect = getBoundingClientRect(elementOrVirtualElement); | ||
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled); | ||
var scroll = { | ||
@@ -179,3 +182,3 @@ scrollLeft: 0, | ||
if (isHTMLElement(offsetParent)) { | ||
offsets = getBoundingClientRect(offsetParent); | ||
offsets = getBoundingClientRect(offsetParent, true); | ||
offsets.x += offsetParent.clientLeft; | ||
@@ -580,6 +583,2 @@ offsets.y += offsetParent.clientTop; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var round = Math.round; | ||
// of the `<html>` and `<body>` rect bounds if horizontally scrollable | ||
@@ -656,3 +655,3 @@ | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -674,3 +673,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -1177,4 +1176,4 @@ } // Gets the maximum area that the element is visible in due to any number of | ||
return { | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
x: round(x * dpr) / dpr || 0, | ||
y: round(y * dpr) / dpr || 0 | ||
}; | ||
@@ -1194,3 +1193,4 @@ } | ||
adaptive = _ref2.adaptive, | ||
roundOffsets = _ref2.roundOffsets; | ||
roundOffsets = _ref2.roundOffsets, | ||
isFixed = _ref2.isFixed; | ||
@@ -1227,5 +1227,6 @@ var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
if (placement === top || (placement === left || placement === right) && variation === end) { | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
y -= offsetParent[heightProp] - popperRect.height; | ||
sideY = bottom; | ||
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] | ||
offsetParent[heightProp]; | ||
y -= offsetY - popperRect.height; | ||
y *= gpuAcceleration ? 1 : -1; | ||
@@ -1235,5 +1236,6 @@ } | ||
if (placement === left || (placement === top || placement === bottom) && variation === end) { | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
x -= offsetParent[widthProp] - popperRect.width; | ||
sideX = right; | ||
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] | ||
offsetParent[widthProp]; | ||
x -= offsetX - popperRect.width; | ||
x *= gpuAcceleration ? 1 : -1; | ||
@@ -1281,3 +1283,4 @@ } | ||
popperRect: state.rects.popper, | ||
gpuAcceleration: gpuAcceleration | ||
gpuAcceleration: gpuAcceleration, | ||
isFixed: state.options.strategy === 'fixed' | ||
}; | ||
@@ -1284,0 +1287,0 @@ |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e,t){return{width:(e=e.getBoundingClientRect()).width/1,height:e.height/1,top:e.top/1,right:e.right/1,bottom:e.bottom/1,left:e.left/1,x:e.left/1,y:e.top/1}}function o(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return{scrollLeft:(e=o(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof o(e).Element||e instanceof Element}function i(e){return e instanceof o(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof o(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return t(f(e)).left+n(e).scrollLeft}function p(e){return o(e).getComputedStyle(e)}function l(e){return e=p(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,a){void 0===a&&(a=!1);var p=i(r);i(r)&&r.getBoundingClientRect();var u=f(r);e=t(e);var d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(p||!p&&!a)&&(("body"!==s(r)||l(u))&&(d=r!==o(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:n(r)),i(r)?((h=t(r)).x+=r.clientLeft,h.y+=r.clientTop):u&&(h.x=c(u))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){var o=t(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(o.width-n)&&(n=o.width),1>=Math.abs(o.height-r)&&(r=o.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function h(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:m(h(e))}function g(e,t){var n;void 0===t&&(t=[]);var r=m(e);return e=r===(null==(n=e.ownerDocument)?void 0:n.body),n=o(r),r=e?[n].concat(n.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(g(h(r)))}function v(e){return i(e)&&"fixed"!==p(e).position?e.offsetParent:null}function b(e){for(var t=o(e),n=v(e);n&&0<=["table","td","th"].indexOf(s(n))&&"static"===p(n).position;)n=v(n);if(n&&("html"===s(n)||"body"===s(n)&&"static"===p(n).position))return t;if(!n)e:{if(n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!i(e)||"fixed"!==p(e).position)for(e=h(e);i(e)&&0>["html","body"].indexOf(s(e));){var r=p(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter){n=e;break e}e=e.parentNode}n=null}return n||t}function y(e){function t(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){n.has(e)||(e=o.get(e))&&t(e)})),r.push(e)}var o=new Map,n=new Set,r=[];return e.forEach((function(e){o.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(o){Promise.resolve().then((function(){t=void 0,o(e())}))}))),t}}function x(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O(e,r){if("viewport"===r){r=o(e);var a=f(e);r=r.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;r&&(s=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=x(e={width:s,height:a,x:l+c(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=n(u),r=null==(a=u.ownerDocument)?void 0:a.body,a=k(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=k(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-s.scrollLeft+c(u),s=-s.scrollTop,"rtl"===p(r||e).direction&&(u+=k(e.clientWidth,r?r.clientWidth:0)-a),e=x({width:a,height:l,x:u,y:s}));return e}function j(e,t,o){return t="clippingParents"===t?function(e){var t=g(h(e)),o=0<=["absolute","fixed"].indexOf(p(e).position)&&i(e)?b(e):e;return r(o)?t.filter((function(e){var t;if(t=r(e))e:if(t=o.getRootNode&&o.getRootNode(),e.contains(o))t=!0;else{if(t&&a(t)){t=o;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==s(e)})):[]}(e):[].concat(t),(o=(o=[].concat(t,[o])).reduce((function(t,o){return o=O(e,o),t.top=k(o.top,t.top),t.right=R(o.right,t.right),t.bottom=R(o.bottom,t.bottom),t.left=k(o.left,t.left),t}),O(e,o[0]))).width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function E(e){var t=e.reference,o=e.element,n=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-o.width/2,i=t.y+t.height/2-o.height/2;switch(n){case"top":r={x:r,y:t.y-o.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-o.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(i="y"===n?"height":"width",e){case"start":r[n]-=t[i]/2-o[i]/2;break;case"end":r[n]+=t[i]/2-o[i]/2}return r}function L(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function M(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?H:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},H,n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return i="function"==typeof i?i(s.options):i,a(),s.options=Object.assign({},n,s.options,i),s.scrollParents={reference:r(e)?g(e):e.contextElement?g(e.contextElement):[],popper:g(t)},i=function(e){var t=y(e);return T.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}(function(e){var t=e.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,o=e.options;o=void 0===o?{}:o,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:o}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(L(t,e=e.popper))for(s.rects={reference:u(t,b(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var o=s.orderedModifiers[t];e=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof e&&(s=e({state:s,options:n,name:o,instance:p})||s)}}},update:w((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return L(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function P(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,c=e.position,l=e.gpuAcceleration,u=e.adaptive;if(!0===(e=e.roundOffsets)){e=s.y;var d=window.devicePixelRatio||1;e={x:D(D(s.x*d)/d)||0,y:D(D(e*d)/d)||0}}else e="function"==typeof e?e(s):s;e=void 0===(e=(d=e).x)?0:e,d=void 0===(d=d.y)?0:d;var h=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var m,g="left",v="top",y=window;if(u){var w=b(n),x="clientHeight",O="clientWidth";w===o(n)&&("static"!==p(w=f(n)).position&&"absolute"===c&&(x="scrollHeight",O="scrollWidth")),"top"!==i&&("left"!==i&&"right"!==i||"end"!==a)||(v="bottom",d-=w[x]-r.height,d*=l?1:-1),"left"!==i&&("top"!==i&&"bottom"!==i||"end"!==a)||(g="right",e-=w[O]-r.width,e*=l?1:-1)}return n=Object.assign({position:c},u&&A),l?Object.assign({},n,((m={})[v]=s?"0":"",m[g]=h?"0":"",m.transform=1>=(y.devicePixelRatio||1)?"translate("+e+"px, "+d+"px)":"translate3d("+e+"px, "+d+"px, 0)",m)):Object.assign({},n,((t={})[v]=s?d+"px":"",t[g]=h?e+"px":"",t.transform="",t))}var W=["top","bottom","right","left"],T="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),k=Math.max,R=Math.min,D=Math.round,H={placement:"bottom",modifiers:[],strategy:"absolute"},S={passive:!0},A={top:"auto",right:"auto",bottom:"auto",left:"auto"},C=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=o(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,S)})),a&&s.addEventListener("resize",n.update,S),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,S)})),a&&s.removeEventListener("resize",n.update,S)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options;e=void 0===(e=o.gpuAcceleration)||e;var n=o.adaptive;n=void 0===n||n,o=void 0===(o=o.roundOffsets)||o,e={placement:t.placement.split("-")[0],variation:t.placement.split("-")[1],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,P(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,P(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},n=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,o),Object.keys(n).forEach((function(e){var t=n[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{}),i(n)&&s(n)&&(Object.assign(n.style,e),Object.keys(r).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]}],N=M({defaultModifiers:C});e.createPopper=N,e.defaultModifiers=C,e.detectOverflow=function(e,o){void 0===o&&(o={});var n=o;o=void 0===(o=n.placement)?e.placement:o;var i=n.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var c=n.altBoundary,p=void 0!==c&&c;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof n?n:function(e,t){return t.reduce((function(t,o){return t[o]=e,t}),{})}(n,W)),c=e.rects.popper,a=j(r(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||f(e.elements.popper),a,s),p=E({reference:s=t(e.elements.reference),element:c,strategy:"absolute",placement:o}),c=x(Object.assign({},c,p)),s="popper"===i?c:s;var l={top:a.top-s.top+n.top,bottom:s.bottom-a.bottom+n.bottom,left:a.left-s.left+n.left,right:s.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var u=e[o];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,o=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[o]*t}))}return l},e.popperGenerator=M,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return e instanceof t(e).Element||e instanceof Element}function n(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function i(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}function r(e,t){void 0===t&&(t=!1);var o=e.getBoundingClientRect(),i=1,r=1;return n(e)&&t&&(t=e.offsetHeight,0<(e=e.offsetWidth)&&(i=k(o.width)/e||1),0<t&&(r=k(o.height)/t||1)),{width:o.width/i,height:o.height/r,top:o.top/r,right:o.right/i,bottom:o.bottom/r,left:o.left/i,x:o.left/i,y:o.top/r}}function a(e){return{scrollLeft:(e=t(e)).pageXOffset,scrollTop:e.pageYOffset}}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((o(e)?e.ownerDocument:e.document)||window.document).documentElement}function c(e){return r(f(e)).left+a(e).scrollLeft}function p(e){return t(e).getComputedStyle(e)}function l(e){return e=p(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,o,i){void 0===i&&(i=!1);var p,u=n(o);if(p=n(o)){var d=o.getBoundingClientRect();p=k(d.width)/o.offsetWidth||1,d=k(d.height)/o.offsetHeight||1,p=1!==p||1!==d}d=p,p=f(o),e=r(e,d),d={scrollLeft:0,scrollTop:0};var h={x:0,y:0};return(u||!u&&!i)&&(("body"!==s(o)||l(p))&&(d=o!==t(o)&&n(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:a(o)),n(o)?((h=r(o,!0)).x+=o.clientLeft,h.y+=o.clientTop):p&&(h.x=c(p))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){var t=r(e),o=e.offsetWidth,n=e.offsetHeight;return 1>=Math.abs(t.width-o)&&(o=t.width),1>=Math.abs(t.height-n)&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:n}}function h(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(i(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:n(e)&&l(e)?e:m(h(e))}function g(e,o){var n;void 0===o&&(o=[]);var i=m(e);return e=i===(null==(n=e.ownerDocument)?void 0:n.body),n=t(i),i=e?[n].concat(n.visualViewport||[],l(i)?i:[]):i,o=o.concat(i),e?o:o.concat(g(h(i)))}function v(e){return n(e)&&"fixed"!==p(e).position?e.offsetParent:null}function b(e){for(var o=t(e),i=v(e);i&&0<=["table","td","th"].indexOf(s(i))&&"static"===p(i).position;)i=v(i);if(i&&("html"===s(i)||"body"===s(i)&&"static"===p(i).position))return o;if(!i)e:{if(i=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!n(e)||"fixed"!==p(e).position)for(e=h(e);n(e)&&0>["html","body"].indexOf(s(e));){var r=p(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||i&&"filter"===r.willChange||i&&r.filter&&"none"!==r.filter){i=e;break e}e=e.parentNode}i=null}return i||o}function y(e){function t(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){n.has(e)||(e=o.get(e))&&t(e)})),i.push(e)}var o=new Map,n=new Set,i=[];return e.forEach((function(e){o.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||t(e)})),i}function w(e){var t;return function(){return t||(t=new Promise((function(o){Promise.resolve().then((function(){t=void 0,o(e())}))}))),t}}function x(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O(e,n){if("viewport"===n){n=t(e);var i=f(e);n=n.visualViewport;var s=i.clientWidth;i=i.clientHeight;var l=0,u=0;n&&(s=n.width,i=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=n.offsetLeft,u=n.offsetTop)),e=x(e={width:s,height:i,x:l+c(e),y:u})}else o(n)?((e=r(n)).top+=n.clientTop,e.left+=n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=a(u),n=null==(i=u.ownerDocument)?void 0:i.body,i=P(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=P(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-s.scrollLeft+c(u),s=-s.scrollTop,"rtl"===p(n||e).direction&&(u+=P(e.clientWidth,n?n.clientWidth:0)-i),e=x({width:i,height:l,x:u,y:s}));return e}function j(e,t,r){return t="clippingParents"===t?function(e){var t=g(h(e)),r=0<=["absolute","fixed"].indexOf(p(e).position),a=r&&n(e)?b(e):e;return o(a)?t.filter((function(e){var t;if(t=o(e))e:if(t=a.getRootNode&&a.getRootNode(),e.contains(a))t=!0;else{if(t&&i(t)){t=a;do{if(t&&e.isSameNode(t)){t=!0;break e}t=t.parentNode||t.host}while(t)}t=!1}return t&&"body"!==s(e)&&(!r||"static"!==p(e).position)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,o){return o=O(e,o),t.top=P(o.top,t.top),t.right=T(o.right,t.right),t.bottom=T(o.bottom,t.bottom),t.left=P(o.left,t.left),t}),O(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function E(e){var t=e.reference,o=e.element,n=(e=e.placement)?e.split("-")[0]:null;e=e?e.split("-")[1]:null;var i=t.x+t.width/2-o.width/2,r=t.y+t.height/2-o.height/2;switch(n){case"top":i={x:i,y:t.y-o.height};break;case"bottom":i={x:i,y:t.y+t.height};break;case"right":i={x:t.x+t.width,y:r};break;case"left":i={x:t.x-o.width,y:r};break;default:i={x:t.x,y:t.y}}if(null!=(n=n?0<=["top","bottom"].indexOf(n)?"x":"y":null))switch(r="y"===n?"height":"width",e){case"start":i[n]-=t[r]/2-o[r]/2;break;case"end":i[n]+=t[r]/2-o[r]/2}return i}function L(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function M(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,i=void 0===(e=e.defaultOptions)?D:e;return function(e,t,r){function a(){f.forEach((function(e){return e()})),f=[]}void 0===r&&(r=i);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},D,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(r){return r="function"==typeof r?r(s.options):r,a(),s.options=Object.assign({},i,s.options,r),s.scrollParents={reference:o(e)?g(e):e.contextElement?g(e.contextElement):[],popper:g(t)},r=function(e){var t=y(e);return R.reduce((function(e,o){return e.concat(t.filter((function(e){return e.phase===o})))}),[])}(function(e){var t=e.reduce((function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=r.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,o=e.options;o=void 0===o?{}:o,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:o}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(L(t,e=e.popper))for(s.rects={reference:u(t,b(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var o=s.orderedModifiers[t];e=o.fn;var n=o.options;n=void 0===n?{}:n,o=o.name,"function"==typeof e&&(s=e({state:s,options:n,name:o,instance:p})||s)}}},update:w((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return L(e,t)?(p.setOptions(r).then((function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)})),p):p}}function W(e){var o,n=e.popper,i=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,c=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets;if(e=e.isFixed,!0===d){d=s.y;var h=window.devicePixelRatio||1;d={x:k(s.x*h)/h||0,y:k(d*h)/h||0}}else d="function"==typeof d?d(s):s;d=void 0===(d=(h=d).x)?0:d,h=void 0===(h=h.y)?0:h;var m=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var g,v="left",y="top",w=window;if(u){var x=b(n),O="clientHeight",j="clientWidth";x===t(n)&&("static"!==p(x=f(n)).position&&"absolute"===c&&(O="scrollHeight",j="scrollWidth")),"top"!==r&&("left"!==r&&"right"!==r||"end"!==a)||(y="bottom",h-=(e&&w.visualViewport?w.visualViewport.height:x[O])-i.height,h*=l?1:-1),"left"!==r&&("top"!==r&&"bottom"!==r||"end"!==a)||(v="right",d-=(e&&w.visualViewport?w.visualViewport.width:x[j])-i.width,d*=l?1:-1)}return n=Object.assign({position:c},u&&A),l?Object.assign({},n,((g={})[y]=s?"0":"",g[v]=m?"0":"",g.transform=1>=(w.devicePixelRatio||1)?"translate("+d+"px, "+h+"px)":"translate3d("+d+"px, "+h+"px, 0)",g)):Object.assign({},n,((o={})[y]=s?h+"px":"",o[v]=m?d+"px":"",o.transform="",o))}var P=Math.max,T=Math.min,k=Math.round,H=["top","bottom","right","left"],R="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),D={placement:"bottom",modifiers:[],strategy:"absolute"},S={passive:!0},A={top:"auto",right:"auto",bottom:"auto",left:"auto"},C=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var o=e.state,n=e.instance,i=(e=e.options).scroll,r=void 0===i||i,a=void 0===(e=e.resize)||e,s=t(o.elements.popper),f=[].concat(o.scrollParents.reference,o.scrollParents.popper);return r&&f.forEach((function(e){e.addEventListener("scroll",n.update,S)})),a&&s.addEventListener("resize",n.update,S),function(){r&&f.forEach((function(e){e.removeEventListener("scroll",n.update,S)})),a&&s.removeEventListener("resize",n.update,S)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options;e=void 0===(e=o.gpuAcceleration)||e;var n=o.adaptive;n=void 0===n||n,o=void 0===(o=o.roundOffsets)||o,e={placement:t.placement.split("-")[0],variation:t.placement.split("-")[1],popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e,isFixed:"fixed"===t.options.strategy},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,W(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,W(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var o=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];n(r)&&s(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:o[e]).reduce((function(e,t){return e[t]="",e}),{}),n(i)&&s(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]}],N=M({defaultModifiers:C});e.createPopper=N,e.defaultModifiers=C,e.detectOverflow=function(e,t){void 0===t&&(t={});var n=t;t=void 0===(t=n.placement)?e.placement:t;var i=n.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var c=n.altBoundary,p=void 0!==c&&c;n=void 0===(n=n.padding)?0:n,n=Object.assign({},{top:0,right:0,bottom:0,left:0},"number"!=typeof n?n:function(e,t){return t.reduce((function(t,o){return t[o]=e,t}),{})}(n,H)),c=e.rects.popper,a=j(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||f(e.elements.popper),a,s),p=E({reference:s=r(e.elements.reference),element:c,strategy:"absolute",placement:t}),c=x(Object.assign({},c,p)),s="popper"===i?c:s;var l={top:a.top-s.top+n.top,bottom:s.bottom-a.bottom+n.bottom,left:a.left-s.left+n.left,right:s.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var u=e[t];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,o=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[o]*t}))}return l},e.popperGenerator=M,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper-lite.min.js.map |
/** | ||
* @popperjs/core v2.10.2 - MIT License | ||
* @popperjs/core v2.11.0 - MIT License | ||
*/ | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e,t){return{width:(e=e.getBoundingClientRect()).width/1,height:e.height/1,top:e.top/1,right:e.right/1,bottom:e.bottom/1,left:e.left/1,x:e.left/1,y:e.top/1}}function n(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof n(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return t(f(e)).left+o(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,a){void 0===a&&(a=!1);var c=i(r);i(r)&&r.getBoundingClientRect();var u=f(r);e=t(e);var d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(c||!c&&!a)&&(("body"!==s(r)||l(u))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((m=t(r)).x+=r.clientLeft,m.y+=r.clientTop):u&&(m.x=p(u))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function d(e){var n=t(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(n.width-o)&&(o=n.width),1>=Math.abs(n.height-r)&&(r=n.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function m(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:h(m(e))}function v(e,t){var o;void 0===t&&(t=[]);var r=h(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=n(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(v(m(r)))}function g(e){return i(e)&&"fixed"!==c(e).position?e.offsetParent:null}function b(e){for(var t=n(e),o=g(e);o&&0<=["table","td","th"].indexOf(s(o))&&"static"===c(o).position;)o=g(o);if(o&&("html"===s(o)||"body"===s(o)&&"static"===c(o).position))return t;if(!o)e:{if(o=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!i(e)||"fixed"!==c(e).position)for(e=m(e);i(e)&&0>["html","body"].indexOf(s(e));){var r=c(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||o&&"filter"===r.willChange||o&&r.filter&&"none"!==r.filter){o=e;break e}e=e.parentNode}o=null}return o||t}function y(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,r){if("viewport"===r){r=n(e);var a=f(e);r=r.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;r&&(s=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=j(e={width:s,height:a,x:l+p(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=o(u),r=null==(a=u.ownerDocument)?void 0:a.body,a=U(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=U(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(r||e).direction&&(u+=U(e.clientWidth,r?r.clientWidth:0)-a),e=j({width:a,height:l,x:u,y:s}));return e}function D(e,t,n){return t="clippingParents"===t?function(e){var t=v(m(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?b(e):e;return r(n)?t.filter((function(e){return r(e)&&O(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=E(e,n),t.top=U(n.top,t.top),t.right=z(n.right,t.right),t.bottom=z(n.bottom,t.bottom),t.left=U(n.left,t.left),t}),E(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function L(e){return e.split("-")[1]}function P(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function M(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?L(e):null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?P(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function k(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function A(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function B(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var p=o.altBoundary,c=void 0!==p&&p;o=k("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:A(o,N)),p=e.rects.popper,a=D(r(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||f(e.elements.popper),a,s),c=M({reference:s=t(e.elements.reference),element:p,strategy:"absolute",placement:n}),p=j(Object.assign({},p,c)),s="popper"===i?p:s;var l={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var u=e[n];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[n]*t}))}return l}function W(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function T(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=void 0===(e=e.defaultOptions)?X:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=o);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},X,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return i="function"==typeof i?i(s.options):i,a(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:r(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=y(e);return _.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(W(t,e=e.popper))for(s.rects={reference:u(t,b(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:c})||s)}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return W(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),c):c}}function R(e){var t,o=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,p=e.position,l=e.gpuAcceleration,u=e.adaptive;if(!0===(e=e.roundOffsets)){e=s.y;var d=window.devicePixelRatio||1;e={x:F(F(s.x*d)/d)||0,y:F(F(e*d)/d)||0}}else e="function"==typeof e?e(s):s;e=void 0===(e=(d=e).x)?0:e,d=void 0===(d=d.y)?0:d;var m=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var h,v="left",g="top",y=window;if(u){var w=b(o),x="clientHeight",O="clientWidth";w===n(o)&&("static"!==c(w=f(o)).position&&"absolute"===p&&(x="scrollHeight",O="scrollWidth")),"top"!==i&&("left"!==i&&"right"!==i||"end"!==a)||(g="bottom",d-=w[x]-r.height,d*=l?1:-1),"left"!==i&&("top"!==i&&"bottom"!==i||"end"!==a)||(v="right",e-=w[O]-r.width,e*=l?1:-1)}return o=Object.assign({position:p},u&&K),l?Object.assign({},o,((h={})[g]=s?"0":"",h[v]=m?"0":"",h.transform=1>=(y.devicePixelRatio||1)?"translate("+e+"px, "+d+"px)":"translate3d("+e+"px, "+d+"px, 0)",h)):Object.assign({},o,((t={})[g]=s?d+"px":"",t[v]=m?e+"px":"",t.transform="",t))}function H(e){return e.replace(/left|right|bottom|top/g,(function(e){return ee[e]}))}function S(e){return e.replace(/start|end/g,(function(e){return te[e]}))}function C(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var N=["top","bottom","right","left"],V=N.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),I=[].concat(N,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),_="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),U=Math.max,z=Math.min,F=Math.round,X={placement:"bottom",modifiers:[],strategy:"absolute"},Y={passive:!0},G={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,Y)})),a&&s.addEventListener("resize",o.update,Y),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,Y)})),a&&s.removeEventListener("resize",o.update,Y)}},data:{}},J={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=M({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},K={top:"auto",right:"auto",bottom:"auto",left:"auto"},Q={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),variation:L(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,R(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,R(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Z={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},r=t.elements[e];i(r)&&s(r)&&(Object.assign(r.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],r=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(o)&&s(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},$={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=I.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e}},ee={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"},ne={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=H(e);return[S(e),t,S(t)]}(n):[H(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?I:a,f=L(t.placement);0===(i=(t=f?i?V:V.filter((function(e){return L(e)===f})):N).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=B(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;c=!0;for(var h=d[0],v=0;v<d.length;v++){var g=d[v],b=x(g),y="start"===L(g),w=0<=["top","bottom"].indexOf(b),O=w?"width":"height",j=B(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(y=w?y?"right":"left":y?"bottom":"top",n[O]>i[O]&&(y=H(y)),O=H(y),w=[],o&&w.push(0>=j[b]),r&&w.push(0>=j[y],0>=j[O]),w.every((function(e){return e}))){h=g,c=!1;break}m.set(g,w)}if(c)for(o=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},r=l?3:1;0<r&&"break"!==o(r);r--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},oe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var o=n.mainAxis,r=void 0===o||o,i=void 0!==(o=n.altAxis)&&o;o=void 0===(o=n.tether)||o;var a=n.tetherOffset,s=void 0===a?0:a,f=B(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=x(t.placement);var p=L(t.placement),c=!p,l=P(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},a){if(r||i){var v="y"===l?"top":"left",g="y"===l?"bottom":"right",y="y"===l?"height":"width",w=a[l],O=a[l]+f[v],j=a[l]-f[g],E=o?-m[y]/2:0,D="start"===p?u[y]:m[y];p="start"===p?-m[y]:-u[y],m=t.elements.arrow,m=o&&m?d(m):{width:0,height:0};var M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=M[v],g=M[g],m=U(0,z(u[y],m[y])),D=c?u[y]/2-E-m-v-h:D-m-v-h,u=c?-u[y]/2+E+m+g+h:p+m+g+h,c=t.elements.arrow&&b(t.elements.arrow),h=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,c=a[l]+D-h-(c?"y"===l?c.clientTop||0:c.clientLeft||0:0),u=a[l]+u-h,r&&(r=o?z(O,c):O,j=o?U(j,u):j,r=U(r,z(w,j)),a[l]=r,s[l]=r-w),i&&(r=(i=a[n])+f["x"===l?"top":"left"],f=i-f["x"===l?"bottom":"right"],r=o?z(r,c):r,o=o?U(f,u):f,o=U(r,z(i,o)),a[n]=o,s[n]=o-i)}t.modifiersData[e]=s}},requiresIfExists:["offset"]},re={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=x(n.placement);if(e=P(s),s=0<=["left","right"].indexOf(s)?"height":"width",i&&a){r=k("number"!=typeof(r="function"==typeof(r=r.padding)?r(Object.assign({},n.rects,{placement:n.placement})):r)?r:A(r,N));var f=d(i),p="y"===e?"top":"left",c="y"===e?"bottom":"right",l=n.rects.reference[s]+n.rects.reference[e]-a[e]-n.rects.popper[s];a=a[e]-n.rects.reference[e],a=(i=(i=b(i))?"y"===e?i.clientHeight||0:i.clientWidth||0:0)/2-f[s]/2+(l/2-a/2),s=U(r[p],z(a,i-f[s]-r[c])),n.modifiersData[o]=((t={})[e]=s,t.centerOffset=s-a,t)}},effect:function(e){var t=e.state;if(null!=(e=void 0===(e=e.options.element)?"[data-popper-arrow]":e)){if("string"==typeof e&&!(e=t.elements.popper.querySelector(e)))return;O(t.elements.popper,e)&&(t.elements.arrow=e)}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ie={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,i=B(t,{elementContext:"reference"}),a=B(t,{altBoundary:!0});n=C(i,n),o=C(a,o,r),r=q(n),a=q(o),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}},ae=T({defaultModifiers:[G,J,Q,Z]}),se=[G,J,Q,Z,$,ne,oe,re,ie],fe=T({defaultModifiers:se});e.applyStyles=Z,e.arrow=re,e.computeStyles=Q,e.createPopper=fe,e.createPopperLite=ae,e.defaultModifiers=se,e.detectOverflow=B,e.eventListeners=G,e.flip=ne,e.hide=ie,e.offset=$,e.popperGenerator=T,e.popperOffsets=J,e.preventOverflow=oe,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return e instanceof t(e).Element||e instanceof Element}function o(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function r(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}function i(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return o(e)&&t&&(t=e.offsetHeight,0<(e=e.offsetWidth)&&(r=I(n.width)/e||1),0<t&&(i=I(n.height)/t||1)),{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function a(e){return{scrollLeft:(e=t(e)).pageXOffset,scrollTop:e.pageYOffset}}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return i(f(e)).left+a(e).scrollLeft}function c(e){return t(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,n,r){void 0===r&&(r=!1);var c,u=o(n);if(c=o(n)){var d=n.getBoundingClientRect();c=I(d.width)/n.offsetWidth||1,d=I(d.height)/n.offsetHeight||1,c=1!==c||1!==d}d=c,c=f(n),e=i(e,d),d={scrollLeft:0,scrollTop:0};var h={x:0,y:0};return(u||!u&&!r)&&(("body"!==s(n)||l(c))&&(d=n!==t(n)&&o(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:a(n)),o(n)?((h=i(n,!0)).x+=n.clientLeft,h.y+=n.clientTop):c&&(h.x=p(c))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){var t=i(e),n=e.offsetWidth,o=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function h(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:o(e)&&l(e)?e:m(h(e))}function v(e,n){var o;void 0===n&&(n=[]);var r=m(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=t(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,n=n.concat(r),e?n:n.concat(v(h(r)))}function g(e){return o(e)&&"fixed"!==c(e).position?e.offsetParent:null}function y(e){for(var n=t(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===c(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===c(r).position))return n;if(!r)e:{if(r=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!o(e)||"fixed"!==c(e).position)for(e=h(e);o(e)&&0>["html","body"].indexOf(s(e));){var i=c(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||r&&"filter"===i.willChange||r&&i.filter&&"none"!==i.filter){r=e;break e}e=e.parentNode}r=null}return r||n}function b(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&r(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,o){if("viewport"===o){o=t(e);var r=f(e);o=o.visualViewport;var s=r.clientWidth;r=r.clientHeight;var l=0,u=0;o&&(s=o.width,r=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=j(e={width:s,height:r,x:l+p(e),y:u})}else n(o)?((e=i(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=a(u),o=null==(r=u.ownerDocument)?void 0:r.body,r=V(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=V(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(o||e).direction&&(u+=V(e.clientWidth,o?o.clientWidth:0)-r),e=j({width:r,height:l,x:u,y:s}));return e}function D(e,t,r){return t="clippingParents"===t?function(e){var t=v(h(e)),r=0<=["absolute","fixed"].indexOf(c(e).position),i=r&&o(e)?y(e):e;return n(i)?t.filter((function(e){return n(e)&&O(e,i)&&"body"!==s(e)&&(!r||"static"!==c(e).position)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,n){return n=E(e,n),t.top=V(n.top,t.top),t.right=N(n.right,t.right),t.bottom=N(n.bottom,t.bottom),t.left=V(n.left,t.left),t}),E(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function A(e){return e.split("-")[1]}function L(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?A(e):null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?L(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function M(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function k(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function W(e,t){void 0===t&&(t={});var o=t;t=void 0===(t=o.placement)?e.placement:t;var r=o.boundary,a=void 0===r?"clippingParents":r,s=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var p=o.altBoundary,c=void 0!==p&&p;o=M("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:k(o,_)),p=e.rects.popper,a=D(n(c=e.elements[c?"popper"===r?"reference":"popper":r])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=i(e.elements.reference),element:p,strategy:"absolute",placement:t}),p=j(Object.assign({},p,c)),s="popper"===r?p:s;var l={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===r&&e){var u=e[t];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[n]*t}))}return l}function B(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function H(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?X:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},X,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return i="function"==typeof i?i(s.options):i,a(),s.options=Object.assign({},r,s.options,i),s.scrollParents={reference:n(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=b(e);return z.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}))})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(B(t,e=e.popper))for(s.rects={reference:u(t,y(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:c})||s)}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s)}))})),destroy:function(){a(),p=!0}};return B(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e)})),c):c}}function T(e){var n,o=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,p=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets;if(e=e.isFixed,!0===d){d=s.y;var h=window.devicePixelRatio||1;d={x:I(s.x*h)/h||0,y:I(d*h)/h||0}}else d="function"==typeof d?d(s):s;d=void 0===(d=(h=d).x)?0:d,h=void 0===(h=h.y)?0:h;var m=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var v,g="left",b="top",w=window;if(u){var x=y(o),O="clientHeight",j="clientWidth";x===t(o)&&("static"!==c(x=f(o)).position&&"absolute"===p&&(O="scrollHeight",j="scrollWidth")),"top"!==i&&("left"!==i&&"right"!==i||"end"!==a)||(b="bottom",h-=(e&&w.visualViewport?w.visualViewport.height:x[O])-r.height,h*=l?1:-1),"left"!==i&&("top"!==i&&"bottom"!==i||"end"!==a)||(g="right",d-=(e&&w.visualViewport?w.visualViewport.width:x[j])-r.width,d*=l?1:-1)}return o=Object.assign({position:p},u&&K),l?Object.assign({},o,((v={})[b]=s?"0":"",v[g]=m?"0":"",v.transform=1>=(w.devicePixelRatio||1)?"translate("+d+"px, "+h+"px)":"translate3d("+d+"px, "+h+"px, 0)",v)):Object.assign({},o,((n={})[b]=s?h+"px":"",n[g]=m?d+"px":"",n.transform="",n))}function R(e){return e.replace(/left|right|bottom|top/g,(function(e){return ee[e]}))}function S(e){return e.replace(/start|end/g,(function(e){return te[e]}))}function C(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var V=Math.max,N=Math.min,I=Math.round,_=["top","bottom","right","left"],F=_.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),U=[].concat(_,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),z="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),X={placement:"bottom",modifiers:[],strategy:"absolute"},Y={passive:!0},G={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=t(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,Y)})),a&&s.addEventListener("resize",o.update,Y),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,Y)})),a&&s.removeEventListener("resize",o.update,Y)}},data:{}},J={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=P({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},K={top:"auto",right:"auto",bottom:"auto",left:"auto"},Q={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),variation:A(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e,isFixed:"fixed"===t.options.strategy},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,T(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,T(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Z={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];o(i)&&s(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),o(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},$={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=U.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e}},ee={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"},ne={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=R(e);return[S(e),t,S(t)]}(n):[R(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?U:a,f=A(t.placement);0===(i=(t=f?i?F:F.filter((function(e){return A(e)===f})):_).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=W(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var h=new Map;c=!0;for(var m=d[0],v=0;v<d.length;v++){var g=d[v],y=x(g),b="start"===A(g),w=0<=["top","bottom"].indexOf(y),O=w?"width":"height",j=W(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(b=w?b?"right":"left":b?"bottom":"top",n[O]>i[O]&&(b=R(b)),O=R(b),w=[],o&&w.push(0>=j[y]),r&&w.push(0>=j[b],0>=j[O]),w.every((function(e){return e}))){m=g,c=!1;break}h.set(g,w)}if(c)for(o=function(e){var t=d.find((function(t){if(t=h.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return m=t,"break"},r=l?3:1;0<r&&"break"!==o(r);r--);t.placement!==m&&(t.modifiersData[e]._skip=!0,t.placement=m,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},oe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var o=n.mainAxis,r=void 0===o||o,i=void 0!==(o=n.altAxis)&&o,a=void 0===(o=n.tether)||o,s=void 0===(o=n.tetherOffset)?0:o,f=W(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),p=x(t.placement),c=A(t.placement),l=!c,u=L(p);n="x"===u?"y":"x",o=t.modifiersData.popperOffsets;var h=t.rects.reference,m=t.rects.popper,v="number"==typeof(s="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s)?{mainAxis:s,altAxis:s}:Object.assign({mainAxis:0,altAxis:0},s),g=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null;if(s={x:0,y:0},o){if(r){var b,w="y"===u?"top":"left",O="y"===u?"bottom":"right",j="y"===u?"height":"width",E=(r=o[u])+f[w],D=r-f[O],P=a?-m[j]/2:0,M="start"===c?h[j]:m[j];c="start"===c?-m[j]:-h[j];var k=t.elements.arrow;k=a&&k?d(k):{width:0,height:0};var B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};w=B[w],O=B[O],k=V(0,N(h[j],k[j])),M=l?h[j]/2-P-k-w-v.mainAxis:M-k-w-v.mainAxis,l=l?-h[j]/2+P+k+O+v.mainAxis:c+k+O+v.mainAxis,j=(j=t.elements.arrow&&y(t.elements.arrow))?"y"===u?j.clientTop||0:j.clientLeft||0:0,P=null!=(b=null==g?void 0:g[u])?b:0,b=r+l-P,E=a?N(E,r+M-P-j):E,b=a?V(D,b):D,b=V(E,N(r,b)),o[u]=b,s[u]=b-r}var H;if(i)r="y"===n?"height":"width",b=(i=o[n])+f["x"===u?"top":"left"],f=i-f["x"===u?"bottom":"right"],p=-1!==["top","left"].indexOf(p),u=null!=(H=null==g?void 0:g[n])?H:0,H=p?b:i-h[r]-m[r]-u+v.altAxis,h=p?i+h[r]+m[r]-u-v.altAxis:f,a&&p?H=(H=V(H,N(i,h)))>h?h:H:H=V(a?H:b,N(i,a?h:f)),o[n]=H,s[n]=H-i;t.modifiersData[e]=s}},requiresIfExists:["offset"]},re={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=x(n.placement);if(e=L(s),s=0<=["left","right"].indexOf(s)?"height":"width",i&&a){r=M("number"!=typeof(r="function"==typeof(r=r.padding)?r(Object.assign({},n.rects,{placement:n.placement})):r)?r:k(r,_));var f=d(i),p="y"===e?"top":"left",c="y"===e?"bottom":"right",l=n.rects.reference[s]+n.rects.reference[e]-a[e]-n.rects.popper[s];a=a[e]-n.rects.reference[e],a=(i=(i=y(i))?"y"===e?i.clientHeight||0:i.clientWidth||0:0)/2-f[s]/2+(l/2-a/2),s=V(r[p],N(a,i-f[s]-r[c])),n.modifiersData[o]=((t={})[e]=s,t.centerOffset=s-a,t)}},effect:function(e){var t=e.state;if(null!=(e=void 0===(e=e.options.element)?"[data-popper-arrow]":e)){if("string"==typeof e&&!(e=t.elements.popper.querySelector(e)))return;O(t.elements.popper,e)&&(t.elements.arrow=e)}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ie={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,i=W(t,{elementContext:"reference"}),a=W(t,{altBoundary:!0});n=C(i,n),o=C(a,o,r),r=q(n),a=q(o),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a})}},ae=H({defaultModifiers:[G,J,Q,Z]}),se=[G,J,Q,Z,$,ne,oe,re,ie],fe=H({defaultModifiers:se});e.applyStyles=Z,e.arrow=re,e.computeStyles=Q,e.createPopper=fe,e.createPopperLite=ae,e.defaultModifiers=se,e.detectOverflow=W,e.eventListeners=G,e.flip=ne,e.hide=ie,e.offset=$,e.popperGenerator=H,e.popperOffsets=J,e.preventOverflow=oe,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=popper.min.js.map |
import type { ClientRectObject, VirtualElement } from "../types"; | ||
export default function getBoundingClientRect(element: Element | VirtualElement, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale?: boolean): ClientRectObject; | ||
export default function getBoundingClientRect(element: Element | VirtualElement, includeScale?: boolean): ClientRectObject; |
@@ -1,4 +0,4 @@ | ||
// import { isHTMLElement } from './instanceOf'; | ||
export default function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars | ||
includeScale) { | ||
import { isHTMLElement } from "./instanceOf.js"; | ||
import { round } from "../utils/math.js"; | ||
export default function getBoundingClientRect(element, includeScale) { | ||
if (includeScale === void 0) { | ||
@@ -10,20 +10,18 @@ includeScale = false; | ||
var scaleX = 1; | ||
var scaleY = 1; // FIXME: | ||
// `offsetWidth` returns an integer while `getBoundingClientRect` | ||
// returns a float. This results in `scaleX` or `scaleY` being | ||
// non-1 when it should be for elements that aren't a full pixel in | ||
// width or height. | ||
// if (isHTMLElement(element) && includeScale) { | ||
// const offsetHeight = element.offsetHeight; | ||
// const offsetWidth = element.offsetWidth; | ||
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// // Fallback to 1 in case both values are `0` | ||
// if (offsetWidth > 0) { | ||
// scaleX = rect.width / offsetWidth || 1; | ||
// } | ||
// if (offsetHeight > 0) { | ||
// scaleY = rect.height / offsetHeight || 1; | ||
// } | ||
// } | ||
var scaleY = 1; | ||
if (isHTMLElement(element) && includeScale) { | ||
var offsetHeight = element.offsetHeight; | ||
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale | ||
// Fallback to 1 in case both values are `0` | ||
if (offsetWidth > 0) { | ||
scaleX = round(rect.width) / offsetWidth || 1; | ||
} | ||
if (offsetHeight > 0) { | ||
scaleY = round(rect.height) / offsetHeight || 1; | ||
} | ||
} | ||
return { | ||
@@ -30,0 +28,0 @@ width: rect.width / scaleX, |
@@ -30,3 +30,3 @@ import { viewport } from "../enums.js"; | ||
function getClientRectFromMixedType(element, clippingParent) { | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); | ||
} // A "clipping parent" is an overflowable container with the characteristic of | ||
@@ -48,3 +48,3 @@ // clipping (or hiding) overflowing elements with a position different from | ||
return clippingParents.filter(function (clippingParent) { | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; | ||
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body' && (canEscapeClipping ? getComputedStyle(clippingParent).position !== 'static' : true); | ||
}); | ||
@@ -51,0 +51,0 @@ } // Gets the maximum area that the element is visible in due to any number of |
@@ -8,7 +8,8 @@ import getBoundingClientRect from "./getBoundingClientRect.js"; | ||
import isScrollParent from "./isScrollParent.js"; | ||
import { round } from "../utils/math.js"; | ||
function isElementScaled(element) { | ||
var rect = element.getBoundingClientRect(); | ||
var scaleX = rect.width / element.offsetWidth || 1; | ||
var scaleY = rect.height / element.offsetHeight || 1; | ||
var scaleX = round(rect.width) / element.offsetWidth || 1; | ||
var scaleY = round(rect.height) / element.offsetHeight || 1; | ||
return scaleX !== 1 || scaleY !== 1; | ||
@@ -15,0 +16,0 @@ } // Returns the composite rect of an element relative to its offsetParent. |
@@ -13,3 +13,3 @@ export declare const top: "top"; | ||
export declare const viewport: "viewport"; | ||
export declare type Boundary = HTMLElement | Array<HTMLElement> | typeof clippingParents; | ||
export declare type Boundary = Element | Array<Element> | typeof clippingParents; | ||
export declare type RootBoundary = typeof viewport | "document"; | ||
@@ -16,0 +16,0 @@ export declare const popper: "popper"; |
@@ -6,3 +6,3 @@ import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import getMainAxisFromPlacement from "../utils/getMainAxisFromPlacement.js"; | ||
import within from "../utils/within.js"; | ||
import { within } from "../utils/within.js"; | ||
import mergePaddingObject from "../utils/mergePaddingObject.js"; | ||
@@ -9,0 +9,0 @@ import expandToHashMap from "../utils/expandToHashMap.js"; |
@@ -13,3 +13,3 @@ import type { PositioningStrategy, Offsets, Modifier, Rect } from "../types"; | ||
}; | ||
export declare function mapToStyles({ popper, popperRect, placement, variation, offsets, position, gpuAcceleration, adaptive, roundOffsets }: { | ||
export declare function mapToStyles({ popper, popperRect, placement, variation, offsets, position, gpuAcceleration, adaptive, roundOffsets, isFixed }: { | ||
popper: HTMLElement; | ||
@@ -28,2 +28,3 @@ popperRect: Rect; | ||
roundOffsets: boolean | RoundOffsets; | ||
isFixed: boolean; | ||
}): { | ||
@@ -30,0 +31,0 @@ transform: string; |
@@ -25,4 +25,4 @@ import { top, left, right, bottom, end } from "../enums.js"; | ||
return { | ||
x: round(round(x * dpr) / dpr) || 0, | ||
y: round(round(y * dpr) / dpr) || 0 | ||
x: round(x * dpr) / dpr || 0, | ||
y: round(y * dpr) / dpr || 0 | ||
}; | ||
@@ -42,3 +42,4 @@ } | ||
adaptive = _ref2.adaptive, | ||
roundOffsets = _ref2.roundOffsets; | ||
roundOffsets = _ref2.roundOffsets, | ||
isFixed = _ref2.isFixed; | ||
@@ -75,5 +76,6 @@ var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, | ||
if (placement === top || (placement === left || placement === right) && variation === end) { | ||
sideY = bottom; // $FlowFixMe[prop-missing] | ||
y -= offsetParent[heightProp] - popperRect.height; | ||
sideY = bottom; | ||
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing] | ||
offsetParent[heightProp]; | ||
y -= offsetY - popperRect.height; | ||
y *= gpuAcceleration ? 1 : -1; | ||
@@ -83,5 +85,6 @@ } | ||
if (placement === left || (placement === top || placement === bottom) && variation === end) { | ||
sideX = right; // $FlowFixMe[prop-missing] | ||
x -= offsetParent[widthProp] - popperRect.width; | ||
sideX = right; | ||
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing] | ||
offsetParent[widthProp]; | ||
x -= offsetX - popperRect.width; | ||
x *= gpuAcceleration ? 1 : -1; | ||
@@ -129,3 +132,4 @@ } | ||
popperRect: state.rects.popper, | ||
gpuAcceleration: gpuAcceleration | ||
gpuAcceleration: gpuAcceleration, | ||
isFixed: state.options.strategy === 'fixed' | ||
}; | ||
@@ -132,0 +136,0 @@ |
import type { Placement } from "../enums"; | ||
import type { Modifier, Rect, Offsets } from "../types"; | ||
declare type OffsetsFunction = (arg0: { | ||
export declare type OffsetsFunction = (arg0: { | ||
popper: Rect; | ||
@@ -5,0 +5,0 @@ reference: Rect; |
import getBasePlacement from "../utils/getBasePlacement.js"; | ||
import { top, left, right, placements } from "../enums.js"; | ||
import { top, left, right, placements } from "../enums.js"; // eslint-disable-next-line import/no-unused-modules | ||
export function distanceAndSkiddingToXY(placement, rects, offset) { | ||
@@ -4,0 +5,0 @@ var basePlacement = getBasePlacement(placement); |
@@ -7,3 +7,9 @@ import type { Placement, Boundary, RootBoundary } from "../enums"; | ||
placement: Placement; | ||
}) => number) | number; | ||
}) => number | { | ||
mainAxis: number; | ||
altAxis: number; | ||
}) | number | { | ||
mainAxis: number; | ||
altAxis: number; | ||
}; | ||
export declare type Options = { | ||
@@ -10,0 +16,0 @@ mainAxis: boolean; |
@@ -5,3 +5,3 @@ import { top, left, right, bottom, start } from "../enums.js"; | ||
import getAltAxis from "../utils/getAltAxis.js"; | ||
import within from "../utils/within.js"; | ||
import { within, withinMaxClamp } from "../utils/within.js"; | ||
import getLayoutRect from "../dom-utils/getLayoutRect.js"; | ||
@@ -12,3 +12,3 @@ import getOffsetParent from "../dom-utils/getOffsetParent.js"; | ||
import getFreshSideObject from "../utils/getFreshSideObject.js"; | ||
import { max as mathMax, min as mathMin } from "../utils/math.js"; | ||
import { min as mathMin, max as mathMax } from "../utils/math.js"; | ||
@@ -48,2 +48,10 @@ function preventOverflow(_ref) { | ||
})) : tetherOffset; | ||
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? { | ||
mainAxis: tetherOffsetValue, | ||
altAxis: tetherOffsetValue | ||
} : Object.assign({ | ||
mainAxis: 0, | ||
altAxis: 0 | ||
}, tetherOffsetValue); | ||
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null; | ||
var data = { | ||
@@ -58,3 +66,5 @@ x: 0, | ||
if (checkMainAxis || checkAltAxis) { | ||
if (checkMainAxis) { | ||
var _offsetModifierState$; | ||
var mainSide = mainAxis === 'y' ? top : left; | ||
@@ -64,4 +74,4 @@ var altSide = mainAxis === 'y' ? bottom : right; | ||
var offset = popperOffsets[mainAxis]; | ||
var min = popperOffsets[mainAxis] + overflow[mainSide]; | ||
var max = popperOffsets[mainAxis] - overflow[altSide]; | ||
var min = offset + overflow[mainSide]; | ||
var max = offset - overflow[altSide]; | ||
var additive = tether ? -popperRect[len] / 2 : 0; | ||
@@ -86,32 +96,41 @@ var minLen = variation === start ? referenceRect[len] : popperRect[len]; | ||
var arrowLen = within(0, referenceRect[len], arrowRect[len]); | ||
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue; | ||
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue; | ||
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis; | ||
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis; | ||
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); | ||
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; | ||
var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0; | ||
var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset; | ||
var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue; | ||
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0; | ||
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset; | ||
var tetherMax = offset + maxOffset - offsetModifierValue; | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
data[mainAxis] = preventedOffset - offset; | ||
} | ||
if (checkMainAxis) { | ||
var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max); | ||
popperOffsets[mainAxis] = preventedOffset; | ||
data[mainAxis] = preventedOffset - offset; | ||
} | ||
if (checkAltAxis) { | ||
var _offsetModifierState$2; | ||
if (checkAltAxis) { | ||
var _mainSide = mainAxis === 'x' ? top : left; | ||
var _mainSide = mainAxis === 'x' ? top : left; | ||
var _altSide = mainAxis === 'x' ? bottom : right; | ||
var _altSide = mainAxis === 'x' ? bottom : right; | ||
var _offset = popperOffsets[altAxis]; | ||
var _offset = popperOffsets[altAxis]; | ||
var _min = _offset + overflow[_mainSide]; | ||
var _len = altAxis === 'y' ? 'height' : 'width'; | ||
var _max = _offset - overflow[_altSide]; | ||
var _min = _offset + overflow[_mainSide]; | ||
var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max); | ||
var _max = _offset - overflow[_altSide]; | ||
popperOffsets[altAxis] = _preventedOffset; | ||
data[altAxis] = _preventedOffset - _offset; | ||
} | ||
var isOriginSide = [top, left].indexOf(basePlacement) !== -1; | ||
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0; | ||
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis; | ||
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max; | ||
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max); | ||
popperOffsets[altAxis] = _preventedOffset; | ||
data[altAxis] = _preventedOffset - _offset; | ||
} | ||
@@ -118,0 +137,0 @@ |
@@ -1,1 +0,2 @@ | ||
export default function within(min: number, value: number, max: number): number; | ||
export declare function within(min: number, value: number, max: number): number; | ||
export declare function withinMaxClamp(min: number, value: number, max: number): number; |
import { max as mathMax, min as mathMin } from "./math.js"; | ||
export default function within(min, value, max) { | ||
export function within(min, value, max) { | ||
return mathMax(min, mathMin(value, max)); | ||
} | ||
export function withinMaxClamp(min, value, max) { | ||
var v = within(min, value, max); | ||
return v > max ? max : v; | ||
} |
{ | ||
"name": "@popperjs/core", | ||
"version": "2.10.2", | ||
"version": "2.11.0", | ||
"description": "Tooltip and Popover Positioning Engine", | ||
@@ -109,3 +109,3 @@ "main": "dist/cjs/popper.js", | ||
"pretty-quick": "^3.1.0", | ||
"puppeteer": "^7.1.0", | ||
"puppeteer": "^10.4.0", | ||
"replace-in-files-cli": "^1.0.0", | ||
@@ -112,0 +112,0 @@ "rollup": "^2.39.0", |
@@ -48,23 +48,29 @@ <!-- <HEADER> // IGNORE IT --> | ||
To contribute to the Popper website and documentation, please visit the [dedicated repository](https://github.com/popperjs/website). | ||
To contribute to the Popper website and documentation, please visit the | ||
[dedicated repository](https://github.com/popperjs/website). | ||
## Why not use pure CSS? | ||
CSS tooltips have accessibility and usability problems: | ||
- **Clipping and overflow issues**: CSS tooltips will not be prevented from | ||
overflowing clipping boundaries, such as the viewport. The tooltip gets | ||
partially cut off or overflows if it's near the edge since there is no dynamic | ||
positioning logic. When using Popper, your tooltip will always be positioned | ||
in the right place. | ||
- **No flipping**: CSS tooltips will not flip to a different placement to fit | ||
better in view if necessary. Popper automatically flips the tooltip to make it | ||
fit in view as best as possible for the user. | ||
- **Using HTML**: Popovers containing interactive HTML are difficult or not | ||
possible to create without UX issues using pure CSS. Popper positions any HTML | ||
element – no pseudo-elements are used. | ||
- **No virtual positioning**: CSS tooltips cannot follow the mouse cursor or be | ||
- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from | ||
overflowing clipping boundaries, such as the viewport. It will get partially | ||
cut off or overflows if it's near the edge since there is no dynamic | ||
positioning logic. When using Popper, your popper will always be positioned in | ||
the right place without needing manual adjustments. | ||
- **No flipping**: CSS poppers will not flip to a different placement to fit | ||
better in view if necessary. While you can manually adjust for the main axis | ||
overflow, this feature cannot be achieved via CSS alone. Popper automatically | ||
flips the tooltip to make it fit in view as best as possible for the user. | ||
- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be | ||
used as a context menu. Popper allows you to position your tooltip relative to | ||
any coordinates you desire. | ||
- **Lack of extensibility**: CSS tooltips cannot be easily extended to fit any | ||
- **Slower development cycle**: When pure CSS is used to position popper | ||
elements, the lack of dynamic positioning means they must be carefully placed | ||
to consider overflow on all screen sizes. In reusable component libraries, | ||
this means a developer can't just add the component anywhere on the page, | ||
because these issues need to be considered and adjusted for every time. With | ||
Popper, you can place your elements anywhere and they will be positioned | ||
correctly, without needing to consider different screen sizes, layouts, etc. | ||
This massively speeds up development time because this work is automatically | ||
offloaded to Popper. | ||
- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any | ||
arbitrary use case you may need to adjust for. Popper is built with | ||
@@ -85,2 +91,6 @@ extensibility in mind. | ||
DOM context because they don't handle `offsetParent` contexts. | ||
- **Compatibility**: Popper handles an incredible number of edge cases regarding | ||
different browsers and environments (mobile viewports, RTL, scrollbars enabled | ||
or disabled, etc.). Popper is a popular and well-maintained library, so you | ||
can be confident positioning will work for your users on any device. | ||
- **Configurability**: They often lack advanced configurability to suit any | ||
@@ -212,3 +222,3 @@ possible use case. | ||
```js | ||
import { createPopperLite as createPopper } from "@popperjs/core"; | ||
import { createPopperLite as createPopper } from '@popperjs/core'; | ||
``` | ||
@@ -227,3 +237,7 @@ | ||
```js | ||
import { createPopperLite as createPopper, preventOverflow, flip } from "@popperjs/core"; | ||
import { | ||
createPopperLite as createPopper, | ||
preventOverflow, | ||
flip, | ||
} from '@popperjs/core'; | ||
@@ -230,0 +244,0 @@ const button = document.querySelector('#button'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1588080
11725
377