PromoCursed/node_modules/.cache/babel-loader/66e00c5052f141a12d39bb22841bfacdec17983aa5e47f29ecbcf898d20f340d.json

1 line
7.6 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar enableStatistic = process.env.NODE_ENV !== 'production' || typeof CSSINJS_STATISTIC !== 'undefined';\nvar recording = true;\n\n/**\n * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to\n * pass all value access in development. To support statistic field usage with alias token.\n */\nexport function merge() {\n for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {\n objs[_key] = arguments[_key];\n }\n /* istanbul ignore next */\n if (!enableStatistic) {\n return Object.assign.apply(Object, [{}].concat(objs));\n }\n recording = false;\n var ret = {};\n objs.forEach(function (obj) {\n if (_typeof(obj) !== 'object') return;\n var keys = Object.keys(obj);\n keys.forEach(function (key) {\n Object.defineProperty(ret, key, {\n configurable: true,\n enumerable: true,\n get: function get() {\n return obj[key];\n }\n });\n });\n });\n recording = true;\n return ret;\n}\n\n/** @internal Internal Usage. Not use in your production. */\nexport var statistic = {};\n\n/** @internal Internal Usage. Not use in your production. */\nexport var _statistic_build_ = {};\n\n/* istanbul ignore next */\nfunction noop() {}\n\n/** Statistic token usage case. Should use `merge` function if you do not want spread record. */\nvar statisticToken = function statisticToken(token) {\n var tokenKeys;\n var proxy = token;\n var flush = noop;\n if (enableStatistic && typeof Proxy !== 'undefined') {\n tokenKeys = new Set();\n proxy = new Proxy(token, {\n get: function get(obj, prop) {\n if (recording) {\n tokenKeys.add(prop);\n }\n return obj[prop];\n }\n });\n flush = function flush(componentName, componentToken) {\n var _statistic$componentN;\n statistic[componentName] = {\n global: Array.from(tokenKeys),\n component: _objectSpread(_objectSpread({}, (_statistic$componentN = statistic[componentName]) === null || _statistic$componentN === void 0 ? void 0 : _statistic$componentN.component), componentToken)\n };\n };\n }\n return {\n token: proxy,\n keys: tokenKeys,\n flush: flush\n };\n};\nexport default statisticToken;","map":{"version":3,"names":["_objectSpread","_typeof","enableStatistic","process","env","NODE_ENV","CSSINJS_STATISTIC","recording","merge","_len","arguments","length","objs","Array","_key","Object","assign","apply","concat","ret","forEach","obj","keys","key","defineProperty","configurable","enumerable","get","statistic","_statistic_build_","noop","statisticToken","token","tokenKeys","proxy","flush","Proxy","Set","prop","add","componentName","componentToken","_statistic$componentN","global","from","component"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/@ant-design/cssinjs-utils/es/util/statistic.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar enableStatistic = process.env.NODE_ENV !== 'production' || typeof CSSINJS_STATISTIC !== 'undefined';\nvar recording = true;\n\n/**\n * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to\n * pass all value access in development. To support statistic field usage with alias token.\n */\nexport function merge() {\n for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {\n objs[_key] = arguments[_key];\n }\n /* istanbul ignore next */\n if (!enableStatistic) {\n return Object.assign.apply(Object, [{}].concat(objs));\n }\n recording = false;\n var ret = {};\n objs.forEach(function (obj) {\n if (_typeof(obj) !== 'object') return;\n var keys = Object.keys(obj);\n keys.forEach(function (key) {\n Object.defineProperty(ret, key, {\n configurable: tru