REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 3.35 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/react-popper/lib/esm/usePopper.js
Text
Base64
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { createPopper as defaultCreatePopper } from '@popperjs/core'; import isEqual from 'react-fast-compare'; import { fromEntries, useIsomorphicLayoutEffect } from './utils'; var EMPTY_MODIFIERS = []; export var usePopper = function usePopper(referenceElement, popperElement, options) { if (options === void 0) { options = {}; } var prevOptions = React.useRef(null); var optionsWithDefaults = { onFirstUpdate: options.onFirstUpdate, placement: options.placement || 'bottom', strategy: options.strategy || 'absolute', modifiers: options.modifiers || EMPTY_MODIFIERS }; var _React$useState = React.useState({ styles: { popper: { position: optionsWithDefaults.strategy, left: '0', top: '0' }, arrow: { position: 'absolute' } }, attributes: {} }), state = _React$useState[0], setState = _React$useState[1]; var updateStateModifier = React.useMemo(function () { return { name: 'updateState', enabled: true, phase: 'write', fn: function fn(_ref) { var state = _ref.state; var elements = Object.keys(state.elements); ReactDOM.flushSync(function () { setState({ styles: fromEntries(elements.map(function (element) { return [element, state.styles[element] || {}]; })), attributes: fromEntries(elements.map(function (element) { return [element, state.attributes[element]]; })) }); }); }, requires: ['computeStyles'] }; }, []); var popperOptions = React.useMemo(function () { var newOptions = { onFirstUpdate: optionsWithDefaults.onFirstUpdate, placement: optionsWithDefaults.placement, strategy: optionsWithDefaults.strategy, modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, { name: 'applyStyles', enabled: false }]) }; if (isEqual(prevOptions.current, newOptions)) { return prevOptions.current || newOptions; } else { prevOptions.current = newOptions; return newOptions; } }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]); var popperInstanceRef = React.useRef(); useIsomorphicLayoutEffect(function () { if (popperInstanceRef.current) { popperInstanceRef.current.setOptions(popperOptions); } }, [popperOptions]); useIsomorphicLayoutEffect(function () { if (referenceElement == null || popperElement == null) { return; } var createPopper = options.createPopper || defaultCreatePopper; var popperInstance = createPopper(referenceElement, popperElement, popperOptions); popperInstanceRef.current = popperInstance; return function () { popperInstance.destroy(); popperInstanceRef.current = null; }; }, [referenceElement, popperElement, options.createPopper]); return { state: popperInstanceRef.current ? popperInstanceRef.current.state : null, styles: state.styles, attributes: state.attributes, update: popperInstanceRef.current ? popperInstanceRef.current.update : null, forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null }; };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__typings__
DIR
-
drwxr-xr-x
2026-03-14 01:49:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
240 B
lrw-r--r--
2026-02-28 00:28:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Manager.js
905 B
lrw-r--r--
2026-02-28 00:28:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Popper.js
2.58 KB
lrw-r--r--
2026-02-28 00:28:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Reference.js
934 B
lrw-r--r--
2026-02-28 00:28:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RefTypes.js
0 B
lrw-r--r--
2026-02-28 00:28:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
usePopper.js
3.35 KB
lrw-r--r--
2026-02-28 00:28:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.js
1.49 KB
lrw-r--r--
2026-02-28 00:28:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).