PromoCursed/node_modules/.cache/babel-loader/038b45f51f452cca4dd042c78864b57a099f0e866096ae77f561e2eb3594fce5.json
2024-08-20 23:25:37 +04:00

1 line
27 KiB
JSON

{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent } from 'rc-util';\nimport useState from \"rc-util/es/hooks/useState\";\nimport useSyncState from \"rc-util/es/hooks/useSyncState\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { STATUS_APPEAR, STATUS_ENTER, STATUS_LEAVE, STATUS_NONE, STEP_ACTIVE, STEP_PREPARE, STEP_PREPARED, STEP_START } from \"../interface\";\nimport useDomMotionEvents from \"./useDomMotionEvents\";\nimport useIsomorphicLayoutEffect from \"./useIsomorphicLayoutEffect\";\nimport useStepQueue, { DoStep, isActive, SkipStep } from \"./useStepQueue\";\nexport default function useStatus(supportMotion, visible, getElement, _ref) {\n var _ref$motionEnter = _ref.motionEnter,\n motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,\n _ref$motionAppear = _ref.motionAppear,\n motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,\n _ref$motionLeave = _ref.motionLeave,\n motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,\n motionDeadline = _ref.motionDeadline,\n motionLeaveImmediately = _ref.motionLeaveImmediately,\n onAppearPrepare = _ref.onAppearPrepare,\n onEnterPrepare = _ref.onEnterPrepare,\n onLeavePrepare = _ref.onLeavePrepare,\n onAppearStart = _ref.onAppearStart,\n onEnterStart = _ref.onEnterStart,\n onLeaveStart = _ref.onLeaveStart,\n onAppearActive = _ref.onAppearActive,\n onEnterActive = _ref.onEnterActive,\n onLeaveActive = _ref.onLeaveActive,\n onAppearEnd = _ref.onAppearEnd,\n onEnterEnd = _ref.onEnterEnd,\n onLeaveEnd = _ref.onLeaveEnd,\n onVisibleChanged = _ref.onVisibleChanged;\n // Used for outer render usage to avoid `visible: false & status: none` to render nothing\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n asyncVisible = _useState2[0],\n setAsyncVisible = _useState2[1];\n var _useSyncState = useSyncState(STATUS_NONE),\n _useSyncState2 = _slicedToArray(_useSyncState, 2),\n getStatus = _useSyncState2[0],\n setStatus = _useSyncState2[1];\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n style = _useState4[0],\n setStyle = _useState4[1];\n var currentStatus = getStatus();\n var mountedRef = useRef(false);\n var deadlineRef = useRef(null);\n\n // =========================== Dom Node ===========================\n function getDomElement() {\n return getElement();\n }\n\n // ========================== Motion End ==========================\n var activeRef = useRef(false);\n\n /**\n * Clean up status & style\n */\n function updateMotionEndStatus() {\n setStatus(STATUS_NONE);\n setStyle(null, true);\n }\n var onInternalMotionEnd = useEvent(function (event) {\n var status = getStatus();\n // Do nothing since not in any transition status.\n // This may happen when `motionDeadline` trigger.\n if (status === STATUS_NONE) {\n return;\n }\n var element = getDomElement();\n if (event && !event.deadline && event.target !== element) {\n // event exists\n // not initiated by deadline\n // transitionEnd not fired by inner elements\n return;\n }\n var currentActive = activeRef.current;\n var canEnd;\n if (status === STATUS_APPEAR && currentActive) {\n canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);\n } else if (status === STATUS_ENTER && currentActive) {\n canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);\n } else if (status === STATUS_LEAVE && currentActive) {\n canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);\n }\n\n // Only update status when `canEnd` and not destroyed\n if (currentActive && canEnd !== false) {\n updateMotionEndStatus();\n }\n });\n var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),\n _useDomMotionEvents2 = _slicedToArray(_useDomMotionEvents, 1),\n patchMotionEvents = _useDomMotionEvents2[0];\n\n // ============================= Step =============================\n var getEventHandlers = function getEventHandlers(targetStatus) {\n switch (targetStatus) {\n case STATUS_APPEAR:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);\n case STATUS_ENTER:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);\n case STATUS_LEAVE:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);\n default:\n return {};\n }\n };\n var eventHandlers = React.useMemo(function () {\n return getEventHandlers(currentStatus);\n }, [currentStatus]);\n var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function (newStep) {\n // Only prepare step can be skip\n if (newStep === STEP_PREPARE) {\n var onPrepare = eventHandlers[STEP_PREPARE];\n if (!onPrepare) {\n return SkipStep;\n }\n return onPrepare(getDomElement());\n }\n\n // Rest step is sync update\n if (step in eventHandlers) {\n var _eventHandlers$step;\n setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);\n }\n if (step === STEP_ACTIVE && currentStatus !== STATUS_NONE) {\n // Patch events when motion needed\n patchMotionEvents(getDomElement());\n if (motionDeadline > 0) {\n clearTimeout(deadlineRef.current);\n deadlineRef.current = setTimeout(function () {\n onInternalMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n }\n if (step === STEP_PREPARED) {\n updateMotionEndStatus();\n }\n return DoStep;\n }),\n _useStepQueue2 = _slicedToArray(_useStepQueue, 2),\n startStep = _useStepQueue2[0],\n step = _useStepQueue2[1];\n var active = isActive(step);\n activeRef.current = active;\n\n // ============================ Status ============================\n // Update with new status\n useIsomorphicLayoutEffect(function () {\n setAsyncVisible(visible);\n var isMounted = mountedRef.current;\n mountedRef.current = true;\n\n // if (!supportMotion) {\n // return;\n // }\n\n var nextStatus;\n\n // Appear\n if (!isMounted && visible && motionAppear) {\n nextStatus = STATUS_APPEAR;\n }\n\n // Enter\n if (isMounted && visible && motionEnter) {\n nextStatus = STATUS_ENTER;\n }\n\n // Leave\n if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {\n nextStatus = STATUS_LEAVE;\n }\n var nextEventHandlers = getEventHandlers(nextStatus);\n\n // Update to next status\n if (nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE])) {\n setStatus(nextStatus);\n startStep();\n } else {\n // Set back in case no motion but prev status has prepare step\n setStatus(STATUS_NONE);\n }\n }, [visible]);\n\n // ============================ Effect ============================\n // Reset when motion changed\n useEffect(function () {\n if (\n // Cancel appear\n currentStatus === STATUS_APPEAR && !motionAppear ||\n // Cancel enter\n currentStatus === STATUS_ENTER && !motionEnter ||\n // Cancel leave\n currentStatus === STATUS_LEAVE && !motionLeave) {\n setStatus(STATUS_NONE);\n }\n }, [motionAppear, motionEnter, motionLeave]);\n useEffect(function () {\n return function () {\n mountedRef.current = false;\n clearTimeout(deadlineRef.current);\n };\n }, []);\n\n // Trigger `onVisibleChanged`\n var firstMountChangeRef = React.useRef(false);\n useEffect(function () {\n // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged\n if (asyncVisible) {\n firstMountChangeRef.current = true;\n }\n if (asyncVisible !== undefined && currentStatus === STATUS_NONE) {\n // Skip first render is invisible since it's nothing changed\n if (firstMountChangeRef.current || asyncVisible) {\n onVisibleChanged === null || onVisibleChanged === void 0 || onVisibleChanged(asyncVisible);\n }\n firstMountChangeRef.current = true;\n }\n }, [asyncVisible, currentStatus]);\n\n // ============================ Styles ============================\n var mergedStyle = style;\n if (eventHandlers[STEP_PREPARE] && step === STEP_START) {\n mergedStyle = _objectSpread({\n transition: 'none'\n }, mergedStyle);\n }\n return [currentStatus, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];\n}","map":{"version":3,"names":["_objectSpread","_defineProperty","_slicedToArray","useEvent","useState","useSyncState","React","useEffect","useRef","STATUS_APPEAR","STATUS_ENTER","STATUS_LEAVE","STATUS_NONE","STEP_ACTIVE","STEP_PREPARE","STEP_PREPARED","STEP_START","useDomMotionEvents","useIsomorphicLayoutEffect","useStepQueue","DoStep","isActive","SkipStep","useStatus","supportMotion","visible","getElement","_ref","_ref$motionEnter","motionEnter","_ref$motionAppear","motionAppear","_ref$motionLeave","motionLeave","motionDeadline","motionLeaveImmediately","onAppearPrepare","onEnterPrepare","onLeavePrepare","onAppearStart","onEnterStart","onLeaveStart","onAppearActive","onEnterActive","onLeaveActive","onAppearEnd","onEnterEnd","onLeaveEnd","onVisibleChanged","_useState","_useState2","asyncVisible","setAsyncVisible","_useSyncState","_useSyncState2","getStatus","setStatus","_useState3","_useState4","style","setStyle","currentStatus","mountedRef","deadlineRef","getDomElement","activeRef","updateMotionEndStatus","onInternalMotionEnd","event","status","element","deadline","target","currentActive","current","canEnd","_useDomMotionEvents","_useDomMotionEvents2","patchMotionEvents","getEventHandlers","targetStatus","eventHandlers","useMemo","_useStepQueue","newStep","onPrepare","step","_eventHandlers$step","call","clearTimeout","setTimeout","_useStepQueue2","startStep","active","isMounted","nextStatus","nextEventHandlers","firstMountChangeRef","undefined","mergedStyle","transition"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-motion/es/hooks/useStatus.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEvent } from 'rc-util';\nimport useState from \"rc-util/es/hooks/useState\";\nimport useSyncState from \"rc-util/es/hooks/useSyncState\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { STATUS_APPEAR, STATUS_ENTER, STATUS_LEAVE, STATUS_NONE, STEP_ACTIVE, STEP_PREPARE, STEP_PREPARED, STEP_START } from \"../interface\";\nimport useDomMotionEvents from \"./useDomMotionEvents\";\nimport useIsomorphicLayoutEffect from \"./useIsomorphicLayoutEffect\";\nimport useStepQueue, { DoStep, isActive, SkipStep } from \"./useStepQueue\";\nexport default function useStatus(supportMotion, visible, getElement, _ref) {\n var _ref$motionEnter = _ref.motionEnter,\n motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,\n _ref$motionAppear = _ref.motionAppear,\n motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,\n _ref$motionLeave = _ref.motionLeave,\n motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,\n motionDeadline = _ref.motionDeadline,\n motionLeaveImmediately = _ref.motionLeaveImmediately,\n onAppearPrepare = _ref.onAppearPrepare,\n onEnterPrepare = _ref.onEnterPrepare,\n onLeavePrepare = _ref.onLeavePrepare,\n onAppearStart = _ref.onAppearStart,\n onEnterStart = _ref.onEnterStart,\n onLeaveStart = _ref.onLeaveStart,\n onAppearActive = _ref.onAppearActive,\n onEnterActive = _ref.onEnterActive,\n onLeaveActive = _ref.onLeaveActive,\n onAppearEnd = _ref.onAppearEnd,\n onEnterEnd = _ref.onEnterEnd,\n onLeaveEnd = _ref.onLeaveEnd,\n onVisibleChanged = _ref.onVisibleChanged;\n // Used for outer render usage to avoid `visible: false & status: none` to render nothing\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n asyncVisible = _useState2[0],\n setAsyncVisible = _useState2[1];\n var _useSyncState = useSyncState(STATUS_NONE),\n _useSyncState2 = _slicedToArray(_useSyncState, 2),\n getStatus = _useSyncState2[0],\n setStatus = _useSyncState2[1];\n var _useState3 = useState(null),\n _useState4 = _slicedToArray(_useState3, 2),\n style = _useState4[0],\n setStyle = _useState4[1];\n var currentStatus = getStatus();\n var mountedRef = useRef(false);\n var deadlineRef = useRef(null);\n\n // =========================== Dom Node ===========================\n function getDomElement() {\n return getElement();\n }\n\n // ========================== Motion End ==========================\n var activeRef = useRef(false);\n\n /**\n * Clean up status & style\n */\n function updateMotionEndStatus() {\n setStatus(STATUS_NONE);\n setStyle(null, true);\n }\n var onInternalMotionEnd = useEvent(function (event) {\n var status = getStatus();\n // Do nothing since not in any transition status.\n // This may happen when `motionDeadline` trigger.\n if (status === STATUS_NONE) {\n return;\n }\n var element = getDomElement();\n if (event && !event.deadline && event.target !== element) {\n // event exists\n // not initiated by deadline\n // transitionEnd not fired by inner elements\n return;\n }\n var currentActive = activeRef.current;\n var canEnd;\n if (status === STATUS_APPEAR && currentActive) {\n canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);\n } else if (status === STATUS_ENTER && currentActive) {\n canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);\n } else if (status === STATUS_LEAVE && currentActive) {\n canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);\n }\n\n // Only update status when `canEnd` and not destroyed\n if (currentActive && canEnd !== false) {\n updateMotionEndStatus();\n }\n });\n var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),\n _useDomMotionEvents2 = _slicedToArray(_useDomMotionEvents, 1),\n patchMotionEvents = _useDomMotionEvents2[0];\n\n // ============================= Step =============================\n var getEventHandlers = function getEventHandlers(targetStatus) {\n switch (targetStatus) {\n case STATUS_APPEAR:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);\n case STATUS_ENTER:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);\n case STATUS_LEAVE:\n return _defineProperty(_defineProperty(_defineProperty({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);\n default:\n return {};\n }\n };\n var eventHandlers = React.useMemo(function () {\n return getEventHandlers(currentStatus);\n }, [currentStatus]);\n var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function (newStep) {\n // Only prepare step can be skip\n if (newStep === STEP_PREPARE) {\n var onPrepare = eventHandlers[STEP_PREPARE];\n if (!onPrepare) {\n return SkipStep;\n }\n return onPrepare(getDomElement());\n }\n\n // Rest step is sync update\n if (step in eventHandlers) {\n var _eventHandlers$step;\n setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);\n }\n if (step === STEP_ACTIVE && currentStatus !== STATUS_NONE) {\n // Patch events when motion needed\n patchMotionEvents(getDomElement());\n if (motionDeadline > 0) {\n clearTimeout(deadlineRef.current);\n deadlineRef.current = setTimeout(function () {\n onInternalMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n }\n if (step === STEP_PREPARED) {\n updateMotionEndStatus();\n }\n return DoStep;\n }),\n _useStepQueue2 = _slicedToArray(_useStepQueue, 2),\n startStep = _useStepQueue2[0],\n step = _useStepQueue2[1];\n var active = isActive(step);\n activeRef.current = active;\n\n // ============================ Status ============================\n // Update with new status\n useIsomorphicLayoutEffect(function () {\n setAsyncVisible(visible);\n var isMounted = mountedRef.current;\n mountedRef.current = true;\n\n // if (!supportMotion) {\n // return;\n // }\n\n var nextStatus;\n\n // Appear\n if (!isMounted && visible && motionAppear) {\n nextStatus = STATUS_APPEAR;\n }\n\n // Enter\n if (isMounted && visible && motionEnter) {\n nextStatus = STATUS_ENTER;\n }\n\n // Leave\n if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {\n nextStatus = STATUS_LEAVE;\n }\n var nextEventHandlers = getEventHandlers(nextStatus);\n\n // Update to next status\n if (nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE])) {\n setStatus(nextStatus);\n startStep();\n } else {\n // Set back in case no motion but prev status has prepare step\n setStatus(STATUS_NONE);\n }\n }, [visible]);\n\n // ============================ Effect ============================\n // Reset when motion changed\n useEffect(function () {\n if (\n // Cancel appear\n currentStatus === STATUS_APPEAR && !motionAppear ||\n // Cancel enter\n currentStatus === STATUS_ENTER && !motionEnter ||\n // Cancel leave\n currentStatus === STATUS_LEAVE && !motionLeave) {\n setStatus(STATUS_NONE);\n }\n }, [motionAppear, motionEnter, motionLeave]);\n useEffect(function () {\n return function () {\n mountedRef.current = false;\n clearTimeout(deadlineRef.current);\n };\n }, []);\n\n // Trigger `onVisibleChanged`\n var firstMountChangeRef = React.useRef(false);\n useEffect(function () {\n // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged\n if (asyncVisible) {\n firstMountChangeRef.current = true;\n }\n if (asyncVisible !== undefined && currentStatus === STATUS_NONE) {\n // Skip first render is invisible since it's nothing changed\n if (firstMountChangeRef.current || asyncVisible) {\n onVisibleChanged === null || onVisibleChanged === void 0 || onVisibleChanged(asyncVisible);\n }\n firstMountChangeRef.current = true;\n }\n }, [asyncVisible, currentStatus]);\n\n // ============================ Styles ============================\n var mergedStyle = style;\n if (eventHandlers[STEP_PREPARE] && step === STEP_START) {\n mergedStyle = _objectSpread({\n transition: 'none'\n }, mergedStyle);\n }\n return [currentStatus, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];\n}"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,SAASC,QAAQ,QAAQ,SAAS;AAClC,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAOC,YAAY,MAAM,+BAA+B;AACxD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,aAAa,EAAEC,YAAY,EAAEC,YAAY,EAAEC,WAAW,EAAEC,WAAW,EAAEC,YAAY,EAAEC,aAAa,EAAEC,UAAU,QAAQ,cAAc;AAC3I,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,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