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

1 line
9.7 KiB
JSON

{"ast":null,"code":"import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { extract as tokenExtractStyle, TOKEN_PREFIX } from \"./hooks/useCacheToken\";\nimport { CSS_VAR_PREFIX, extract as cssVarExtractStyle } from \"./hooks/useCSSVarRegister\";\nimport { extract as styleExtractStyle, STYLE_PREFIX } from \"./hooks/useStyleRegister\";\nimport { toStyleStr } from \"./util\";\nimport { ATTR_CACHE_MAP, serialize as serializeCacheMap } from \"./util/cacheMapUtil\";\nvar ExtractStyleFns = _defineProperty(_defineProperty(_defineProperty({}, STYLE_PREFIX, styleExtractStyle), TOKEN_PREFIX, tokenExtractStyle), CSS_VAR_PREFIX, cssVarExtractStyle);\nfunction isNotNull(value) {\n return value !== null;\n}\nexport default function extractStyle(cache, options) {\n var _ref = typeof options === 'boolean' ? {\n plain: options\n } : options || {},\n _ref$plain = _ref.plain,\n plain = _ref$plain === void 0 ? false : _ref$plain,\n _ref$types = _ref.types,\n types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types;\n var matchPrefixRegexp = new RegExp(\"^(\".concat((typeof types === 'string' ? [types] : types).join('|'), \")%\"));\n\n // prefix with `style` is used for `useStyleRegister` to cache style context\n var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {\n return matchPrefixRegexp.test(key);\n });\n\n // Common effect styles like animation\n var effectStyles = {};\n\n // Mapping of cachePath to style hash\n var cachePathMap = {};\n var styleText = '';\n styleKeys.map(function (key) {\n var cachePath = key.replace(matchPrefixRegexp, '').replace(/%/g, '|');\n var _key$split = key.split('%'),\n _key$split2 = _slicedToArray(_key$split, 1),\n prefix = _key$split2[0];\n var extractFn = ExtractStyleFns[prefix];\n var extractedStyle = extractFn(cache.cache.get(key)[1], effectStyles, {\n plain: plain\n });\n if (!extractedStyle) {\n return null;\n }\n var _extractedStyle = _slicedToArray(extractedStyle, 3),\n order = _extractedStyle[0],\n styleId = _extractedStyle[1],\n styleStr = _extractedStyle[2];\n if (key.startsWith('style')) {\n cachePathMap[cachePath] = styleId;\n }\n return [order, styleStr];\n }).filter(isNotNull).sort(function (_ref2, _ref3) {\n var _ref4 = _slicedToArray(_ref2, 1),\n o1 = _ref4[0];\n var _ref5 = _slicedToArray(_ref3, 1),\n o2 = _ref5[0];\n return o1 - o2;\n }).forEach(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n style = _ref7[1];\n styleText += style;\n });\n\n // ==================== Fill Cache Path ====================\n styleText += toStyleStr(\".\".concat(ATTR_CACHE_MAP, \"{content:\\\"\").concat(serializeCacheMap(cachePathMap), \"\\\";}\"), undefined, undefined, _defineProperty({}, ATTR_CACHE_MAP, ATTR_CACHE_MAP), plain);\n return styleText;\n}","map":{"version":3,"names":["_slicedToArray","_defineProperty","extract","tokenExtractStyle","TOKEN_PREFIX","CSS_VAR_PREFIX","cssVarExtractStyle","styleExtractStyle","STYLE_PREFIX","toStyleStr","ATTR_CACHE_MAP","serialize","serializeCacheMap","ExtractStyleFns","isNotNull","value","extractStyle","cache","options","_ref","plain","_ref$plain","_ref$types","types","matchPrefixRegexp","RegExp","concat","join","styleKeys","Array","from","keys","filter","key","test","effectStyles","cachePathMap","styleText","map","cachePath","replace","_key$split","split","_key$split2","prefix","extractFn","extractedStyle","get","_extractedStyle","order","styleId","styleStr","startsWith","sort","_ref2","_ref3","_ref4","o1","_ref5","o2","forEach","_ref6","_ref7","style","undefined"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/@ant-design/cssinjs/es/extractStyle.js"],"sourcesContent":["import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { extract as tokenExtractStyle, TOKEN_PREFIX } from \"./hooks/useCacheToken\";\nimport { CSS_VAR_PREFIX, extract as cssVarExtractStyle } from \"./hooks/useCSSVarRegister\";\nimport { extract as styleExtractStyle, STYLE_PREFIX } from \"./hooks/useStyleRegister\";\nimport { toStyleStr } from \"./util\";\nimport { ATTR_CACHE_MAP, serialize as serializeCacheMap } from \"./util/cacheMapUtil\";\nvar ExtractStyleFns = _defineProperty(_defineProperty(_defineProperty({}, STYLE_PREFIX, styleExtractStyle), TOKEN_PREFIX, tokenExtractStyle), CSS_VAR_PREFIX, cssVarExtractStyle);\nfunction isNotNull(value) {\n return value !== null;\n}\nexport default function extractStyle(cache, options) {\n var _ref = typeof options === 'boolean' ? {\n plain: options\n } : options || {},\n _ref$plain = _ref.plain,\n plain = _ref$plain === void 0 ? false : _ref$plain,\n _ref$types = _ref.types,\n types = _ref$types === void 0 ? ['style', 'token', 'cssVar'] : _ref$types;\n var matchPrefixRegexp = new RegExp(\"^(\".concat((typeof types === 'string' ? [types] : types).join('|'), \")%\"));\n\n // prefix with `style` is used for `useStyleRegister` to cache style context\n var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {\n return matchPrefixRegexp.test(key);\n });\n\n // Common effect styles like animation\n var effectStyles = {};\n\n // Mapping of cachePath to style hash\n var cachePathMap = {};\n var styleText = '';\n styleKeys.map(function (key) {\n var cachePath = key.replace(matchPrefixRegexp, '').replace(/%/g, '|');\n var _key$split = key.split('%'),\n _key$split2 = _slicedToArray(_key$split, 1),\n prefix = _key$split2[0];\n var extractFn = ExtractStyleFns[prefix];\n var extractedStyle = extractFn(cache.cache.get(key)[1], effectStyles, {\n plain: plain\n });\n if (!extractedStyle) {\n return null;\n }\n var _extractedStyle = _slicedToArray(extractedStyle, 3),\n order = _extractedStyle[0],\n styleId = _extractedStyle[1],\n styleStr = _extractedStyle[2];\n if (key.startsWith('style')) {\n cachePathMap[cachePath] = styleId;\n }\n return [order, styleStr];\n }).filter(isNotNull).sort(function (_ref2, _ref3) {\n var _ref4 = _slicedToArray(_ref2, 1),\n o1 = _ref4[0];\n var _ref5 = _slicedToArray(_ref3, 1),\n o2 = _ref5[0];\n return o1 - o2;\n }).forEach(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n style = _ref7[1];\n styleText += style;\n });\n\n // ==================== Fill Cache Path ====================\n styleText += toStyleStr(\".\".concat(ATTR_CACHE_MAP, \"{content:\\\"\").concat(serializeCacheMap(cachePathMap), \"\\\";}\"), undefined, undefined, _defineProperty({}, ATTR_CACHE_MAP, ATTR_CACHE_MAP), plain);\n return styleText;\n}"],"mappings":"AAAA,OAAOA,cAAc,MAAM,0CAA0C;AACrE,OAAOC,eAAe,MAAM,2CAA2C;AACvE,SAASC,OAAO,IAAIC,iBAAiB,EAAEC,YAAY,QAAQ,uBAAuB;AAClF,SAASC,cAAc,EAAEH,OAAO,IAAII,kBAAkB,QAAQ,2BAA2B;AACzF,SAASJ,OAAO,IAAIK,iBAAiB,EAAEC,YAAY,QAAQ,0BAA0B;AACrF,SAASC,UAAU,QAAQ,QAAQ;AACnC,SAASC,cAAc,EAAEC,SAAS,IAAIC,iBAAiB,QAAQ,qBAAqB;AACpF,IAAIC,eAAe,GAAGZ,eAAe,CAACA,eAAe,CAACA,eAAe,CAAC,CAAC,CAAC,EAAEO,YAAY,EAAED,iBAAiB,CAAC,EAAEH,YAAY,EAAED,iBAAiB,CAAC,EAAEE,cAAc,EAAEC,kBAAkB,CAAC;AACjL,SAASQ,SAASA,CAACC,KAAK,EAAE;EACxB,OAAOA,KAAK,KAAK,IAAI;AACvB;AACA,eAAe,SAASC,YAAYA,CAACC,KAAK,EAAEC,OAAO,EAAE;EACnD,IAAIC,IAAI,GAAG,OAAOD,OAAO,KAAK,SAAS,GAAG;MACtCE,KAAK,EAAEF;IACT,CAAC,GAAGA,OAAO,IAAI,CAAC,CAAC;IACjBG,UAAU,GAAGF,IAAI,CAACC,KAAK;IACvBA,KAAK,GAAGC,UAAU,KAAK,KAAK,CAAC,GAAG,KAAK,GAAGA,UAAU;IAClDC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