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

1 line
114 KiB
JSON
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import React__default, { isValidElement, useRef, useLayoutEffect, useEffect, useReducer, cloneElement, useState, createElement } from 'react';\nimport cx from 'clsx';\nimport { render } from 'react-dom';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction isNum(v) {\n return typeof v === 'number' && !isNaN(v);\n}\n\nfunction isBool(v) {\n return typeof v === 'boolean';\n}\n\nfunction isStr(v) {\n return typeof v === 'string';\n}\n\nfunction isFn(v) {\n return typeof v === 'function';\n}\n\nfunction parseClassName(v) {\n return isStr(v) || isFn(v) ? v : null;\n}\n\nfunction isToastIdValid(toastId) {\n return toastId === 0 || toastId;\n}\n\nfunction getAutoCloseDelay(toastAutoClose, containerAutoClose) {\n return toastAutoClose === false || isNum(toastAutoClose) && toastAutoClose > 0 ? toastAutoClose : containerAutoClose;\n}\n\nvar canUseDom = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\nfunction canBeRendered(content) {\n return isValidElement(content) || isStr(content) || isFn(content) || isNum(content);\n}\n\nvar POSITION = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center'\n};\nvar TYPE = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n DEFAULT: 'default',\n DARK: 'dark'\n};\n/**\r\n * Used to collapse toast after exit animation\r\n */\n\nfunction collapseToast(node, done, duration\n/* COLLAPSE_DURATION */\n) {\n if (duration === void 0) {\n duration = 300;\n }\n\n var height = node.scrollHeight;\n var style = node.style;\n requestAnimationFrame(function () {\n style.minHeight = 'initial';\n style.height = height + 'px';\n style.transition = \"all \" + duration + \"ms\";\n requestAnimationFrame(function () {\n style.height = '0';\n style.padding = '0';\n style.margin = '0';\n setTimeout(done, duration);\n });\n });\n}\n/**\r\n * Css animation that just work.\r\n * You could use animate.css for instance\r\n *\r\n *\r\n * ```\r\n * cssTransition({\r\n * enter: \"animate__animated animate__bounceIn\",\r\n * exit: \"animate__animated animate__bounceOut\"\r\n * })\r\n * ```\r\n *\r\n */\n\n\nfunction cssTransition(_ref) {\n var enter = _ref.enter,\n exit = _ref.exit,\n _ref$appendPosition = _ref.appendPosition,\n appendPosition = _ref$appendPosition === void 0 ? false : _ref$appendPosition,\n _ref$collapse = _ref.collapse,\n collapse = _ref$collapse === void 0 ? true : _ref$collapse,\n _ref$collapseDuration = _ref.collapseDuration,\n collapseDuration = _ref$collapseDuration === void 0 ? 300 : _ref$collapseDuration;\n return function ToastTransition(_ref2) {\n var children = _ref2.children,\n position = _ref2.position,\n preventExitTransition = _ref2.preventExitTransition,\n done = _ref2.done,\n nodeRef = _ref2.nodeRef,\n isIn = _ref2.isIn;\n var enterClassName = appendPosition ? enter + \"--\" + position : enter;\n var exitClassName = appendPosition ? exit + \"--\" + position : exit;\n var baseClassName = useRef();\n var animationStep = useRef(0\n /* Enter */\n );\n useLayoutEffect(function () {\n onEnter();\n }, []);\n useEffect(fun