GoScrobble/web/node_modules/.cache/babel-loader/fe76b9aa7e9a013b6c802f50ef667f89.json

1 line
24 KiB
JSON

{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport deepEqual from \"deep-equal\";\nimport * as React from 'react';\nimport PopperJS from 'popper.js';\nimport { ManagerReferenceNodeContext } from './Manager';\nimport { unwrapArray, setRef, shallowEqual } from './utils';\nvar initialStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n opacity: 0,\n pointerEvents: 'none'\n};\nvar initialArrowStyle = {};\nexport var InnerPopper = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(InnerPopper, _React$Component);\n\n function InnerPopper() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n data: undefined,\n placement: undefined\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperInstance\", void 0);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"arrowNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setPopperNode\", function (popperNode) {\n if (!popperNode || _this.popperNode === popperNode) return;\n setRef(_this.props.innerRef, popperNode);\n _this.popperNode = popperNode;\n\n _this.updatePopperInstance();\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setArrowNode\", function (arrowNode) {\n _this.arrowNode = arrowNode;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updateStateModifier\", {\n enabled: true,\n order: 900,\n fn: function fn(data) {\n var placement = data.placement;\n\n _this.setState({\n data: data,\n placement: placement\n });\n\n return data;\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOptions\", function () {\n return {\n placement: _this.props.placement,\n eventsEnabled: _this.props.eventsEnabled,\n positionFixed: _this.props.positionFixed,\n modifiers: _extends({}, _this.props.modifiers, {\n arrow: _extends({}, _this.props.modifiers && _this.props.modifiers.arrow, {\n enabled: !!_this.arrowNode,\n element: _this.arrowNode\n }),\n applyStyle: {\n enabled: false\n },\n updateStateModifier: _this.updateStateModifier\n })\n };\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperStyle\", function () {\n return !_this.popperNode || !_this.state.data ? initialStyle : _extends({\n position: _this.state.data.offsets.popper.position\n }, _this.state.data.styles);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperPlacement\", function () {\n return !_this.state.data ? undefined : _this.state.placement;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getArrowStyle\", function () {\n return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOutOfBoundariesState\", function () {\n return _this.state.data ? _this.state.data.hide : undefined;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"destroyPopperInstance\", function () {\n if (!_this.popperInstance) return;\n\n _this.popperInstance.destroy();\n\n _this.popperInstance = null;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updatePopperInstance\", function () {\n _this.destroyPopperInstance();\n\n var _assertThisInitialize = _assertThisInitialized(_assertThisInitialized(_this)),\n popperNode = _assertThisInitialize.popperNode;\n\n var referenceElement = _this.props.referenceElement;\n if (!referenceElement || !popperNode) return;\n _this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"scheduleUpdate\", function () {\n if (_this.popperInstance) {\n _this.popperInstance.scheduleUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = InnerPopper.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // If the Popper.js options have changed, update the instance (destroy + create)\n if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || !deepEqual(this.props.modifiers, prevProps.modifiers, {\n strict: true\n })) {\n // develop only check that modifiers isn't being updated needlessly\n if (process.env.NODE_ENV === \"development\") {\n if (this.props.modifiers !== prevProps.modifiers && this.props.modifiers != null && prevProps.modifiers != null && shallowEqual(this.props.modifiers, prevProps.modifiers)) {\n console.warn(\"'modifiers' prop reference updated even though all values appear the same.\\nConsider memoizing the 'modifiers' object to avoid needless rendering.\");\n }\n }\n\n this.updatePopperInstance();\n } else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {\n this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();\n } // A placement difference in state means popper determined a new placement\n // apart from the props value. By the time the popper element is rendered with\n // the new position Popper has already measured it, if the place change triggers\n // a size change it will result in a misaligned popper. So we schedule an update to be sure.\n\n\n if (prevState.placement !== this.state.placement) {\n this.scheduleUpdate();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n setRef(this.props.innerRef, null);\n this.destroyPopperInstance();\n };\n\n _proto.render = function render() {\n return unwrapArray(this.props.children)({\n ref: this.setPopperNode,\n style: this.getPopperStyle(),\n placement: this.getPopperPlacement(),\n outOfBoundaries: this.getOutOfBoundariesState(),\n scheduleUpdate: this.scheduleUpdate,\n arrowProps: {\n ref: this.setArrowNode,\n style: this.getArrowStyle()\n }\n });\n };\n\n return InnerPopper;\n}(React.Component);\n\n_defineProperty(InnerPopper, \"defaultProps\", {\n placement: 'bottom',\n eventsEnabled: true,\n referenceElement: undefined,\n positionFixed: false\n});\n\nvar placements = PopperJS.placements;\nexport { placements };\nexport default function Popper(_ref) {\n var referenceElement = _ref.referenceElement,\n props = _objectWithoutPropertiesLoose(_ref, [\"referenceElement\"]);\n\n return React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {\n return React.createElement(InnerPopper, _extends({\n referenceElement: referenceElement !== undefined ? referenceElement : referenceNode\n }, props));\n });\n}","map":{"version":3,"sources":["/app/node_modules/react-popper/lib/esm/Popper.js"],"names":["_objectWithoutPropertiesLoose","_extends","_inheritsLoose","_assertThisInitialized","_defineProperty","deepEqual","React","PopperJS","ManagerReferenceNodeContext","unwrapArray","setRef","shallowEqual","initialStyle","position","top","left","opacity","pointerEvents","initialArrowStyle","InnerPopper","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","data","undefined","placement","popperNode","props","innerRef","updatePopperInstance","arrowNode","enabled","order","fn","setState","eventsEnabled","positionFixed","modifiers","arrow","element","applyStyle","updateStateModifier","state","offsets","popper","styles","arrowStyles","hide","popperInstance","destroy","destroyPopperInstance","_assertThisInitialize","referenceElement","getOptions","scheduleUpdate","_proto","prototype","componentDidUpdate","prevProps","prevState","strict","process","env","NODE_ENV","console","warn","enableEventListeners","disableEventListeners","componentWillUnmount","render","children","ref","setPopperNode","style","getPopperStyle","getPopperPlacement","outOfBoundaries","getOutOfBoundariesState","arrowProps","setArrowNode","getArrowStyle","Component","placements","Popper","_ref","createElement","Consumer","referenceNode"],"mappings":"AAAA,OAAOA,6BAAP,MAA0C,qDAA1C;AACA,OAAOC,QAAP,MAAqB,gCAArB;AACA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,OAAOC,sBAAP,MAAmC,8CAAnC;AACA,OAAOC,eAAP,MAA4B,uCAA5B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,SAASC,2BAAT,QAA4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AA,GAAG,EAAE,KAAKQ,YADA;AAEVN,QAAAA,KAAK,EAAE,KAAKO,aAAL;AAFG;AAN0B,KAAjC,CAAP;AAWD,GAZD;;AAcA,SAAOrE,WAAP;AACD,CAlKD,CAkKEb,KAAK,CAACmF,SAlKR,CAFO;;AAsKPrF,eAAe,CAACe,WAAD,EAAc,cAAd,EAA8B;AAC3Cc,EAAAA,SAAS,EAAE,QADgC;AAE3CU,EAAAA,aAAa,EAAE,IAF4B;AAG3CiB,EAAAA,gBAAgB,EAAE5B,SAHyB;AAI3CY,EAAAA,aAAa,EAAE;AAJ4B,CAA9B,CAAf;;AAOA,IAAI8C,UAAU,GAAGnF,QAAQ,CAACmF,UAA1B;AACA,SAASA,UAAT;AACA,eAAe,SAASC,MAAT,CAAgBC,IAAhB,EAAsB;AACnC,MAAIhC,gBAAgB,GAAGgC,IAAI,CAAChC,gBAA5B;AAAA,MACIzB,KAAK,GAAGnC,6BAA6B,CAAC4F,IAAD,EAAO,CAAC,kBAAD,CAAP,CADzC;;AAGA,SAAOtF,KAAK,CAACuF,aAAN,CAAoBrF,2BAA2B,CAACsF,QAAhD,EAA0D,IAA1D,EAAgE,UAAUC,aAAV,EAAyB;AAC9F,WAAOzF,KAAK,CAACuF,aAAN,CAAoB1E,WAApB,EAAiClB,QAAQ,CAAC;AAC/C2D,MAAAA,gBAAgB,EAAEA,gBAAgB,KAAK5B,SAArB,GAAiC4B,gBAAjC,GAAoDmC;AADvB,KAAD,EAE7C5D,KAF6C,CAAzC,CAAP;AAGD,GAJM,CAAP;AAKD","sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport deepEqual from \"deep-equal\";\nimport * as React from 'react';\nimport PopperJS from 'popper.js';\nimport { ManagerReferenceNodeContext } from './Manager';\nimport { unwrapArray, setRef, shallowEqual } from './utils';\nvar initialStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n opacity: 0,\n pointerEvents: 'none'\n};\nvar initialArrowStyle = {};\nexport var InnerPopper =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(InnerPopper, _React$Component);\n\n function InnerPopper() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {\n data: undefined,\n placement: undefined\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperInstance\", void 0);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"popperNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"arrowNode\", null);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setPopperNode\", function (popperNode) {\n if (!popperNode || _this.popperNode === popperNode) return;\n setRef(_this.props.innerRef, popperNode);\n _this.popperNode = popperNode;\n\n _this.updatePopperInstance();\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"setArrowNode\", function (arrowNode) {\n _this.arrowNode = arrowNode;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updateStateModifier\", {\n enabled: true,\n order: 900,\n fn: function fn(data) {\n var placement = data.placement;\n\n _this.setState({\n data: data,\n placement: placement\n });\n\n return data;\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOptions\", function () {\n return {\n placement: _this.props.placement,\n eventsEnabled: _this.props.eventsEnabled,\n positionFixed: _this.props.positionFixed,\n modifiers: _extends({}, _this.props.modifiers, {\n arrow: _extends({}, _this.props.modifiers && _this.props.modifiers.arrow, {\n enabled: !!_this.arrowNode,\n element: _this.arrowNode\n }),\n applyStyle: {\n enabled: false\n },\n updateStateModifier: _this.updateStateModifier\n })\n };\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperStyle\", function () {\n return !_this.popperNode || !_this.state.data ? initialStyle : _extends({\n position: _this.state.data.offsets.popper.position\n }, _this.state.data.styles);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getPopperPlacement\", function () {\n return !_this.state.data ? undefined : _this.state.placement;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getArrowStyle\", function () {\n return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getOutOfBoundariesState\", function () {\n return _this.state.data ? _this.state.data.hide : undefined;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"destroyPopperInstance\", function () {\n if (!_this.popperInstance) return;\n\n _this.popperInstance.destroy();\n\n _this.popperInstance = null;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updatePopperInstance\", function () {\n _this.destroyPopperInstance();\n\n var _assertThisInitialize = _assertThisInitialized(_assertThisInitialized(_this)),\n popperNode = _assertThisInitialize.popperNode;\n\n var referenceElement = _this.props.referenceElement;\n if (!referenceElement || !popperNode) return;\n _this.popperInstance = new PopperJS(referenceElement, popperNode, _this.getOptions());\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"scheduleUpdate\", function () {\n if (_this.popperInstance) {\n _this.popperInstance.scheduleUpdate();\n }\n });\n\n return _this;\n }\n\n var _proto = InnerPopper.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // If the Popper.js options have changed, update the instance (destroy + create)\n if (this.props.placement !== prevProps.placement || this.props.referenceElement !== prevProps.referenceElement || this.props.positionFixed !== prevProps.positionFixed || !deepEqual(this.props.modifiers, prevProps.modifiers, {\n strict: true\n })) {\n // develop only check that modifiers isn't being updated needlessly\n if (process.env.NODE_ENV === \"development\") {\n if (this.props.modifiers !== prevProps.modifiers && this.props.modifiers != null && prevProps.modifiers != null && shallowEqual(this.props.modifiers, prevProps.modifiers)) {\n console.warn(\"'modifiers' prop reference updated even though all values appear the same.\\nConsider memoizing the 'modifiers' object to avoid needless rendering.\");\n }\n }\n\n this.updatePopperInstance();\n } else if (this.props.eventsEnabled !== prevProps.eventsEnabled && this.popperInstance) {\n this.props.eventsEnabled ? this.popperInstance.enableEventListeners() : this.popperInstance.disableEventListeners();\n } // A placement difference in state means popper determined a new placement\n // apart from the props value. By the time the popper element is rendered with\n // the new position Popper has already measured it, if the place change triggers\n // a size change it will result in a misaligned popper. So we schedule an update to be sure.\n\n\n if (prevState.placement !== this.state.placement) {\n this.scheduleUpdate();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n setRef(this.props.innerRef, null);\n this.destroyPopperInstance();\n };\n\n _proto.render = function render() {\n return unwrapArray(this.props.children)({\n ref: this.setPopperNode,\n style: this.getPopperStyle(),\n placement: this.getPopperPlacement(),\n outOfBoundaries: this.getOutOfBoundariesState(),\n scheduleUpdate: this.scheduleUpdate,\n arrowProps: {\n ref: this.setArrowNode,\n style: this.getArrowStyle()\n }\n });\n };\n\n return InnerPopper;\n}(React.Component);\n\n_defineProperty(InnerPopper, \"defaultProps\", {\n placement: 'bottom',\n eventsEnabled: true,\n referenceElement: undefined,\n positionFixed: false\n});\n\nvar placements = PopperJS.placements;\nexport { placements };\nexport default function Popper(_ref) {\n var referenceElement = _ref.referenceElement,\n props = _objectWithoutPropertiesLoose(_ref, [\"referenceElement\"]);\n\n return React.createElement(ManagerReferenceNodeContext.Consumer, null, function (referenceNode) {\n return React.createElement(InnerPopper, _extends({\n referenceElement: referenceElement !== undefined ? referenceElement : referenceNode\n }, props));\n });\n}"]},"metadata":{},"sourceType":"module"}