{"version":3,"sources":["node_modules/date-fns/toDate.mjs","node_modules/date-fns/constructFrom.mjs","node_modules/date-fns/addDays.mjs"],"sourcesContent":["/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (argument instanceof Date || typeof argument === \"object\" && argStr === \"[object Date]\") {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (typeof argument === \"number\" || argStr === \"[object Number]\" || typeof argument === \"string\" || argStr === \"[object String]\") {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;","/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from 'date-fns'\n *\n * // A function that clones a date preserving the original type\n * function cloneDate Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount) {\n const _date = toDate(date);\n if (isNaN(amount)) return constructFrom(date, NaN);\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;"],"mappings":"AAgCO,SAASA,EAAOC,EAAU,CAC/B,IAAMC,EAAS,OAAO,UAAU,SAAS,KAAKD,CAAQ,EAGtD,OAAIA,aAAoB,MAAQ,OAAOA,GAAa,UAAYC,IAAW,gBAElE,IAAID,EAAS,YAAY,CAACA,CAAQ,EAChC,OAAOA,GAAa,UAAYC,IAAW,mBAAqB,OAAOD,GAAa,UAAYC,IAAW,kBAE7G,IAAI,KAAKD,CAAQ,EAGjB,IAAI,KAAK,GAAG,CAEvB,CChBO,SAASE,EAAcC,EAAMC,EAAO,CACzC,OAAID,aAAgB,KACX,IAAIA,EAAK,YAAYC,CAAK,EAE1B,IAAI,KAAKA,CAAK,CAEzB,CCbO,SAASC,EAAQC,EAAMC,EAAQ,CACpC,IAAMC,EAAQC,EAAOH,CAAI,EACzB,OAAI,MAAMC,CAAM,EAAUG,EAAcJ,EAAM,GAAG,GAC5CC,GAILC,EAAM,QAAQA,EAAM,QAAQ,EAAID,CAAM,EAC/BC,EACT","names":["toDate","argument","argStr","constructFrom","date","value","addDays","date","amount","_date","toDate","constructFrom"],"x_google_ignoreList":[0,1,2]}