{"ast":null,"code":"import { SHOW_CHILD } from \"./commonUtil\";\nexport function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy) {\n var valueSet = new Set(pathKeys);\n var keyPathEntities = getKeyPathEntities();\n return pathKeys.filter(function (key) {\n var entity = keyPathEntities[key];\n var parent = entity ? entity.parent : null;\n var children = entity ? entity.children : null;\n if (entity && entity.node.disabled) {\n return true;\n }\n return showCheckedStrategy === SHOW_CHILD ? !(children && children.some(function (child) {\n return child.key && valueSet.has(child.key);\n })) : !(parent && !parent.node.disabled && valueSet.has(parent.key));\n });\n}\nexport function toPathOptions(valueCells, options, fieldNames) {\n var stringMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var currentList = options;\n var valueOptions = [];\n var _loop = function _loop() {\n var _currentList, _currentList2, _foundOption$fieldNam;\n var valueCell = valueCells[i];\n var foundIndex = (_currentList = currentList) === null || _currentList === void 0 ? void 0 : _currentList.findIndex(function (option) {\n var val = option[fieldNames.value];\n return stringMode ? String(val) === String(valueCell) : val === valueCell;\n });\n var foundOption = foundIndex !== -1 ? (_currentList2 = currentList) === null || _currentList2 === void 0 ? void 0 : _currentList2[foundIndex] : null;\n valueOptions.push({\n value: (_foundOption$fieldNam = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.value]) !== null && _foundOption$fieldNam !== void 0 ? _foundOption$fieldNam : valueCell,\n index: foundIndex,\n option: foundOption\n });\n currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];\n };\n for (var i = 0; i < valueCells.length; i += 1) {\n _loop();\n }\n return valueOptions;\n}","map":{"version":3,"names":["SHOW_CHILD","formatStrategyValues","pathKeys","getKeyPathEntities","showCheckedStrategy","valueSet","Set","keyPathEntities","filter","key","entity","parent","children","node","disabled","some","child","has","toPathOptions","valueCells","options","fieldNames","stringMode","arguments","length","undefined","currentList","valueOptions","_loop","_currentList","_currentList2","_foundOption$fieldNam","valueCell","i","foundIndex","findIndex","option","val","value","String","foundOption","push","index"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-cascader/es/utils/treeUtil.js"],"sourcesContent":["import { SHOW_CHILD } from \"./commonUtil\";\nexport function formatStrategyValues(pathKeys, getKeyPathEntities, showCheckedStrategy) {\n var valueSet = new Set(pathKeys);\n var keyPathEntities = getKeyPathEntities();\n return pathKeys.filter(function (key) {\n var entity = keyPathEntities[key];\n var parent = entity ? entity.parent : null;\n var children = entity ? entity.children : null;\n if (entity && entity.node.disabled) {\n return true;\n }\n return showCheckedStrategy === SHOW_CHILD ? !(children && children.some(function (child) {\n return child.key && valueSet.has(child.key);\n })) : !(parent && !parent.node.disabled && valueSet.has(parent.key));\n });\n}\nexport function toPathOptions(valueCells, options, fieldNames) {\n var stringMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var currentList = options;\n var valueOptions = [];\n var _loop = function _loop() {\n var _currentList, _currentList2, _foundOption$fieldNam;\n var valueCell = valueCells[i];\n var foundIndex = (_currentList = currentList) === null || _currentList === void 0 ? void 0 : _currentList.findIndex(function (option) {\n var val = option[fieldNames.value];\n return stringMode ? String(val) === String(valueCell) : val === valueCell;\n });\n var foundOption = foundIndex !== -1 ? (_currentList2 = currentList) === null || _currentList2 === void 0 ? void 0 : _currentList2[foundIndex] : null;\n valueOptions.push({\n value: (_foundOption$fieldNam = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.value]) !== null && _foundOption$fieldNam !== void 0 ? _foundOption$fieldNam : valueCell,\n index: foundIndex,\n option: foundOption\n });\n currentList = foundOption === null || foundOption === void 0 ? void 0 : foundOption[fieldNames.children];\n };\n for (var i = 0; i < valueCells.length; i += 1) {\n _loop();\n }\n return valueOptions;\n}"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAO,SAASC,oBAAoBA,CAACC,QAAQ,EAAEC,kBAAkB,EAAEC,mBAAmB,EAAE;EACtF,IAAIC,QAAQ,GAAG,IAAIC,GAAG,CAACJ,QAAQ,CA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