mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
27 KiB
JSON
1 line
27 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { Popper as ReactPopper } from 'react-popper';\nimport { getTarget, targetPropType, mapToCssModules, DOMElement, tagPropType } from './utils';\nimport Fade from './Fade';\n\nfunction noop() {}\n\nvar propTypes = {\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n popperClassName: PropTypes.string,\n placement: PropTypes.string,\n placementPrefix: PropTypes.string,\n arrowClassName: PropTypes.string,\n hideArrow: PropTypes.bool,\n tag: tagPropType,\n isOpen: PropTypes.bool.isRequired,\n cssModule: PropTypes.object,\n offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fallbackPlacement: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n flip: PropTypes.bool,\n container: targetPropType,\n target: targetPropType.isRequired,\n modifiers: PropTypes.object,\n positionFixed: PropTypes.bool,\n boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),\n onClosed: PropTypes.func,\n fade: PropTypes.bool,\n transition: PropTypes.shape(Fade.propTypes)\n};\nvar defaultProps = {\n boundariesElement: 'scrollParent',\n placement: 'auto',\n hideArrow: false,\n isOpen: false,\n offset: 0,\n fallbackPlacement: 'flip',\n flip: true,\n container: 'body',\n modifiers: {},\n onClosed: noop,\n fade: true,\n transition: _objectSpread({}, Fade.defaultProps)\n};\n\nvar PopperContent = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(PopperContent, _React$Component);\n\n function PopperContent(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_this));\n _this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_this));\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));\n _this.state = {\n isOpen: props.isOpen\n };\n return _this;\n }\n\n PopperContent.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.isOpen && !state.isOpen) {\n return {\n isOpen: props.isOpen\n };\n } else return null;\n };\n\n var _proto = PopperContent.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n if (this._element && this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {\n this._element.childNodes[0].focus();\n }\n };\n\n _proto.setTargetNode = function setTargetNode(node) {\n this.targetNode = typeof node === 'string' ? getTarget(node) : node;\n };\n\n _proto.getTargetNode = function getTargetNode() {\n return this.targetNode;\n };\n\n _proto.getContainerNode = function getContainerNode() {\n return getTarget(this.props.container);\n };\n\n _proto.getRef = function getRef(ref) {\n this._element = ref;\n };\n\n _proto.onClosed = function onClosed() {\n this.props.onClosed();\n this.setState({\n isOpen: false\n });\n };\n\n _proto.renderChildren = function renderChildren() {\n var _this$props = this.props,\n cssModule = _this$props.cssModule,\n children = _this$props.children,\n isOpen = _this$props.isOpen,\n flip = _this$props.flip,\n target = _this$props.target,\n offset = _this$props.offset,\n fallbackPlacement = _this$props.fallbackPlacement,\n placementPrefix = _this$props.placementPrefix,\n _arrowClassName = _this$props.arrowClassName,\n hideArrow = _this$props.hideArrow,\n _popperClassName = _this$props.popperClassName,\n tag = _this$props.tag,\n container = _this$props.container,\n modifiers = _this$props.modifiers,\n positionFixed = _this$props.positionFixed,\n boundariesElement = _this$props.boundariesElement,\n onClosed = _this$props.onClosed,\n fade = _this$props.fade,\n transition = _this$props.transition,\n placement = _this$props.placement,\n attrs = _objectWithoutPropertiesLoose(_this$props, [\"cssModule\", \"children\", \"isOpen\", \"flip\", \"target\", \"offset\", \"fallbackPlacement\", \"placementPrefix\", \"arrowClassName\", \"hideArrow\", \"popperClassName\", \"tag\", \"container\", \"modifiers\", \"positionFixed\", \"boundariesElement\", \"onClosed\", \"fade\", \"transition\", \"placement\"]);\n\n var arrowClassName = mapToCssModules(classNames('arrow', _arrowClassName), cssModule);\n var popperClassName = mapToCssModules(classNames(_popperClassName, placementPrefix ? placementPrefix + \"-auto\" : ''), this.props.cssModule);\n\n var extendedModifiers = _objectSpread({\n offset: {\n offset: offset\n },\n flip: {\n enabled: flip,\n behavior: fallbackPlacement\n },\n preventOverflow: {\n boundariesElement: boundariesElement\n }\n }, modifiers);\n\n var popperTransition = _objectSpread(_objectSpread(_objectSpread({}, Fade.defaultProps), transition), {}, {\n baseClass: fade ? transition.baseClass : '',\n timeout: fade ? transition.timeout : 0\n });\n\n return /*#__PURE__*/React.createElement(Fade, _extends({}, popperTransition, attrs, {\n in: isOpen,\n onExited: this.onClosed,\n tag: tag\n }), /*#__PURE__*/React.createElement(ReactPopper, {\n referenceElement: this.targetNode,\n modifiers: extendedModifiers,\n placement: placement,\n positionFixed: positionFixed\n }, function (_ref) {\n var ref = _ref.ref,\n style = _ref.style,\n placement = _ref.placement,\n outOfBoundaries = _ref.outOfBoundaries,\n arrowProps = _ref.arrowProps,\n scheduleUpdate = _ref.scheduleUpdate;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n style: style,\n className: popperClassName,\n \"x-placement\": placement,\n \"x-out-of-boundaries\": outOfBoundaries ? 'true' : undefined\n }, typeof children === 'function' ? children({\n scheduleUpdate: scheduleUpdate\n }) : children, !hideArrow && /*#__PURE__*/React.createElement(\"span\", {\n ref: arrowProps.ref,\n className: arrowClassName,\n style: arrowProps.style\n }));\n }));\n };\n\n _proto.render = function render() {\n this.setTargetNode(this.props.target);\n\n if (this.state.isOpen) {\n return this.props.container === 'inline' ? this.renderChildren() : /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(\"div\", {\n ref: this.getRef\n }, this.renderChildren()), this.getContainerNode());\n }\n\n return null;\n };\n\n return PopperContent;\n}(React.Component);\n\nPopperContent.propTypes = propTypes;\nPopperContent.defaultProps = defaultProps;\nexport default PopperContent;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/PopperContent.js"],"names":["_extends","_objectWithoutPropertiesLoose","_assertThisInitialized","_inheritsLoose","_defineProperty","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","getOwnPropertyDescriptors","defineProperties","defineProperty","React","PropTypes","ReactDOM","classNames","Popper","ReactPopper","getTarget","targetPropType","mapToCssModules","DOMElement","tagPropType","Fade","noop","propTypes","children","oneOfType","node","func","isRequired","popperClassName","string","placement","placementPrefix","arrowClassName","hideArrow","bool","tag","isOpen","cssModule","offset","number","fallbackPlacement","array","flip","container","modifiers","positionFixed","boundariesElement","onClosed","fade","transition","shape","defaultProps","PopperContent","_React$Component","props","_this","call","setTargetNode","bind","getTargetNode","getRef","state","getDerivedStateFromProps","_proto","prototype","componentDidUpdate","_element","childNodes","focus","targetNode","getContainerNode","ref","setState","renderChildren","_this$props","_arrowClassName","_popperClassName","attrs","extendedModifiers","enabled","behavior","preventOverflow","popperTransition","baseClass","timeout","createElement","in","onExited","referenceElement","_ref","style","outOfBoundaries","arrowProps","scheduleUpdate","className","undefined","render","createPortal","Component"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,sBAAP,MAAmC,kDAAnC;AACA,OAAOC,cAAP,MAA2B,0CAA3B;AACA,OAAOC,eAAP,MAA4B,2CAA5B;;AAEA,SAASC,OAAT,CAAiBC,MAAjB,EAAyBC,cAAzB,EAAyC;AAAE,MAAIC,IAAI,GAAGC,MAAM,CAACD,IAAP,CAAYF,MAAZ,CAAX;;AAAgC,MAAIG,MAAM,CAACC,qBAAX,EAAkC;AAAE,QAAIC,OAAO,GAAGF,MAAM,CAACC,qBAAP,CAA6BJ,MAA7B,CAAd;AAAoD,QAAIC,cAAJ,EAAoBI,OAAO,GAAGA,OAAO,CAACC,MAAR,CAAe,UAAUC,GAAV,EAAe;AAAE,aAAOJ,MAAM,CAACK,wBAAP,CAAgCR,MAAhC,EAAwCO,GAAxC,EAA6CE,UAApD;AAAiE,KAAjG,CAAV;AAA8GP,IAAAA,IAAI,CAACQ,IAAL,CAAUC,KAAV,CAAgBT,IAAhB,EAAsBG,OAAtB;AAAiC;;AAAC,SAAOH,IAAP;AAAc;;AAErV,SAASU,aAAT,CAAuBC,MAAvB,EAA+B;AAAE,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGC,SAAS,CAACC,MAA9B,EAAsCF,CAAC,EAAvC,EAA2C;AAAE,QAAIG,MAAM,GAAGF,SAAS,CAACD,CAAD,CAAT,IAAgB,IAAhB,GAAuBC,SAAS,CAACD,CAAD,CAAhC,GAAsC,EAAn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AK,CAAC4E,aAAN,CAAoB,MAApB,EAA4B;AACpEd,QAAAA,GAAG,EAAEqB,UAAU,CAACrB,GADoD;AAEpEuB,QAAAA,SAAS,EAAE9D,cAFyD;AAGpE0D,QAAAA,KAAK,EAAEE,UAAU,CAACF;AAHkD,OAA5B,CARtB,CAApB;AAaD,KAzBgB,CAJG,CAApB;AA8BD,GA3ED;;AA6EA3B,EAAAA,MAAM,CAACiC,MAAP,GAAgB,SAASA,MAAT,GAAkB;AAChC,SAAKvC,aAAL,CAAmB,KAAKH,KAAL,CAAWvD,MAA9B;;AAEA,QAAI,KAAK8D,KAAL,CAAWzB,MAAf,EAAuB;AACrB,aAAO,KAAKkB,KAAL,CAAWX,SAAX,KAAyB,QAAzB,GAAoC,KAAK8B,cAAL,EAApC,GAA4D,aAAa9D,QAAQ,CAACsF,YAAT,EAAuB,aAAaxF,KAAK,CAAC4E,aAAN,CAAoB,KAApB,EAA2B;AAC7Id,QAAAA,GAAG,EAAE,KAAKX;AADmI,OAA3B,EAEjH,KAAKa,cAAL,EAFiH,CAApC,EAErD,KAAKH,gBAAL,EAFqD,CAAhF;AAGD;;AAED,WAAO,IAAP;AACD,GAVD;;AAYA,SAAOlB,aAAP;AACD,CAlJgC,CAkJ/B3C,KAAK,CAACyF,SAlJyB,CAAjC;;AAoJA9C,aAAa,CAAC9B,SAAd,GAA0BA,SAA1B;AACA8B,aAAa,CAACD,YAAd,GAA6BA,YAA7B;AACA,eAAeC,aAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport { Popper as ReactPopper } from 'react-popper';\nimport { getTarget, targetPropType, mapToCssModules, DOMElement, tagPropType } from './utils';\nimport Fade from './Fade';\n\nfunction noop() {}\n\nvar propTypes = {\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n popperClassName: PropTypes.string,\n placement: PropTypes.string,\n placementPrefix: PropTypes.string,\n arrowClassName: PropTypes.string,\n hideArrow: PropTypes.bool,\n tag: tagPropType,\n isOpen: PropTypes.bool.isRequired,\n cssModule: PropTypes.object,\n offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n fallbackPlacement: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n flip: PropTypes.bool,\n container: targetPropType,\n target: targetPropType.isRequired,\n modifiers: PropTypes.object,\n positionFixed: PropTypes.bool,\n boundariesElement: PropTypes.oneOfType([PropTypes.string, DOMElement]),\n onClosed: PropTypes.func,\n fade: PropTypes.bool,\n transition: PropTypes.shape(Fade.propTypes)\n};\nvar defaultProps = {\n boundariesElement: 'scrollParent',\n placement: 'auto',\n hideArrow: false,\n isOpen: false,\n offset: 0,\n fallbackPlacement: 'flip',\n flip: true,\n container: 'body',\n modifiers: {},\n onClosed: noop,\n fade: true,\n transition: _objectSpread({}, Fade.defaultProps)\n};\n\nvar PopperContent = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(PopperContent, _React$Component);\n\n function PopperContent(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.setTargetNode = _this.setTargetNode.bind(_assertThisInitialized(_this));\n _this.getTargetNode = _this.getTargetNode.bind(_assertThisInitialized(_this));\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.onClosed = _this.onClosed.bind(_assertThisInitialized(_this));\n _this.state = {\n isOpen: props.isOpen\n };\n return _this;\n }\n\n PopperContent.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n if (props.isOpen && !state.isOpen) {\n return {\n isOpen: props.isOpen\n };\n } else return null;\n };\n\n var _proto = PopperContent.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n if (this._element && this._element.childNodes && this._element.childNodes[0] && this._element.childNodes[0].focus) {\n this._element.childNodes[0].focus();\n }\n };\n\n _proto.setTargetNode = function setTargetNode(node) {\n this.targetNode = typeof node === 'string' ? getTarget(node) : node;\n };\n\n _proto.getTargetNode = function getTargetNode() {\n return this.targetNode;\n };\n\n _proto.getContainerNode = function getContainerNode() {\n return getTarget(this.props.container);\n };\n\n _proto.getRef = function getRef(ref) {\n this._element = ref;\n };\n\n _proto.onClosed = function onClosed() {\n this.props.onClosed();\n this.setState({\n isOpen: false\n });\n };\n\n _proto.renderChildren = function renderChildren() {\n var _this$props = this.props,\n cssModule = _this$props.cssModule,\n children = _this$props.children,\n isOpen = _this$props.isOpen,\n flip = _this$props.flip,\n target = _this$props.target,\n offset = _this$props.offset,\n fallbackPlacement = _this$props.fallbackPlacement,\n placementPrefix = _this$props.placementPrefix,\n _arrowClassName = _this$props.arrowClassName,\n hideArrow = _this$props.hideArrow,\n _popperClassName = _this$props.popperClassName,\n tag = _this$props.tag,\n container = _this$props.container,\n modifiers = _this$props.modifiers,\n positionFixed = _this$props.positionFixed,\n boundariesElement = _this$props.boundariesElement,\n onClosed = _this$props.onClosed,\n fade = _this$props.fade,\n transition = _this$props.transition,\n placement = _this$props.placement,\n attrs = _objectWithoutPropertiesLoose(_this$props, [\"cssModule\", \"children\", \"isOpen\", \"flip\", \"target\", \"offset\", \"fallbackPlacement\", \"placementPrefix\", \"arrowClassName\", \"hideArrow\", \"popperClassName\", \"tag\", \"container\", \"modifiers\", \"positionFixed\", \"boundariesElement\", \"onClosed\", \"fade\", \"transition\", \"placement\"]);\n\n var arrowClassName = mapToCssModules(classNames('arrow', _arrowClassName), cssModule);\n var popperClassName = mapToCssModules(classNames(_popperClassName, placementPrefix ? placementPrefix + \"-auto\" : ''), this.props.cssModule);\n\n var extendedModifiers = _objectSpread({\n offset: {\n offset: offset\n },\n flip: {\n enabled: flip,\n behavior: fallbackPlacement\n },\n preventOverflow: {\n boundariesElement: boundariesElement\n }\n }, modifiers);\n\n var popperTransition = _objectSpread(_objectSpread(_objectSpread({}, Fade.defaultProps), transition), {}, {\n baseClass: fade ? transition.baseClass : '',\n timeout: fade ? transition.timeout : 0\n });\n\n return /*#__PURE__*/React.createElement(Fade, _extends({}, popperTransition, attrs, {\n in: isOpen,\n onExited: this.onClosed,\n tag: tag\n }), /*#__PURE__*/React.createElement(ReactPopper, {\n referenceElement: this.targetNode,\n modifiers: extendedModifiers,\n placement: placement,\n positionFixed: positionFixed\n }, function (_ref) {\n var ref = _ref.ref,\n style = _ref.style,\n placement = _ref.placement,\n outOfBoundaries = _ref.outOfBoundaries,\n arrowProps = _ref.arrowProps,\n scheduleUpdate = _ref.scheduleUpdate;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: ref,\n style: style,\n className: popperClassName,\n \"x-placement\": placement,\n \"x-out-of-boundaries\": outOfBoundaries ? 'true' : undefined\n }, typeof children === 'function' ? children({\n scheduleUpdate: scheduleUpdate\n }) : children, !hideArrow && /*#__PURE__*/React.createElement(\"span\", {\n ref: arrowProps.ref,\n className: arrowClassName,\n style: arrowProps.style\n }));\n }));\n };\n\n _proto.render = function render() {\n this.setTargetNode(this.props.target);\n\n if (this.state.isOpen) {\n return this.props.container === 'inline' ? this.renderChildren() : /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(\"div\", {\n ref: this.getRef\n }, this.renderChildren()), this.getContainerNode());\n }\n\n return null;\n };\n\n return PopperContent;\n}(React.Component);\n\nPopperContent.propTypes = propTypes;\nPopperContent.defaultProps = defaultProps;\nexport default PopperContent;"]},"metadata":{},"sourceType":"module"} |