Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
y: win.visualViewport.offsetTop
[8500] Fix | Delete
};
[8501] Fix | Delete
}
[8502] Fix | Delete
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
[8503] Fix | Delete
if (isFixed === void 0) {
[8504] Fix | Delete
isFixed = false;
[8505] Fix | Delete
}
[8506] Fix | Delete
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== floating_ui_utils_dom_getWindow(element)) {
[8507] Fix | Delete
return false;
[8508] Fix | Delete
}
[8509] Fix | Delete
return isFixed;
[8510] Fix | Delete
}
[8511] Fix | Delete
[8512] Fix | Delete
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
[8513] Fix | Delete
if (includeScale === void 0) {
[8514] Fix | Delete
includeScale = false;
[8515] Fix | Delete
}
[8516] Fix | Delete
if (isFixedStrategy === void 0) {
[8517] Fix | Delete
isFixedStrategy = false;
[8518] Fix | Delete
}
[8519] Fix | Delete
const clientRect = element.getBoundingClientRect();
[8520] Fix | Delete
const domElement = unwrapElement(element);
[8521] Fix | Delete
let scale = floating_ui_utils_createCoords(1);
[8522] Fix | Delete
if (includeScale) {
[8523] Fix | Delete
if (offsetParent) {
[8524] Fix | Delete
if (isElement(offsetParent)) {
[8525] Fix | Delete
scale = getScale(offsetParent);
[8526] Fix | Delete
}
[8527] Fix | Delete
} else {
[8528] Fix | Delete
scale = getScale(element);
[8529] Fix | Delete
}
[8530] Fix | Delete
}
[8531] Fix | Delete
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : floating_ui_utils_createCoords(0);
[8532] Fix | Delete
let x = (clientRect.left + visualOffsets.x) / scale.x;
[8533] Fix | Delete
let y = (clientRect.top + visualOffsets.y) / scale.y;
[8534] Fix | Delete
let width = clientRect.width / scale.x;
[8535] Fix | Delete
let height = clientRect.height / scale.y;
[8536] Fix | Delete
if (domElement) {
[8537] Fix | Delete
const win = floating_ui_utils_dom_getWindow(domElement);
[8538] Fix | Delete
const offsetWin = offsetParent && isElement(offsetParent) ? floating_ui_utils_dom_getWindow(offsetParent) : offsetParent;
[8539] Fix | Delete
let currentWin = win;
[8540] Fix | Delete
let currentIFrame = currentWin.frameElement;
[8541] Fix | Delete
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
[8542] Fix | Delete
const iframeScale = getScale(currentIFrame);
[8543] Fix | Delete
const iframeRect = currentIFrame.getBoundingClientRect();
[8544] Fix | Delete
const css = floating_ui_utils_dom_getComputedStyle(currentIFrame);
[8545] Fix | Delete
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
[8546] Fix | Delete
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
[8547] Fix | Delete
x *= iframeScale.x;
[8548] Fix | Delete
y *= iframeScale.y;
[8549] Fix | Delete
width *= iframeScale.x;
[8550] Fix | Delete
height *= iframeScale.y;
[8551] Fix | Delete
x += left;
[8552] Fix | Delete
y += top;
[8553] Fix | Delete
currentWin = floating_ui_utils_dom_getWindow(currentIFrame);
[8554] Fix | Delete
currentIFrame = currentWin.frameElement;
[8555] Fix | Delete
}
[8556] Fix | Delete
}
[8557] Fix | Delete
return floating_ui_utils_rectToClientRect({
[8558] Fix | Delete
width,
[8559] Fix | Delete
height,
[8560] Fix | Delete
x,
[8561] Fix | Delete
y
[8562] Fix | Delete
});
[8563] Fix | Delete
}
[8564] Fix | Delete
[8565] Fix | Delete
const topLayerSelectors = [':popover-open', ':modal'];
[8566] Fix | Delete
function isTopLayer(floating) {
[8567] Fix | Delete
return topLayerSelectors.some(selector => {
[8568] Fix | Delete
try {
[8569] Fix | Delete
return floating.matches(selector);
[8570] Fix | Delete
} catch (e) {
[8571] Fix | Delete
return false;
[8572] Fix | Delete
}
[8573] Fix | Delete
});
[8574] Fix | Delete
}
[8575] Fix | Delete
[8576] Fix | Delete
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
[8577] Fix | Delete
let {
[8578] Fix | Delete
elements,
[8579] Fix | Delete
rect,
[8580] Fix | Delete
offsetParent,
[8581] Fix | Delete
strategy
[8582] Fix | Delete
} = _ref;
[8583] Fix | Delete
const isFixed = strategy === 'fixed';
[8584] Fix | Delete
const documentElement = getDocumentElement(offsetParent);
[8585] Fix | Delete
const topLayer = elements ? isTopLayer(elements.floating) : false;
[8586] Fix | Delete
if (offsetParent === documentElement || topLayer && isFixed) {
[8587] Fix | Delete
return rect;
[8588] Fix | Delete
}
[8589] Fix | Delete
let scroll = {
[8590] Fix | Delete
scrollLeft: 0,
[8591] Fix | Delete
scrollTop: 0
[8592] Fix | Delete
};
[8593] Fix | Delete
let scale = floating_ui_utils_createCoords(1);
[8594] Fix | Delete
const offsets = floating_ui_utils_createCoords(0);
[8595] Fix | Delete
const isOffsetParentAnElement = isHTMLElement(offsetParent);
[8596] Fix | Delete
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
[8597] Fix | Delete
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
[8598] Fix | Delete
scroll = getNodeScroll(offsetParent);
[8599] Fix | Delete
}
[8600] Fix | Delete
if (isHTMLElement(offsetParent)) {
[8601] Fix | Delete
const offsetRect = getBoundingClientRect(offsetParent);
[8602] Fix | Delete
scale = getScale(offsetParent);
[8603] Fix | Delete
offsets.x = offsetRect.x + offsetParent.clientLeft;
[8604] Fix | Delete
offsets.y = offsetRect.y + offsetParent.clientTop;
[8605] Fix | Delete
}
[8606] Fix | Delete
}
[8607] Fix | Delete
return {
[8608] Fix | Delete
width: rect.width * scale.x,
[8609] Fix | Delete
height: rect.height * scale.y,
[8610] Fix | Delete
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
[8611] Fix | Delete
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
[8612] Fix | Delete
};
[8613] Fix | Delete
}
[8614] Fix | Delete
[8615] Fix | Delete
function getClientRects(element) {
[8616] Fix | Delete
return Array.from(element.getClientRects());
[8617] Fix | Delete
}
[8618] Fix | Delete
[8619] Fix | Delete
function getWindowScrollBarX(element) {
[8620] Fix | Delete
// If <html> has a CSS width greater than the viewport, then this will be
[8621] Fix | Delete
// incorrect for RTL.
[8622] Fix | Delete
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
[8623] Fix | Delete
}
[8624] Fix | Delete
[8625] Fix | Delete
// Gets the entire size of the scrollable document area, even extending outside
[8626] Fix | Delete
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
[8627] Fix | Delete
function getDocumentRect(element) {
[8628] Fix | Delete
const html = getDocumentElement(element);
[8629] Fix | Delete
const scroll = getNodeScroll(element);
[8630] Fix | Delete
const body = element.ownerDocument.body;
[8631] Fix | Delete
const width = dist_floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
[8632] Fix | Delete
const height = dist_floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
[8633] Fix | Delete
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
[8634] Fix | Delete
const y = -scroll.scrollTop;
[8635] Fix | Delete
if (floating_ui_utils_dom_getComputedStyle(body).direction === 'rtl') {
[8636] Fix | Delete
x += dist_floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
[8637] Fix | Delete
}
[8638] Fix | Delete
return {
[8639] Fix | Delete
width,
[8640] Fix | Delete
height,
[8641] Fix | Delete
x,
[8642] Fix | Delete
y
[8643] Fix | Delete
};
[8644] Fix | Delete
}
[8645] Fix | Delete
[8646] Fix | Delete
function getViewportRect(element, strategy) {
[8647] Fix | Delete
const win = floating_ui_utils_dom_getWindow(element);
[8648] Fix | Delete
const html = getDocumentElement(element);
[8649] Fix | Delete
const visualViewport = win.visualViewport;
[8650] Fix | Delete
let width = html.clientWidth;
[8651] Fix | Delete
let height = html.clientHeight;
[8652] Fix | Delete
let x = 0;
[8653] Fix | Delete
let y = 0;
[8654] Fix | Delete
if (visualViewport) {
[8655] Fix | Delete
width = visualViewport.width;
[8656] Fix | Delete
height = visualViewport.height;
[8657] Fix | Delete
const visualViewportBased = isWebKit();
[8658] Fix | Delete
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
[8659] Fix | Delete
x = visualViewport.offsetLeft;
[8660] Fix | Delete
y = visualViewport.offsetTop;
[8661] Fix | Delete
}
[8662] Fix | Delete
}
[8663] Fix | Delete
return {
[8664] Fix | Delete
width,
[8665] Fix | Delete
height,
[8666] Fix | Delete
x,
[8667] Fix | Delete
y
[8668] Fix | Delete
};
[8669] Fix | Delete
}
[8670] Fix | Delete
[8671] Fix | Delete
// Returns the inner client rect, subtracting scrollbars if present.
[8672] Fix | Delete
function getInnerBoundingClientRect(element, strategy) {
[8673] Fix | Delete
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
[8674] Fix | Delete
const top = clientRect.top + element.clientTop;
[8675] Fix | Delete
const left = clientRect.left + element.clientLeft;
[8676] Fix | Delete
const scale = isHTMLElement(element) ? getScale(element) : floating_ui_utils_createCoords(1);
[8677] Fix | Delete
const width = element.clientWidth * scale.x;
[8678] Fix | Delete
const height = element.clientHeight * scale.y;
[8679] Fix | Delete
const x = left * scale.x;
[8680] Fix | Delete
const y = top * scale.y;
[8681] Fix | Delete
return {
[8682] Fix | Delete
width,
[8683] Fix | Delete
height,
[8684] Fix | Delete
x,
[8685] Fix | Delete
y
[8686] Fix | Delete
};
[8687] Fix | Delete
}
[8688] Fix | Delete
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
[8689] Fix | Delete
let rect;
[8690] Fix | Delete
if (clippingAncestor === 'viewport') {
[8691] Fix | Delete
rect = getViewportRect(element, strategy);
[8692] Fix | Delete
} else if (clippingAncestor === 'document') {
[8693] Fix | Delete
rect = getDocumentRect(getDocumentElement(element));
[8694] Fix | Delete
} else if (isElement(clippingAncestor)) {
[8695] Fix | Delete
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
[8696] Fix | Delete
} else {
[8697] Fix | Delete
const visualOffsets = getVisualOffsets(element);
[8698] Fix | Delete
rect = {
[8699] Fix | Delete
...clippingAncestor,
[8700] Fix | Delete
x: clippingAncestor.x - visualOffsets.x,
[8701] Fix | Delete
y: clippingAncestor.y - visualOffsets.y
[8702] Fix | Delete
};
[8703] Fix | Delete
}
[8704] Fix | Delete
return floating_ui_utils_rectToClientRect(rect);
[8705] Fix | Delete
}
[8706] Fix | Delete
function hasFixedPositionAncestor(element, stopNode) {
[8707] Fix | Delete
const parentNode = getParentNode(element);
[8708] Fix | Delete
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
[8709] Fix | Delete
return false;
[8710] Fix | Delete
}
[8711] Fix | Delete
return floating_ui_utils_dom_getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
[8712] Fix | Delete
}
[8713] Fix | Delete
[8714] Fix | Delete
// A "clipping ancestor" is an `overflow` element with the characteristic of
[8715] Fix | Delete
// clipping (or hiding) child elements. This returns all clipping ancestors
[8716] Fix | Delete
// of the given element up the tree.
[8717] Fix | Delete
function getClippingElementAncestors(element, cache) {
[8718] Fix | Delete
const cachedResult = cache.get(element);
[8719] Fix | Delete
if (cachedResult) {
[8720] Fix | Delete
return cachedResult;
[8721] Fix | Delete
}
[8722] Fix | Delete
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
[8723] Fix | Delete
let currentContainingBlockComputedStyle = null;
[8724] Fix | Delete
const elementIsFixed = floating_ui_utils_dom_getComputedStyle(element).position === 'fixed';
[8725] Fix | Delete
let currentNode = elementIsFixed ? getParentNode(element) : element;
[8726] Fix | Delete
[8727] Fix | Delete
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
[8728] Fix | Delete
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
[8729] Fix | Delete
const computedStyle = floating_ui_utils_dom_getComputedStyle(currentNode);
[8730] Fix | Delete
const currentNodeIsContaining = isContainingBlock(currentNode);
[8731] Fix | Delete
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
[8732] Fix | Delete
currentContainingBlockComputedStyle = null;
[8733] Fix | Delete
}
[8734] Fix | Delete
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
[8735] Fix | Delete
if (shouldDropCurrentNode) {
[8736] Fix | Delete
// Drop non-containing blocks.
[8737] Fix | Delete
result = result.filter(ancestor => ancestor !== currentNode);
[8738] Fix | Delete
} else {
[8739] Fix | Delete
// Record last containing block for next iteration.
[8740] Fix | Delete
currentContainingBlockComputedStyle = computedStyle;
[8741] Fix | Delete
}
[8742] Fix | Delete
currentNode = getParentNode(currentNode);
[8743] Fix | Delete
}
[8744] Fix | Delete
cache.set(element, result);
[8745] Fix | Delete
return result;
[8746] Fix | Delete
}
[8747] Fix | Delete
[8748] Fix | Delete
// Gets the maximum area that the element is visible in due to any number of
[8749] Fix | Delete
// clipping ancestors.
[8750] Fix | Delete
function getClippingRect(_ref) {
[8751] Fix | Delete
let {
[8752] Fix | Delete
element,
[8753] Fix | Delete
boundary,
[8754] Fix | Delete
rootBoundary,
[8755] Fix | Delete
strategy
[8756] Fix | Delete
} = _ref;
[8757] Fix | Delete
const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
[8758] Fix | Delete
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
[8759] Fix | Delete
const firstClippingAncestor = clippingAncestors[0];
[8760] Fix | Delete
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
[8761] Fix | Delete
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
[8762] Fix | Delete
accRect.top = dist_floating_ui_utils_max(rect.top, accRect.top);
[8763] Fix | Delete
accRect.right = dist_floating_ui_utils_min(rect.right, accRect.right);
[8764] Fix | Delete
accRect.bottom = dist_floating_ui_utils_min(rect.bottom, accRect.bottom);
[8765] Fix | Delete
accRect.left = dist_floating_ui_utils_max(rect.left, accRect.left);
[8766] Fix | Delete
return accRect;
[8767] Fix | Delete
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
[8768] Fix | Delete
return {
[8769] Fix | Delete
width: clippingRect.right - clippingRect.left,
[8770] Fix | Delete
height: clippingRect.bottom - clippingRect.top,
[8771] Fix | Delete
x: clippingRect.left,
[8772] Fix | Delete
y: clippingRect.top
[8773] Fix | Delete
};
[8774] Fix | Delete
}
[8775] Fix | Delete
[8776] Fix | Delete
function getDimensions(element) {
[8777] Fix | Delete
const {
[8778] Fix | Delete
width,
[8779] Fix | Delete
height
[8780] Fix | Delete
} = getCssDimensions(element);
[8781] Fix | Delete
return {
[8782] Fix | Delete
width,
[8783] Fix | Delete
height
[8784] Fix | Delete
};
[8785] Fix | Delete
}
[8786] Fix | Delete
[8787] Fix | Delete
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
[8788] Fix | Delete
const isOffsetParentAnElement = isHTMLElement(offsetParent);
[8789] Fix | Delete
const documentElement = getDocumentElement(offsetParent);
[8790] Fix | Delete
const isFixed = strategy === 'fixed';
[8791] Fix | Delete
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
[8792] Fix | Delete
let scroll = {
[8793] Fix | Delete
scrollLeft: 0,
[8794] Fix | Delete
scrollTop: 0
[8795] Fix | Delete
};
[8796] Fix | Delete
const offsets = floating_ui_utils_createCoords(0);
[8797] Fix | Delete
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
[8798] Fix | Delete
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
[8799] Fix | Delete
scroll = getNodeScroll(offsetParent);
[8800] Fix | Delete
}
[8801] Fix | Delete
if (isOffsetParentAnElement) {
[8802] Fix | Delete
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
[8803] Fix | Delete
offsets.x = offsetRect.x + offsetParent.clientLeft;
[8804] Fix | Delete
offsets.y = offsetRect.y + offsetParent.clientTop;
[8805] Fix | Delete
} else if (documentElement) {
[8806] Fix | Delete
offsets.x = getWindowScrollBarX(documentElement);
[8807] Fix | Delete
}
[8808] Fix | Delete
}
[8809] Fix | Delete
const x = rect.left + scroll.scrollLeft - offsets.x;
[8810] Fix | Delete
const y = rect.top + scroll.scrollTop - offsets.y;
[8811] Fix | Delete
return {
[8812] Fix | Delete
x,
[8813] Fix | Delete
y,
[8814] Fix | Delete
width: rect.width,
[8815] Fix | Delete
height: rect.height
[8816] Fix | Delete
};
[8817] Fix | Delete
}
[8818] Fix | Delete
[8819] Fix | Delete
function getTrueOffsetParent(element, polyfill) {
[8820] Fix | Delete
if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') {
[8821] Fix | Delete
return null;
[8822] Fix | Delete
}
[8823] Fix | Delete
if (polyfill) {
[8824] Fix | Delete
return polyfill(element);
[8825] Fix | Delete
}
[8826] Fix | Delete
return element.offsetParent;
[8827] Fix | Delete
}
[8828] Fix | Delete
[8829] Fix | Delete
// Gets the closest ancestor positioned element. Handles some edge cases,
[8830] Fix | Delete
// such as table ancestors and cross browser bugs.
[8831] Fix | Delete
function getOffsetParent(element, polyfill) {
[8832] Fix | Delete
const window = floating_ui_utils_dom_getWindow(element);
[8833] Fix | Delete
if (!isHTMLElement(element) || isTopLayer(element)) {
[8834] Fix | Delete
return window;
[8835] Fix | Delete
}
[8836] Fix | Delete
let offsetParent = getTrueOffsetParent(element, polyfill);
[8837] Fix | Delete
while (offsetParent && isTableElement(offsetParent) && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static') {
[8838] Fix | Delete
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
[8839] Fix | Delete
}
[8840] Fix | Delete
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
[8841] Fix | Delete
return window;
[8842] Fix | Delete
}
[8843] Fix | Delete
return offsetParent || getContainingBlock(element) || window;
[8844] Fix | Delete
}
[8845] Fix | Delete
[8846] Fix | Delete
const getElementRects = async function (data) {
[8847] Fix | Delete
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
[8848] Fix | Delete
const getDimensionsFn = this.getDimensions;
[8849] Fix | Delete
return {
[8850] Fix | Delete
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
[8851] Fix | Delete
floating: {
[8852] Fix | Delete
x: 0,
[8853] Fix | Delete
y: 0,
[8854] Fix | Delete
...(await getDimensionsFn(data.floating))
[8855] Fix | Delete
}
[8856] Fix | Delete
};
[8857] Fix | Delete
};
[8858] Fix | Delete
[8859] Fix | Delete
function isRTL(element) {
[8860] Fix | Delete
return floating_ui_utils_dom_getComputedStyle(element).direction === 'rtl';
[8861] Fix | Delete
}
[8862] Fix | Delete
[8863] Fix | Delete
const platform = {
[8864] Fix | Delete
convertOffsetParentRelativeRectToViewportRelativeRect,
[8865] Fix | Delete
getDocumentElement: getDocumentElement,
[8866] Fix | Delete
getClippingRect,
[8867] Fix | Delete
getOffsetParent,
[8868] Fix | Delete
getElementRects,
[8869] Fix | Delete
getClientRects,
[8870] Fix | Delete
getDimensions,
[8871] Fix | Delete
getScale,
[8872] Fix | Delete
isElement: isElement,
[8873] Fix | Delete
isRTL
[8874] Fix | Delete
};
[8875] Fix | Delete
[8876] Fix | Delete
// https://samthor.au/2021/observing-dom/
[8877] Fix | Delete
function observeMove(element, onMove) {
[8878] Fix | Delete
let io = null;
[8879] Fix | Delete
let timeoutId;
[8880] Fix | Delete
const root = getDocumentElement(element);
[8881] Fix | Delete
function cleanup() {
[8882] Fix | Delete
var _io;
[8883] Fix | Delete
clearTimeout(timeoutId);
[8884] Fix | Delete
(_io = io) == null || _io.disconnect();
[8885] Fix | Delete
io = null;
[8886] Fix | Delete
}
[8887] Fix | Delete
function refresh(skip, threshold) {
[8888] Fix | Delete
if (skip === void 0) {
[8889] Fix | Delete
skip = false;
[8890] Fix | Delete
}
[8891] Fix | Delete
if (threshold === void 0) {
[8892] Fix | Delete
threshold = 1;
[8893] Fix | Delete
}
[8894] Fix | Delete
cleanup();
[8895] Fix | Delete
const {
[8896] Fix | Delete
left,
[8897] Fix | Delete
top,
[8898] Fix | Delete
width,
[8899] Fix | Delete
height
[8900] Fix | Delete
} = element.getBoundingClientRect();
[8901] Fix | Delete
if (!skip) {
[8902] Fix | Delete
onMove();
[8903] Fix | Delete
}
[8904] Fix | Delete
if (!width || !height) {
[8905] Fix | Delete
return;
[8906] Fix | Delete
}
[8907] Fix | Delete
const insetTop = floating_ui_utils_floor(top);
[8908] Fix | Delete
const insetRight = floating_ui_utils_floor(root.clientWidth - (left + width));
[8909] Fix | Delete
const insetBottom = floating_ui_utils_floor(root.clientHeight - (top + height));
[8910] Fix | Delete
const insetLeft = floating_ui_utils_floor(left);
[8911] Fix | Delete
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
[8912] Fix | Delete
const options = {
[8913] Fix | Delete
rootMargin,
[8914] Fix | Delete
threshold: dist_floating_ui_utils_max(0, dist_floating_ui_utils_min(1, threshold)) || 1
[8915] Fix | Delete
};
[8916] Fix | Delete
let isFirstUpdate = true;
[8917] Fix | Delete
function handleObserve(entries) {
[8918] Fix | Delete
const ratio = entries[0].intersectionRatio;
[8919] Fix | Delete
if (ratio !== threshold) {
[8920] Fix | Delete
if (!isFirstUpdate) {
[8921] Fix | Delete
return refresh();
[8922] Fix | Delete
}
[8923] Fix | Delete
if (!ratio) {
[8924] Fix | Delete
timeoutId = setTimeout(() => {
[8925] Fix | Delete
refresh(false, 1e-7);
[8926] Fix | Delete
}, 100);
[8927] Fix | Delete
} else {
[8928] Fix | Delete
refresh(false, ratio);
[8929] Fix | Delete
}
[8930] Fix | Delete
}
[8931] Fix | Delete
isFirstUpdate = false;
[8932] Fix | Delete
}
[8933] Fix | Delete
[8934] Fix | Delete
// Older browsers don't support a `document` as the root and will throw an
[8935] Fix | Delete
// error.
[8936] Fix | Delete
try {
[8937] Fix | Delete
io = new IntersectionObserver(handleObserve, {
[8938] Fix | Delete
...options,
[8939] Fix | Delete
// Handle <iframe>s
[8940] Fix | Delete
root: root.ownerDocument
[8941] Fix | Delete
});
[8942] Fix | Delete
} catch (e) {
[8943] Fix | Delete
io = new IntersectionObserver(handleObserve, options);
[8944] Fix | Delete
}
[8945] Fix | Delete
io.observe(element);
[8946] Fix | Delete
}
[8947] Fix | Delete
refresh(true);
[8948] Fix | Delete
return cleanup;
[8949] Fix | Delete
}
[8950] Fix | Delete
[8951] Fix | Delete
/**
[8952] Fix | Delete
* Automatically updates the position of the floating element when necessary.
[8953] Fix | Delete
* Should only be called when the floating element is mounted on the DOM or
[8954] Fix | Delete
* visible on the screen.
[8955] Fix | Delete
* @returns cleanup function that should be invoked when the floating element is
[8956] Fix | Delete
* removed from the DOM or hidden from the screen.
[8957] Fix | Delete
* @see https://floating-ui.com/docs/autoUpdate
[8958] Fix | Delete
*/
[8959] Fix | Delete
function autoUpdate(reference, floating, update, options) {
[8960] Fix | Delete
if (options === void 0) {
[8961] Fix | Delete
options = {};
[8962] Fix | Delete
}
[8963] Fix | Delete
const {
[8964] Fix | Delete
ancestorScroll = true,
[8965] Fix | Delete
ancestorResize = true,
[8966] Fix | Delete
elementResize = typeof ResizeObserver === 'function',
[8967] Fix | Delete
layoutShift = typeof IntersectionObserver === 'function',
[8968] Fix | Delete
animationFrame = false
[8969] Fix | Delete
} = options;
[8970] Fix | Delete
const referenceEl = unwrapElement(reference);
[8971] Fix | Delete
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
[8972] Fix | Delete
ancestors.forEach(ancestor => {
[8973] Fix | Delete
ancestorScroll && ancestor.addEventListener('scroll', update, {
[8974] Fix | Delete
passive: true
[8975] Fix | Delete
});
[8976] Fix | Delete
ancestorResize && ancestor.addEventListener('resize', update);
[8977] Fix | Delete
});
[8978] Fix | Delete
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
[8979] Fix | Delete
let reobserveFrame = -1;
[8980] Fix | Delete
let resizeObserver = null;
[8981] Fix | Delete
if (elementResize) {
[8982] Fix | Delete
resizeObserver = new ResizeObserver(_ref => {
[8983] Fix | Delete
let [firstEntry] = _ref;
[8984] Fix | Delete
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
[8985] Fix | Delete
// Prevent update loops when using the `size` middleware.
[8986] Fix | Delete
// https://github.com/floating-ui/floating-ui/issues/1740
[8987] Fix | Delete
resizeObserver.unobserve(floating);
[8988] Fix | Delete
cancelAnimationFrame(reobserveFrame);
[8989] Fix | Delete
reobserveFrame = requestAnimationFrame(() => {
[8990] Fix | Delete
var _resizeObserver;
[8991] Fix | Delete
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
[8992] Fix | Delete
});
[8993] Fix | Delete
}
[8994] Fix | Delete
update();
[8995] Fix | Delete
});
[8996] Fix | Delete
if (referenceEl && !animationFrame) {
[8997] Fix | Delete
resizeObserver.observe(referenceEl);
[8998] Fix | Delete
}
[8999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function