PromoCursed/node_modules/.cache/babel-loader/84d05c262ca51dd5f204bb9ef5438e28b9f4e3dc8264925ed36afc59f09c8674.json

1 line
4.5 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport * as React from 'react';\nimport { unstable_batchedUpdates } from 'react-dom';\nimport channelUpdate from './channelUpdate';\n/**\n * Batcher for record any `useEffectState` need update.\n */\nexport function useBatcher() {\n // Updater Trigger\n var updateFuncRef = React.useRef(null);\n // Notify update\n var notifyEffectUpdate = function notifyEffectUpdate(callback) {\n if (!updateFuncRef.current) {\n updateFuncRef.current = [];\n channelUpdate(function () {\n unstable_batchedUpdates(function () {\n updateFuncRef.current.forEach(function (fn) {\n fn();\n });\n updateFuncRef.current = null;\n });\n });\n }\n updateFuncRef.current.push(callback);\n };\n return notifyEffectUpdate;\n}\n/**\n * Trigger state update by `useLayoutEffect` to save perf.\n */\nexport default function useEffectState(notifyEffectUpdate, defaultValue) {\n // Value\n var _React$useState = React.useState(defaultValue),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n stateValue = _React$useState2[0],\n setStateValue = _React$useState2[1];\n // Set State\n var setEffectVal = useEvent(function (nextValue) {\n notifyEffectUpdate(function () {\n setStateValue(nextValue);\n });\n });\n return [stateValue, setEffectVal];\n}","map":{"version":3,"names":["_slicedToArray","useEvent","React","unstable_batchedUpdates","channelUpdate","useBatcher","updateFuncRef","useRef","notifyEffectUpdate","callback","current","forEach","fn","push","useEffectState","defaultValue","_React$useState","useState","_React$useState2","stateValue","setStateValue","setEffectVal","nextValue"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-overflow/es/hooks/useEffectState.js"],"sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useEvent from \"rc-util/es/hooks/useEvent\";\nimport * as React from 'react';\nimport { unstable_batchedUpdates } from 'react-dom';\nimport channelUpdate from './channelUpdate';\n/**\n * Batcher for record any `useEffectState` need update.\n */\nexport function useBatcher() {\n // Updater Trigger\n var updateFuncRef = React.useRef(null);\n // Notify update\n var notifyEffectUpdate = function notifyEffectUpdate(callback) {\n if (!updateFuncRef.current) {\n updateFuncRef.current = [];\n channelUpdate(function () {\n unstable_batchedUpdates(function () {\n updateFuncRef.current.forEach(function (fn) {\n fn();\n });\n updateFuncRef.current = null;\n });\n });\n }\n updateFuncRef.current.push(callback);\n };\n return notifyEffectUpdate;\n}\n/**\n * Trigger state update by `useLayoutEffect` to save perf.\n */\nexport default function useEffectState(notifyEffectUpdate, defaultValue) {\n // Value\n var _React$useState = React.useState(defaultValue),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n stateValue = _React$useState2[0],\n setStateValue = _React$useState2[1];\n // Set State\n var setEffectVal = useEvent(function (nextValue) {\n notifyEffectUpdate(function () {\n setStateValue(nextValue);\n });\n });\n return [stateValue, setEffectVal];\n}"],"mappings":"AAAA,OAAOA,cAAc,MAAM,0CAA0C;AACrE,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,WAAW;AACnD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAA,EAAG;EAC3B;EACA,IAAIC,aAAa,GAAGJ,KAAK,CAACK,MAAM,CAAC,IAAI,CAAC;EACtC;EACA,IAAIC,kBAAkB,GAAG,SAASA,kBAAkBA,CAACC,QAAQ,EAAE;IAC7D,IAAI,CAACH,aAAa,CAACI,OAAO,EAAE;MAC1BJ,aAAa,CAACI,OAAO,GAAG,EAAE;MAC1BN,aAAa,CAAC,YAAY;QACxBD,uBAAuB,CAAC,YAAY;UAClCG,aAAa,CAACI,OAAO,CAACC,OAAO,CAAC,UAAUC,EAAE,EAAE;YAC1CA,EAAE,CAAC,CAAC;UACN,CAAC,CAAC;UACFN,aAAa,CAACI,OAAO,GAAG,IAAI;QAC9B,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;IACAJ,aAAa,CAACI,OAAO,CAACG,IAAI,CAACJ,QAAQ,CAAC;EACtC,CAAC;EACD,OAAOD,kBAAkB;AAC