1 line
4.9 KiB
JSON
1 line
4.9 KiB
JSON
{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n// [times, realValue]\n\nvar SPLIT = '%';\n\n/** Connect key with `SPLIT` */\nexport function pathKey(keys) {\n return keys.join(SPLIT);\n}\nvar Entity = /*#__PURE__*/function () {\n function Entity(instanceId) {\n _classCallCheck(this, Entity);\n _defineProperty(this, \"instanceId\", void 0);\n /** @private Internal cache map. Do not access this directly */\n _defineProperty(this, \"cache\", new Map());\n this.instanceId = instanceId;\n }\n _createClass(Entity, [{\n key: \"get\",\n value: function get(keys) {\n return this.opGet(pathKey(keys));\n }\n\n /** A fast get cache with `get` concat. */\n }, {\n key: \"opGet\",\n value: function opGet(keyPathStr) {\n return this.cache.get(keyPathStr) || null;\n }\n }, {\n key: \"update\",\n value: function update(keys, valueFn) {\n return this.opUpdate(pathKey(keys), valueFn);\n }\n\n /** A fast get cache with `get` concat. */\n }, {\n key: \"opUpdate\",\n value: function opUpdate(keyPathStr, valueFn) {\n var prevValue = this.cache.get(keyPathStr);\n var nextValue = valueFn(prevValue);\n if (nextValue === null) {\n this.cache.delete(keyPathStr);\n } else {\n this.cache.set(keyPathStr, nextValue);\n }\n }\n }]);\n return Entity;\n}();\nexport default Entity;","map":{"version":3,"names":["_classCallCheck","_createClass","_defineProperty","SPLIT","pathKey","keys","join","Entity","instanceId","Map","key","value","get","opGet","keyPathStr","cache","update","valueFn","opUpdate","prevValue","nextValue","delete","set"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/@ant-design/cssinjs/es/Cache.js"],"sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n// [times, realValue]\n\nvar SPLIT = '%';\n\n/** Connect key with `SPLIT` */\nexport function pathKey(keys) {\n return keys.join(SPLIT);\n}\nvar Entity = /*#__PURE__*/function () {\n function Entity(instanceId) {\n _classCallCheck(this, Entity);\n _defineProperty(this, \"instanceId\", void 0);\n /** @private Internal cache map. Do not access this directly */\n _defineProperty(this, \"cache\", new Map());\n this.instanceId = instanceId;\n }\n _createClass(Entity, [{\n key: \"get\",\n value: function get(keys) {\n return this.opGet(pathKey(keys));\n }\n\n /** A fast get cache with `get` concat. */\n }, {\n key: \"opGet\",\n value: function opGet(keyPathStr) {\n return this.cache.get(keyPathStr) || null;\n }\n }, {\n key: \"update\",\n value: function update(keys, valueFn) {\n return this.opUpdate(pathKey(keys), valueFn);\n }\n\n /** A fast get cache with `get` concat. */\n }, {\n key: \"opUpdate\",\n value: function opUpdate(keyPathStr, valueFn) {\n var prevValue = this.cache.get(keyPathStr);\n var nextValue = valueFn(prevValue);\n if (nextValue === null) {\n this.cache.delete(keyPathStr);\n } else {\n this.cache.set(keyPathStr, nextValue);\n }\n }\n }]);\n return Entity;\n}();\nexport default Entity;"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,eAAe,MAAM,2CAA2C;AACvE;;AAEA,IAAIC,KAAK,GAAG,GAAG;;AAEf;AACA,OAAO,SAASC,OAAOA,CAACC,IAAI,EAAE;EAC5B,OAAOA,IAAI,CAACC,IAAI,CAACH,KAAK,CAAC;AACzB;AACA,IAAII,MAAM,GAAG,aAAa,YAAY;EACpC,SAASA,MAAMA,CAACC,UAAU,EAAE;IAC1BR,eAAe,CAAC,IAAI,EAAEO,MAAM,CAAC;IAC7BL,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IAC3C;IACAA,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,IAAIO,GAAG,CAAC,CAAC,CAAC;IACzC,IAAI,CAACD,UAAU,GAAGA,UAAU;EAC9B;EACA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