PromoCursed/node_modules/.cache/babel-loader/666e07771609e233bcb706fab76bbccbdacab2fbf47c54a1aa1297176dd65740.json

1 line
4.9 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nexport function findValidateTime(date, getHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits, generateConfig) {\n var nextDate = date;\n function alignValidate(getUnitValue, setUnitValue, units) {\n var nextValue = generateConfig[getUnitValue](nextDate);\n var nextUnit = units.find(function (unit) {\n return unit.value === nextValue;\n });\n if (!nextUnit || nextUnit.disabled) {\n // Find most closest unit\n var validateUnits = units.filter(function (unit) {\n return !unit.disabled;\n });\n var reverseEnabledUnits = _toConsumableArray(validateUnits).reverse();\n var validateUnit = reverseEnabledUnits.find(function (unit) {\n return unit.value <= nextValue;\n }) || validateUnits[0];\n if (validateUnit) {\n nextValue = validateUnit.value;\n nextDate = generateConfig[setUnitValue](nextDate, nextValue);\n }\n }\n return nextValue;\n }\n\n // Find validate hour\n var nextHour = alignValidate('getHour', 'setHour', getHourUnits());\n\n // Find validate minute\n var nextMinute = alignValidate('getMinute', 'setMinute', getMinuteUnits(nextHour));\n\n // Find validate second\n var nextSecond = alignValidate('getSecond', 'setSecond', getSecondUnits(nextHour, nextMinute));\n\n // Find validate millisecond\n alignValidate('getMillisecond', 'setMillisecond', getMillisecondUnits(nextHour, nextMinute, nextSecond));\n return nextDate;\n}","map":{"version":3,"names":["_toConsumableArray","findValidateTime","date","getHourUnits","getMinuteUnits","getSecondUnits","getMillisecondUnits","generateConfig","nextDate","alignValidate","getUnitValue","setUnitValue","units","nextValue","nextUnit","find","unit","value","disabled","validateUnits","filter","reverseEnabledUnits","reverse","validateUnit","nextHour","nextMinute","nextSecond"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-picker/es/PickerPanel/TimePanel/TimePanelBody/util.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nexport function findValidateTime(date, getHourUnits, getMinuteUnits, getSecondUnits, getMillisecondUnits, generateConfig) {\n var nextDate = date;\n function alignValidate(getUnitValue, setUnitValue, units) {\n var nextValue = generateConfig[getUnitValue](nextDate);\n var nextUnit = units.find(function (unit) {\n return unit.value === nextValue;\n });\n if (!nextUnit || nextUnit.disabled) {\n // Find most closest unit\n var validateUnits = units.filter(function (unit) {\n return !unit.disabled;\n });\n var reverseEnabledUnits = _toConsumableArray(validateUnits).reverse();\n var validateUnit = reverseEnabledUnits.find(function (unit) {\n return unit.value <= nextValue;\n }) || validateUnits[0];\n if (validateUnit) {\n nextValue = validateUnit.value;\n nextDate = generateConfig[setUnitValue](nextDate, nextValue);\n }\n }\n return nextValue;\n }\n\n // Find validate hour\n var nextHour = alignValidate('getHour', 'setHour', getHourUnits());\n\n // Find validate minute\n var nextMinute = alignValidate('getMinute', 'setMinute', getMinuteUnits(nextHour));\n\n // Find validate second\n var nextSecond = alignValidate('getSecond', 'setSecond', getSecondUnits(nextHour, nextMinute));\n\n // Find validate millisecond\n alignValidate('getMillisecond', 'setMillisecond', getMillisecondUnits(nextHour, nextMinute, nextSecond));\n return nextDate;\n}"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAO,SAASC,gBAAgBA,CAACC,IAAI,EAAEC,YAAY,EAAEC,cAAc,EAAEC,cAAc,EAAEC,mBAAmB,EAAEC,cAAc,EAAE;EACxH,IAAIC,QAAQ,GAAGN,IAAI;EACnB,SAASO,aAAaA,CAACC,YAAY,EAAEC,YAAY,EAAEC,KAAK,EAAE;IACxD,IAAIC,SAAS,GAAGN,cAAc,CAACG,YAAY,CAAC,CAACF,QAAQ,CAAC;IACtD,IAAIM,QAAQ,GAAGF,KAAK,CAACG,IAAI,CAAC,UAAUC,IAAI,EAAE;MACxC,OAAOA,IAAI,CAACC,KAAK,KAAKJ,SAAS;IACjC,CAAC,CAAC;IACF,IAAI,CAACC,QAAQ,IAAIA,QAAQ,CAACI,QAAQ,EAAE;MAClC;MACA,