{ "version": 3, "sources": ["src/app/shared/overrides/custom-date-adapter/custom-date-adapter.component.ts"], "sourcesContent": ["import { Injectable } from '@angular/core';\nimport { NativeDateAdapter } from '@angular/material/core';\n\n@Injectable()\nexport class CustomDateAdapterComponent extends NativeDateAdapter {\n override getFirstDayOfWeek(): number {\n return 1;\n }\n\n\n override parse(value: string): Date | null {\n const dateComponents = value.split(/[.-/]/).map(Number);\n\n if (dateComponents.length !== 3) {\n return null;\n }\n\n const [day, month, year] = dateComponents;\n\n // Check if the day, month, and year are numbers\n if (isNaN(day) || isNaN(month) || isNaN(year)) {\n return null;\n }\n\n // Check for invalid day (1-31) and month (1-12)\n if (day < 1 || day > 31 || month < 1 || month > 12) {\n return null;\n }\n\n // Check for months with less than 31 days\n if (month === 2 && day > 29) {\n return null;\n }\n if ((month === 4 || month === 6 || month === 9 || month === 11) && day > 30) {\n return null;\n }\n\n // Check for leap years\n if (month === 2 && day === 29 && !(year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0))) {\n return null;\n }\n\n // Assuming 'year', 'month', and 'day' are provided variables\n let fullYear = year; // Assuming year is a provided variable\n\n // If the year is represented as a two-digit number\n if (year.toString().length === 2) {\n // Extracting the last two digits of the current year\n const currentYearFirstTwoDigits = new Date().getFullYear().toString().slice(0, 2);\n\n // Converting two-digit year to full four-digit year\n fullYear = parseInt(currentYearFirstTwoDigits + year.toString(), 10);\n }\n\n return new Date(fullYear, month - 1, day);\n }\n}\n"], "mappings": "yFAIA,IAAaA,GAA2B,IAAA,CAAlC,IAAOA,EAAP,MAAOA,UAAmCC,CAAiB,CACtDC,mBAAiB,CACxB,MAAO,EACT,CAGSC,MAAMC,EAAa,CAC1B,IAAMC,EAAiBD,EAAME,MAAM,OAAO,EAAEC,IAAIC,MAAM,EAEtD,GAAIH,EAAeI,SAAW,EAC5B,OAAO,KAGT,GAAM,CAACC,EAAKC,EAAOC,CAAI,EAAIP,EAqB3B,GAlBIQ,MAAMH,CAAG,GAAKG,MAAMF,CAAK,GAAKE,MAAMD,CAAI,GAKxCF,EAAM,GAAKA,EAAM,IAAMC,EAAQ,GAAKA,EAAQ,IAK5CA,IAAU,GAAKD,EAAM,KAGpBC,IAAU,GAAKA,IAAU,GAAKA,IAAU,GAAKA,IAAU,KAAOD,EAAM,IAKrEC,IAAU,GAAKD,IAAQ,IAAM,EAAEE,EAAO,IAAM,IAAMA,EAAO,MAAQ,GAAKA,EAAO,MAAQ,IACvF,OAAO,KAIT,IAAIE,EAAWF,EAGf,GAAIA,EAAKG,SAAQ,EAAGN,SAAW,EAAG,CAEhC,IAAMO,EAA4B,IAAIC,KAAI,EAAGC,YAAW,EAAGH,SAAQ,EAAGI,MAAM,EAAG,CAAC,EAGhFL,EAAWM,SAASJ,EAA4BJ,EAAKG,SAAQ,EAAI,EAAE,CACrE,CAEA,OAAO,IAAIE,KAAKH,EAAUH,EAAQ,EAAGD,CAAG,CAC1C,6DAnDWV,CAA0B,IAAAqB,GAA1BrB,CAA0B,CAAA,CAAA,GAAA,wBAA1BA,EAA0BsB,QAA1BtB,EAA0BuB,SAAA,CAAA,EAAjC,IAAOvB,EAAPwB,SAAOxB,CAA2B,GAAA", "names": ["CustomDateAdapterComponent", "NativeDateAdapter", "getFirstDayOfWeek", "parse", "value", "dateComponents", "split", "map", "Number", "length", "day", "month", "year", "isNaN", "fullYear", "toString", "currentYearFirstTwoDigits", "Date", "getFullYear", "slice", "parseInt", "t", "factory", "\u0275fac", "_CustomDateAdapterComponent"] }