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: commands.js
/**
[500] Fix | Delete
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
[501] Fix | Delete
* prop or avoid re-executing effects when passed as a dependency
[502] Fix | Delete
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
[503] Fix | Delete
const callbackRef = (0,external_React_namespaceObject.useRef)(callback);
[504] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[505] Fix | Delete
callbackRef.current = callback;
[506] Fix | Delete
}); // https://github.com/facebook/react/issues/19240
[507] Fix | Delete
return (0,external_React_namespaceObject.useMemo)(()=>(...args)=>{
[508] Fix | Delete
var _callbackRef$current;
[509] Fix | Delete
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
[510] Fix | Delete
}
[511] Fix | Delete
, []);
[512] Fix | Delete
}
[513] Fix | Delete
[514] Fix | Delete
[515] Fix | Delete
[516] Fix | Delete
[517] Fix | Delete
[518] Fix | Delete
[519] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js
[520] Fix | Delete
[521] Fix | Delete
[522] Fix | Delete
[523] Fix | Delete
[524] Fix | Delete
[525] Fix | Delete
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
[526] Fix | Delete
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
[527] Fix | Delete
defaultProp: defaultProp,
[528] Fix | Delete
onChange: onChange
[529] Fix | Delete
});
[530] Fix | Delete
const isControlled = prop !== undefined;
[531] Fix | Delete
const value1 = isControlled ? prop : uncontrolledProp;
[532] Fix | Delete
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
[533] Fix | Delete
const setValue = (0,external_React_namespaceObject.useCallback)((nextValue)=>{
[534] Fix | Delete
if (isControlled) {
[535] Fix | Delete
const setter = nextValue;
[536] Fix | Delete
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
[537] Fix | Delete
if (value !== prop) handleChange(value);
[538] Fix | Delete
} else setUncontrolledProp(nextValue);
[539] Fix | Delete
}, [
[540] Fix | Delete
isControlled,
[541] Fix | Delete
prop,
[542] Fix | Delete
setUncontrolledProp,
[543] Fix | Delete
handleChange
[544] Fix | Delete
]);
[545] Fix | Delete
return [
[546] Fix | Delete
value1,
[547] Fix | Delete
setValue
[548] Fix | Delete
];
[549] Fix | Delete
}
[550] Fix | Delete
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
[551] Fix | Delete
const uncontrolledState = (0,external_React_namespaceObject.useState)(defaultProp);
[552] Fix | Delete
const [value] = uncontrolledState;
[553] Fix | Delete
const prevValueRef = (0,external_React_namespaceObject.useRef)(value);
[554] Fix | Delete
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
[555] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[556] Fix | Delete
if (prevValueRef.current !== value) {
[557] Fix | Delete
handleChange(value);
[558] Fix | Delete
prevValueRef.current = value;
[559] Fix | Delete
}
[560] Fix | Delete
}, [
[561] Fix | Delete
value,
[562] Fix | Delete
prevValueRef,
[563] Fix | Delete
handleChange
[564] Fix | Delete
]);
[565] Fix | Delete
return uncontrolledState;
[566] Fix | Delete
}
[567] Fix | Delete
[568] Fix | Delete
[569] Fix | Delete
[570] Fix | Delete
[571] Fix | Delete
[572] Fix | Delete
[573] Fix | Delete
;// CONCATENATED MODULE: external "ReactDOM"
[574] Fix | Delete
const external_ReactDOM_namespaceObject = window["ReactDOM"];
[575] Fix | Delete
var external_ReactDOM_default = /*#__PURE__*/__webpack_require__.n(external_ReactDOM_namespaceObject);
[576] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.module.js
[577] Fix | Delete
[578] Fix | Delete
[579] Fix | Delete
[580] Fix | Delete
[581] Fix | Delete
[582] Fix | Delete
[583] Fix | Delete
[584] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[585] Fix | Delete
* Slot
[586] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
[587] Fix | Delete
const { children: children , ...slotProps } = props;
[588] Fix | Delete
const childrenArray = external_React_namespaceObject.Children.toArray(children);
[589] Fix | Delete
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
[590] Fix | Delete
if (slottable) {
[591] Fix | Delete
// the new element to render is the one passed as a child of `Slottable`
[592] Fix | Delete
const newElement = slottable.props.children;
[593] Fix | Delete
const newChildren = childrenArray.map((child)=>{
[594] Fix | Delete
if (child === slottable) {
[595] Fix | Delete
// because the new element will be the one rendered, we are only interested
[596] Fix | Delete
// in grabbing its children (`newElement.props.children`)
[597] Fix | Delete
if (external_React_namespaceObject.Children.count(newElement) > 1) return external_React_namespaceObject.Children.only(null);
[598] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? newElement.props.children : null;
[599] Fix | Delete
} else return child;
[600] Fix | Delete
});
[601] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
[602] Fix | Delete
ref: forwardedRef
[603] Fix | Delete
}), /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(newElement, undefined, newChildren) : null);
[604] Fix | Delete
}
[605] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
[606] Fix | Delete
ref: forwardedRef
[607] Fix | Delete
}), children);
[608] Fix | Delete
});
[609] Fix | Delete
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
[610] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[611] Fix | Delete
* SlotClone
[612] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
[613] Fix | Delete
const { children: children , ...slotProps } = props;
[614] Fix | Delete
if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, {
[615] Fix | Delete
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
[616] Fix | Delete
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
[617] Fix | Delete
});
[618] Fix | Delete
return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null;
[619] Fix | Delete
});
[620] Fix | Delete
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
[621] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[622] Fix | Delete
* Slottable
[623] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
[624] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, children);
[625] Fix | Delete
};
[626] Fix | Delete
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
[627] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
[628] Fix | Delete
}
[629] Fix | Delete
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
[630] Fix | Delete
// all child props should override
[631] Fix | Delete
const overrideProps = {
[632] Fix | Delete
...childProps
[633] Fix | Delete
};
[634] Fix | Delete
for(const propName in childProps){
[635] Fix | Delete
const slotPropValue = slotProps[propName];
[636] Fix | Delete
const childPropValue = childProps[propName];
[637] Fix | Delete
const isHandler = /^on[A-Z]/.test(propName); // if it's a handler, modify the override by composing the base handler
[638] Fix | Delete
if (isHandler) overrideProps[propName] = (...args)=>{
[639] Fix | Delete
childPropValue === null || childPropValue === void 0 || childPropValue(...args);
[640] Fix | Delete
slotPropValue === null || slotPropValue === void 0 || slotPropValue(...args);
[641] Fix | Delete
};
[642] Fix | Delete
else if (propName === 'style') overrideProps[propName] = {
[643] Fix | Delete
...slotPropValue,
[644] Fix | Delete
...childPropValue
[645] Fix | Delete
};
[646] Fix | Delete
else if (propName === 'className') overrideProps[propName] = [
[647] Fix | Delete
slotPropValue,
[648] Fix | Delete
childPropValue
[649] Fix | Delete
].filter(Boolean).join(' ');
[650] Fix | Delete
}
[651] Fix | Delete
return {
[652] Fix | Delete
...slotProps,
[653] Fix | Delete
...overrideProps
[654] Fix | Delete
};
[655] Fix | Delete
}
[656] Fix | Delete
const $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5e63c961fc1ce211$export$8c6ed5c666ac1360));
[657] Fix | Delete
[658] Fix | Delete
[659] Fix | Delete
[660] Fix | Delete
[661] Fix | Delete
[662] Fix | Delete
[663] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.module.js
[664] Fix | Delete
[665] Fix | Delete
[666] Fix | Delete
[667] Fix | Delete
[668] Fix | Delete
[669] Fix | Delete
[670] Fix | Delete
[671] Fix | Delete
[672] Fix | Delete
[673] Fix | Delete
const $8927f6f2acc4f386$var$NODES = [
[674] Fix | Delete
'a',
[675] Fix | Delete
'button',
[676] Fix | Delete
'div',
[677] Fix | Delete
'h2',
[678] Fix | Delete
'h3',
[679] Fix | Delete
'img',
[680] Fix | Delete
'li',
[681] Fix | Delete
'nav',
[682] Fix | Delete
'ol',
[683] Fix | Delete
'p',
[684] Fix | Delete
'span',
[685] Fix | Delete
'svg',
[686] Fix | Delete
'ul'
[687] Fix | Delete
]; // Temporary while we await merge of this fix:
[688] Fix | Delete
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
[689] Fix | Delete
// prettier-ignore
[690] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[691] Fix | Delete
* Primitive
[692] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
[693] Fix | Delete
const Node = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
[694] Fix | Delete
const { asChild: asChild , ...primitiveProps } = props;
[695] Fix | Delete
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
[696] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[697] Fix | Delete
window[Symbol.for('radix-ui')] = true;
[698] Fix | Delete
}, []);
[699] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Comp, _extends({}, primitiveProps, {
[700] Fix | Delete
ref: forwardedRef
[701] Fix | Delete
}));
[702] Fix | Delete
});
[703] Fix | Delete
Node.displayName = `Primitive.${node}`;
[704] Fix | Delete
return {
[705] Fix | Delete
...primitive,
[706] Fix | Delete
[node]: Node
[707] Fix | Delete
};
[708] Fix | Delete
}, {});
[709] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[710] Fix | Delete
* Utils
[711] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ /**
[712] Fix | Delete
* Flush custom event dispatch
[713] Fix | Delete
* https://github.com/radix-ui/primitives/pull/1378
[714] Fix | Delete
*
[715] Fix | Delete
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
[716] Fix | Delete
*
[717] Fix | Delete
* Internally, React prioritises events in the following order:
[718] Fix | Delete
* - discrete
[719] Fix | Delete
* - continuous
[720] Fix | Delete
* - default
[721] Fix | Delete
*
[722] Fix | Delete
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
[723] Fix | Delete
*
[724] Fix | Delete
* `discrete` is an important distinction as updates within these events are applied immediately.
[725] Fix | Delete
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
[726] Fix | Delete
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
[727] Fix | Delete
* dispatched by another `discrete` event.
[728] Fix | Delete
*
[729] Fix | Delete
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
[730] Fix | Delete
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
[731] Fix | Delete
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
[732] Fix | Delete
* For example:
[733] Fix | Delete
*
[734] Fix | Delete
* dispatching a known click 👎
[735] Fix | Delete
* target.dispatchEvent(new Event(‘click’))
[736] Fix | Delete
*
[737] Fix | Delete
* dispatching a custom type within a non-discrete event 👎
[738] Fix | Delete
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
[739] Fix | Delete
*
[740] Fix | Delete
* dispatching a custom type within a `discrete` event 👍
[741] Fix | Delete
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
[742] Fix | Delete
*
[743] Fix | Delete
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
[744] Fix | Delete
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
[745] Fix | Delete
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
[746] Fix | Delete
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
[747] Fix | Delete
if (target) (0,external_ReactDOM_namespaceObject.flushSync)(()=>target.dispatchEvent(event)
[748] Fix | Delete
);
[749] Fix | Delete
}
[750] Fix | Delete
/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($8927f6f2acc4f386$export$250ffa63cdc0d034));
[751] Fix | Delete
[752] Fix | Delete
[753] Fix | Delete
[754] Fix | Delete
[755] Fix | Delete
[756] Fix | Delete
[757] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js
[758] Fix | Delete
[759] Fix | Delete
[760] Fix | Delete
[761] Fix | Delete
[762] Fix | Delete
[763] Fix | Delete
/**
[764] Fix | Delete
* Listens for when the escape key is down
[765] Fix | Delete
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp) {
[766] Fix | Delete
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
[767] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[768] Fix | Delete
const handleKeyDown = (event)=>{
[769] Fix | Delete
if (event.key === 'Escape') onEscapeKeyDown(event);
[770] Fix | Delete
};
[771] Fix | Delete
document.addEventListener('keydown', handleKeyDown);
[772] Fix | Delete
return ()=>document.removeEventListener('keydown', handleKeyDown)
[773] Fix | Delete
;
[774] Fix | Delete
}, [
[775] Fix | Delete
onEscapeKeyDown
[776] Fix | Delete
]);
[777] Fix | Delete
}
[778] Fix | Delete
[779] Fix | Delete
[780] Fix | Delete
[781] Fix | Delete
[782] Fix | Delete
[783] Fix | Delete
[784] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js
[785] Fix | Delete
[786] Fix | Delete
[787] Fix | Delete
[788] Fix | Delete
[789] Fix | Delete
[790] Fix | Delete
[791] Fix | Delete
[792] Fix | Delete
[793] Fix | Delete
[794] Fix | Delete
[795] Fix | Delete
[796] Fix | Delete
[797] Fix | Delete
[798] Fix | Delete
[799] Fix | Delete
[800] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[801] Fix | Delete
* DismissableLayer
[802] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';
[803] Fix | Delete
const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
[804] Fix | Delete
const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
[805] Fix | Delete
const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
[806] Fix | Delete
let $5cb92bef7577960e$var$originalBodyPointerEvents;
[807] Fix | Delete
const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)({
[808] Fix | Delete
layers: new Set(),
[809] Fix | Delete
layersWithOutsidePointerEventsDisabled: new Set(),
[810] Fix | Delete
branches: new Set()
[811] Fix | Delete
});
[812] Fix | Delete
const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
[813] Fix | Delete
const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
[814] Fix | Delete
const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
[815] Fix | Delete
const [node1, setNode] = (0,external_React_namespaceObject.useState)(null);
[816] Fix | Delete
const [, force] = (0,external_React_namespaceObject.useState)({});
[817] Fix | Delete
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
[818] Fix | Delete
);
[819] Fix | Delete
const layers = Array.from(context.layers);
[820] Fix | Delete
const [highestLayerWithOutsidePointerEventsDisabled] = [
[821] Fix | Delete
...context.layersWithOutsidePointerEventsDisabled
[822] Fix | Delete
].slice(-1); // prettier-ignore
[823] Fix | Delete
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
[824] Fix | Delete
const index = node1 ? layers.indexOf(node1) : -1;
[825] Fix | Delete
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
[826] Fix | Delete
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
[827] Fix | Delete
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
[828] Fix | Delete
const target = event.target;
[829] Fix | Delete
const isPointerDownOnBranch = [
[830] Fix | Delete
...context.branches
[831] Fix | Delete
].some((branch)=>branch.contains(target)
[832] Fix | Delete
);
[833] Fix | Delete
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
[834] Fix | Delete
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
[835] Fix | Delete
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
[836] Fix | Delete
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
[837] Fix | Delete
});
[838] Fix | Delete
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
[839] Fix | Delete
const target = event.target;
[840] Fix | Delete
const isFocusInBranch = [
[841] Fix | Delete
...context.branches
[842] Fix | Delete
].some((branch)=>branch.contains(target)
[843] Fix | Delete
);
[844] Fix | Delete
if (isFocusInBranch) return;
[845] Fix | Delete
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
[846] Fix | Delete
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
[847] Fix | Delete
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
[848] Fix | Delete
});
[849] Fix | Delete
$addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
[850] Fix | Delete
const isHighestLayer = index === context.layers.size - 1;
[851] Fix | Delete
if (!isHighestLayer) return;
[852] Fix | Delete
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
[853] Fix | Delete
if (!event.defaultPrevented && onDismiss) {
[854] Fix | Delete
event.preventDefault();
[855] Fix | Delete
onDismiss();
[856] Fix | Delete
}
[857] Fix | Delete
});
[858] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[859] Fix | Delete
if (!node1) return;
[860] Fix | Delete
if (disableOutsidePointerEvents) {
[861] Fix | Delete
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
[862] Fix | Delete
$5cb92bef7577960e$var$originalBodyPointerEvents = document.body.style.pointerEvents;
[863] Fix | Delete
document.body.style.pointerEvents = 'none';
[864] Fix | Delete
}
[865] Fix | Delete
context.layersWithOutsidePointerEventsDisabled.add(node1);
[866] Fix | Delete
}
[867] Fix | Delete
context.layers.add(node1);
[868] Fix | Delete
$5cb92bef7577960e$var$dispatchUpdate();
[869] Fix | Delete
return ()=>{
[870] Fix | Delete
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) document.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
[871] Fix | Delete
};
[872] Fix | Delete
}, [
[873] Fix | Delete
node1,
[874] Fix | Delete
disableOutsidePointerEvents,
[875] Fix | Delete
context
[876] Fix | Delete
]);
[877] Fix | Delete
/**
[878] Fix | Delete
* We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
[879] Fix | Delete
* because a change to `disableOutsidePointerEvents` would remove this layer from the stack
[880] Fix | Delete
* and add it to the end again so the layering order wouldn't be _creation order_.
[881] Fix | Delete
* We only want them to be removed from context stacks when unmounted.
[882] Fix | Delete
*/ (0,external_React_namespaceObject.useEffect)(()=>{
[883] Fix | Delete
return ()=>{
[884] Fix | Delete
if (!node1) return;
[885] Fix | Delete
context.layers.delete(node1);
[886] Fix | Delete
context.layersWithOutsidePointerEventsDisabled.delete(node1);
[887] Fix | Delete
$5cb92bef7577960e$var$dispatchUpdate();
[888] Fix | Delete
};
[889] Fix | Delete
}, [
[890] Fix | Delete
node1,
[891] Fix | Delete
context
[892] Fix | Delete
]);
[893] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[894] Fix | Delete
const handleUpdate = ()=>force({})
[895] Fix | Delete
;
[896] Fix | Delete
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
[897] Fix | Delete
return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
[898] Fix | Delete
;
[899] Fix | Delete
}, []);
[900] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
[901] Fix | Delete
ref: composedRefs,
[902] Fix | Delete
style: {
[903] Fix | Delete
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
[904] Fix | Delete
...props.style
[905] Fix | Delete
},
[906] Fix | Delete
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
[907] Fix | Delete
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
[908] Fix | Delete
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
[909] Fix | Delete
}));
[910] Fix | Delete
});
[911] Fix | Delete
/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {
[912] Fix | Delete
displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME
[913] Fix | Delete
});
[914] Fix | Delete
/* -------------------------------------------------------------------------------------------------
[915] Fix | Delete
* DismissableLayerBranch
[916] Fix | Delete
* -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';
[917] Fix | Delete
const $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
[918] Fix | Delete
const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
[919] Fix | Delete
const ref = (0,external_React_namespaceObject.useRef)(null);
[920] Fix | Delete
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
[921] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[922] Fix | Delete
const node = ref.current;
[923] Fix | Delete
if (node) {
[924] Fix | Delete
context.branches.add(node);
[925] Fix | Delete
return ()=>{
[926] Fix | Delete
context.branches.delete(node);
[927] Fix | Delete
};
[928] Fix | Delete
}
[929] Fix | Delete
}, [
[930] Fix | Delete
context.branches
[931] Fix | Delete
]);
[932] Fix | Delete
return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, props, {
[933] Fix | Delete
ref: composedRefs
[934] Fix | Delete
}));
[935] Fix | Delete
});
[936] Fix | Delete
/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {
[937] Fix | Delete
displayName: $5cb92bef7577960e$var$BRANCH_NAME
[938] Fix | Delete
});
[939] Fix | Delete
/* -----------------------------------------------------------------------------------------------*/ /**
[940] Fix | Delete
* Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
[941] Fix | Delete
* to mimic layer dismissing behaviour present in OS.
[942] Fix | Delete
* Returns props to pass to the node we want to check for outside events.
[943] Fix | Delete
*/ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {
[944] Fix | Delete
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
[945] Fix | Delete
const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false);
[946] Fix | Delete
const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{});
[947] Fix | Delete
(0,external_React_namespaceObject.useEffect)(()=>{
[948] Fix | Delete
const handlePointerDown = (event)=>{
[949] Fix | Delete
if (event.target && !isPointerInsideReactTreeRef.current) {
[950] Fix | Delete
const eventDetail = {
[951] Fix | Delete
originalEvent: event
[952] Fix | Delete
};
[953] Fix | Delete
function handleAndDispatchPointerDownOutsideEvent() {
[954] Fix | Delete
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
[955] Fix | Delete
discrete: true
[956] Fix | Delete
});
[957] Fix | Delete
}
[958] Fix | Delete
/**
[959] Fix | Delete
* On touch devices, we need to wait for a click event because browsers implement
[960] Fix | Delete
* a ~350ms delay between the time the user stops touching the display and when the
[961] Fix | Delete
* browser executres events. We need to ensure we don't reactivate pointer-events within
[962] Fix | Delete
* this timeframe otherwise the browser may execute events that should have been prevented.
[963] Fix | Delete
*
[964] Fix | Delete
* Additionally, this also lets us deal automatically with cancellations when a click event
[965] Fix | Delete
* isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
[966] Fix | Delete
*
[967] Fix | Delete
* This is why we also continuously remove the previous listener, because we cannot be
[968] Fix | Delete
* certain that it was raised, and therefore cleaned-up.
[969] Fix | Delete
*/ if (event.pointerType === 'touch') {
[970] Fix | Delete
document.removeEventListener('click', handleClickRef.current);
[971] Fix | Delete
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
[972] Fix | Delete
document.addEventListener('click', handleClickRef.current, {
[973] Fix | Delete
once: true
[974] Fix | Delete
});
[975] Fix | Delete
} else handleAndDispatchPointerDownOutsideEvent();
[976] Fix | Delete
}
[977] Fix | Delete
isPointerInsideReactTreeRef.current = false;
[978] Fix | Delete
};
[979] Fix | Delete
/**
[980] Fix | Delete
* if this hook executes in a component that mounts via a `pointerdown` event, the event
[981] Fix | Delete
* would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
[982] Fix | Delete
* this by delaying the event listener registration on the document.
[983] Fix | Delete
* This is not React specific, but rather how the DOM works, ie:
[984] Fix | Delete
* ```
[985] Fix | Delete
* button.addEventListener('pointerdown', () => {
[986] Fix | Delete
* console.log('I will log');
[987] Fix | Delete
* document.addEventListener('pointerdown', () => {
[988] Fix | Delete
* console.log('I will also log');
[989] Fix | Delete
* })
[990] Fix | Delete
* });
[991] Fix | Delete
*/ const timerId = window.setTimeout(()=>{
[992] Fix | Delete
document.addEventListener('pointerdown', handlePointerDown);
[993] Fix | Delete
}, 0);
[994] Fix | Delete
return ()=>{
[995] Fix | Delete
window.clearTimeout(timerId);
[996] Fix | Delete
document.removeEventListener('pointerdown', handlePointerDown);
[997] Fix | Delete
document.removeEventListener('click', handleClickRef.current);
[998] Fix | Delete
};
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function