PHP 8.2.30
Preview: Popper.js Size: 3.66 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/react-popper/lib/cjs/Popper.js

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Popper = Popper;

var React = _interopRequireWildcard(require("react"));

var _Manager = require("./Manager");

var _utils = require("./utils");

var _usePopper2 = require("./usePopper");

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

var NOOP = function NOOP() {
  return void 0;
};

var NOOP_PROMISE = function NOOP_PROMISE() {
  return Promise.resolve(null);
};

var EMPTY_MODIFIERS = [];

function Popper(_ref) {
  var _ref$placement = _ref.placement,
      placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
      _ref$strategy = _ref.strategy,
      strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,
      _ref$modifiers = _ref.modifiers,
      modifiers = _ref$modifiers === void 0 ? EMPTY_MODIFIERS : _ref$modifiers,
      referenceElement = _ref.referenceElement,
      onFirstUpdate = _ref.onFirstUpdate,
      innerRef = _ref.innerRef,
      children = _ref.children;
  var referenceNode = React.useContext(_Manager.ManagerReferenceNodeContext);

  var _React$useState = React.useState(null),
      popperElement = _React$useState[0],
      setPopperElement = _React$useState[1];

  var _React$useState2 = React.useState(null),
      arrowElement = _React$useState2[0],
      setArrowElement = _React$useState2[1];

  React.useEffect(function () {
    (0, _utils.setRef)(innerRef, popperElement);
  }, [innerRef, popperElement]);
  var options = React.useMemo(function () {
    return {
      placement: placement,
      strategy: strategy,
      onFirstUpdate: onFirstUpdate,
      modifiers: [].concat(modifiers, [{
        name: 'arrow',
        enabled: arrowElement != null,
        options: {
          element: arrowElement
        }
      }])
    };
  }, [placement, strategy, onFirstUpdate, modifiers, arrowElement]);

  var _usePopper = (0, _usePopper2.usePopper)(referenceElement || referenceNode, popperElement, options),
      state = _usePopper.state,
      styles = _usePopper.styles,
      forceUpdate = _usePopper.forceUpdate,
      update = _usePopper.update;

  var childrenProps = React.useMemo(function () {
    return {
      ref: setPopperElement,
      style: styles.popper,
      placement: state ? state.placement : placement,
      hasPopperEscaped: state && state.modifiersData.hide ? state.modifiersData.hide.hasPopperEscaped : null,
      isReferenceHidden: state && state.modifiersData.hide ? state.modifiersData.hide.isReferenceHidden : null,
      arrowProps: {
        style: styles.arrow,
        ref: setArrowElement
      },
      forceUpdate: forceUpdate || NOOP,
      update: update || NOOP_PROMISE
    };
  }, [setPopperElement, setArrowElement, placement, state, styles, update, forceUpdate]);
  return (0, _utils.unwrapArray)(children)(childrenProps);
}

Directory Contents

Dirs: 1 × Files: 14

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-28 00:28:44
Edit Download
746 B lrw-r--r-- 2026-02-28 00:28:24
Edit Download
607 B lrw-r--r-- 2026-02-28 00:28:26
Edit Download
2.16 KB lrw-r--r-- 2026-02-28 00:27:44
Edit Download
1.03 KB lrw-r--r-- 2026-02-28 00:27:52
Edit Download
3.66 KB lrw-r--r-- 2026-02-28 00:28:00
Edit Download
3.04 KB lrw-r--r-- 2026-02-28 00:28:04
Edit Download
2.13 KB lrw-r--r-- 2026-02-28 00:28:16
Edit Download
1.12 KB lrw-r--r-- 2026-02-28 00:28:20
Edit Download
13 B lrw-r--r-- 2026-02-28 00:28:08
Edit Download
145 B lrw-r--r-- 2026-02-28 00:28:12
Edit Download
4.61 KB lrw-r--r-- 2026-02-28 00:28:28
Edit Download
3.96 KB lrw-r--r-- 2026-02-28 00:28:28
Edit Download
2.81 KB lrw-r--r-- 2026-02-28 00:28:30
Edit Download
1.46 KB lrw-r--r-- 2026-02-28 00:28:30
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).