{"version":3,"sources":["webpack:///../node_modules/tinyduration/dist/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAAa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA,KAAK,6BAA6B;AAClC,KAAK,8BAA8B;AACnC,KAAK,6BAA6B;AAClC,KAAK,4BAA4B;AACjC,KAAK,6BAA6B;AAClC,KAAK,+BAA+B;AACpC,KAAK,+BAA+B;AACpC;AACA;AACA,iCAAiC,KAAK,qBAAqB,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"vendor.tinyduration.623cb262d453d6672320.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serialize = exports.parse = exports.MultipleFractionsError = exports.InvalidDurationError = void 0;\nconst DEFAULT_PARSE_CONFIG = {\n allowMultipleFractions: true,\n};\nconst units = [\n { unit: 'years', symbol: 'Y' },\n { unit: 'months', symbol: 'M' },\n { unit: 'weeks', symbol: 'W' },\n { unit: 'days', symbol: 'D' },\n { unit: 'hours', symbol: 'H' },\n { unit: 'minutes', symbol: 'M' },\n { unit: 'seconds', symbol: 'S' },\n];\n// Construction of the duration regex\nconst r = (name, unit) => `((?<${name}>-?\\\\d*[\\\\.,]?\\\\d+)${unit})?`;\nconst durationRegex = new RegExp([\n '(?-)?P',\n r('years', 'Y'),\n r('months', 'M'),\n r('weeks', 'W'),\n r('days', 'D'),\n '(T',\n r('hours', 'H'),\n r('minutes', 'M'),\n r('seconds', 'S'),\n ')?', // end optional time\n].join(''));\nfunction parseNum(s) {\n if (s === '' || s === undefined || s === null) {\n return undefined;\n }\n return parseFloat(s.replace(',', '.'));\n}\nexports.InvalidDurationError = new Error('Invalid duration');\nexports.MultipleFractionsError = new Error('Multiple fractions specified');\nfunction parse(durationStr, config = DEFAULT_PARSE_CONFIG) {\n const match = durationRegex.exec(durationStr);\n if (!match || !match.groups) {\n throw exports.InvalidDurationError;\n }\n let empty = true;\n let decimalFractionCount = 0;\n const values = {};\n for (const { unit } of units) {\n if (match.groups[unit]) {\n empty = false;\n values[unit] = parseNum(match.groups[unit]);\n if (!config.allowMultipleFractions && !Number.isInteger(values[unit])) {\n decimalFractionCount++;\n if (decimalFractionCount > 1) {\n throw exports.MultipleFractionsError;\n }\n }\n }\n }\n if (empty) {\n throw exports.InvalidDurationError;\n }\n const duration = values;\n if (match.groups.negative) {\n duration.negative = true;\n }\n return duration;\n}\nexports.parse = parse;\nconst s = (number, component) => {\n if (!number) {\n return undefined;\n }\n let numberAsString = number.toString();\n const exponentIndex = numberAsString.indexOf('e');\n if (exponentIndex > -1) {\n const magnitude = parseInt(numberAsString.slice(exponentIndex + 2), 10);\n numberAsString = number.toFixed(magnitude + exponentIndex - 2);\n }\n return numberAsString + component;\n};\nfunction serialize(duration) {\n if (!duration.years &&\n !duration.months &&\n !duration.weeks &&\n !duration.days &&\n !duration.hours &&\n !duration.minutes &&\n !duration.seconds) {\n return 'PT0S';\n }\n return [\n duration.negative && '-',\n 'P',\n s(duration.years, 'Y'),\n s(duration.months, 'M'),\n s(duration.weeks, 'W'),\n s(duration.days, 'D'),\n (duration.hours || duration.minutes || duration.seconds) && 'T',\n s(duration.hours, 'H'),\n s(duration.minutes, 'M'),\n s(duration.seconds, 'S'),\n ]\n .filter(Boolean)\n .join('');\n}\nexports.serialize = serialize;\n"],"sourceRoot":""}