{"version":3,"file":"ng-material-date-range-picker.mjs","sources":["../../../projects/ng-date-picker/src/lib/constant/date-filter-const.ts","../../../projects/ng-date-picker/src/lib/utils/date-picker-utilities.ts","../../../projects/ng-date-picker/src/lib/data/default-date-options.ts","../../../projects/ng-date-picker/src/lib/utils/human-date-parser.ts","../../../projects/ng-date-picker/src/lib/calendar/calendar.component.ts","../../../projects/ng-date-picker/src/lib/calendar/calendar.component.html","../../../projects/ng-date-picker/src/lib/ng-date-picker.component.ts","../../../projects/ng-date-picker/src/lib/ng-date-picker.component.html","../../../projects/ng-date-picker/src/lib/model/select-date-option.model.ts","../../../projects/ng-date-picker/src/lib/ng-date-picker.module.ts","../../../projects/ng-date-picker/src/public-api.ts","../../../projects/ng-date-picker/src/ng-material-date-range-picker.ts"],"sourcesContent":["/**\n * @(#)date-filter-enum.ts Sept 08, 2023\n *\n * @author Aakash Kumar\n */\nexport const ACTIVE_DATE_DEBOUNCE = 100;\n\nexport enum DATE_OPTION_TYPE {\n  DATE_DIFF = 1,\n  LAST_MONTH = 2,\n  THIS_MONTH = 3,\n  YEAR_TO_DATE = 4,\n  CUSTOM = 5,\n  MONTH_TO_DATE = 6,\n  WEEK_TO_DATE = 7,\n}\n","import { DateRange, MatCalendar } from '@angular/material/datepicker';\nimport { DatePipe } from '@angular/common';\nimport { DATE_OPTION_TYPE } from '../constant/date-filter-const';\nimport { ISelectDateOption } from '../model/select-date-option.model';\nimport { ChangeDetectorRef } from '@angular/core';\nimport { ActiveDate } from '../model/active-date.model';\n\n/**\n * Resets the selection state for all options\n * and marks the given option as selected if provided.\n *\n * @param options - List of date options\n * @param selectedOption - Option to be marked as selected\n */\nexport function resetOptionSelection(\n  options: ISelectDateOption[],\n  selectedOption?: ISelectDateOption\n) {\n  options.forEach((option) => (option.isSelected = false));\n  if (selectedOption) {\n    selectedOption.isSelected = true;\n  }\n}\n\n/**\n * Marks the custom date option as selected.\n *\n * @param options - List of date options\n */\nexport function selectCustomOption(options: ISelectDateOption[]): void {\n  const customOption = options.find(\n    (option) => option.optionType === DATE_OPTION_TYPE.CUSTOM\n  );\n  if (customOption) customOption.isSelected = true;\n}\n\n/**\n * Returns a new date with the given year offset applied.\n *\n * @param offset - Number of years to add (negative for past years)\n * @returns Date object with updated year\n */\nexport function getDateWithOffset(offset: number) {\n  const date = new Date();\n  date.setFullYear(date.getFullYear() + offset);\n  return date;\n}\n\n/**\n * Creates a deep clone of the provided object or array.\n *\n * @param data - Data to be cloned\n * @returns A deep copy of the data\n */\nexport function getClone<T>(data: T): T {\n  return JSON.parse(JSON.stringify(data));\n}\n\n/**\n * Formats a date object into a string using Angular DatePipe.\n *\n * @param date - Date to be formatted\n * @param dateFormat - Desired date format (e.g., 'dd/MM/yyyy')\n * @returns Formatted date string\n */\nexport function getDateString(date: Date, dateFormat: string): string {\n  const datePipe = new DatePipe('en');\n  return datePipe.transform(date, dateFormat) ?? '';\n}\n\n/**\n * Formats a date range into a string with start and end dates.\n *\n * @param range - Date range with start and end\n * @param dateFormat - Desired date format\n * @returns Formatted range string (e.g., '01/01/2023 - 07/01/2023')\n */\nexport function getFormattedDateString(\n  range: DateRange<Date>,\n  dateFormat: string\n) {\n  if (!(range.start && range.end)) {\n    return '';\n  }\n  return (\n    getDateString(range.start, dateFormat) +\n    ' - ' +\n    getDateString(range.end, dateFormat)\n  );\n}\n\n/**\n * Creates a standardized date option object for dropdowns.\n *\n * @param label - Display label for the option\n * @param key - Option key from DEFAULT_DATE_OPTION_ENUM\n * @param dateDiff - Offset in days from current date (default: 0)\n * @param isVisible - Whether the option is visible (default: true)\n * @returns ISelectDateOption object\n */\nexport function createOption(\n  label: string,\n  key: DATE_OPTION_TYPE,\n  dateDiff = 0,\n  isVisible = true\n): ISelectDateOption {\n  return {\n    optionLabel: label,\n    optionType: key,\n    dateDiff,\n    isSelected: false,\n    isVisible,\n  };\n}\n\n/** Escapes a string so it can be used as a literal inside a RegExp. */\nfunction escapeRegExp(value: string): string {\n  return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/** Returns true when both dates fall on the same calendar day. */\nexport function isSameDay(a: Date, b: Date): boolean {\n  return (\n    a.getFullYear() === b.getFullYear() &&\n    a.getMonth() === b.getMonth() &&\n    a.getDate() === b.getDate()\n  );\n}\n\n/**\n * Parses a date string against an Angular-style date format (the subset of\n * tokens `yyyy`, `yy`, `MM`, `M`, `dd`, `d`). Returns `null` if the string\n * does not match the format or is not a real calendar date (e.g. `31/02`).\n *\n * @param value - The user-entered date string.\n * @param format - The expected format, e.g. `dd/MM/yyyy`.\n * @returns The parsed Date, or `null` if it does not match.\n */\nexport function parseDateByFormat(value: string, format: string): Date | null {\n  const tokens: string[] = [];\n  const tokenRegex = /yyyy|yy|MM|M|dd|d/g;\n  let pattern = '^';\n  let lastIndex = 0;\n  let token: RegExpExecArray | null;\n  while ((token = tokenRegex.exec(format)) !== null) {\n    pattern += escapeRegExp(format.slice(lastIndex, token.index));\n    switch (token[0]) {\n      case 'yyyy':\n        pattern += '(\\\\d{4})';\n        break;\n      case 'yy':\n        pattern += '(\\\\d{2})';\n        break;\n      case 'MM':\n      case 'dd':\n        pattern += '(\\\\d{2})';\n        break;\n      default: // 'M' or 'd'\n        pattern += '(\\\\d{1,2})';\n        break;\n    }\n    tokens.push(token[0]);\n    lastIndex = token.index + token[0].length;\n  }\n  pattern += escapeRegExp(format.slice(lastIndex)) + '$';\n\n  const match = new RegExp(pattern).exec(value.trim());\n  if (!match) {\n    return null;\n  }\n\n  let year = NaN;\n  let month = NaN;\n  let day = NaN;\n  tokens.forEach((token, index) => {\n    const part = parseInt(match[index + 1], 10);\n    if (token.startsWith('y')) {\n      year = token === 'yy' ? 2000 + part : part;\n    } else if (token.startsWith('M')) {\n      month = part - 1;\n    } else {\n      day = part;\n    }\n  });\n  if (isNaN(year) || isNaN(month) || isNaN(day)) {\n    return null;\n  }\n\n  const date = new Date(year, month, day);\n  // Reject overflow dates such as 31/02 that Date silently rolls over.\n  if (\n    date.getFullYear() !== year ||\n    date.getMonth() !== month ||\n    date.getDate() !== day\n  ) {\n    return null;\n  }\n  return date;\n}\n\n/**\n * Derives the relative date-math expressions (start/end) for a date option,\n * for display in editable inputs. Only day-diff options have a clean relative\n * form (e.g. `Last 7 Days` -> `now-7d` .. `now`); an explicit `startExpr` /\n * `endExpr` on the option overrides the derived value. Returns `null` when no\n * relative representation applies, so the caller falls back to absolute dates.\n *\n * @param option - The selected date option.\n * @returns `{ start, end }` expressions, or `null`.\n */\nexport function getRelativeExpr(\n  option?: ISelectDateOption | null\n): { start: string; end: string } | null {\n  if (!option) {\n    return null;\n  }\n  if (option.startExpr && option.endExpr) {\n    return { start: option.startExpr, end: option.endExpr };\n  }\n  if (option.optionType !== DATE_OPTION_TYPE.DATE_DIFF) {\n    return null;\n  }\n  const diff = option.dateDiff ?? 0;\n  const start = diff === 0 ? 'now' : `now${diff > 0 ? '+' : ''}${diff}d`;\n  return { start, end: 'now' };\n}\n\n/**\n * Returns the date of the next month based on the given date.\n *\n * @param currDate - Current date\n * @returns A new Date object incremented by one month\n */\nexport function getDateOfNextMonth(currDate: Date): Date {\n  const date = new Date(currDate);\n  date.setMonth(currDate.getMonth() + 1);\n  return date;\n}\n\n/**\n * Returns the first day of the month following the given date.\n *\n * @param currDate - The current date\n * @returns A Date object set to the first day of the next month\n */\nexport function getFirstDateOfNextMonth(currDate: Date): Date {\n  return new Date(currDate.getFullYear(), currDate.getMonth() + 1, 1);\n}\n\n/**\n * Returns the number of days in the month of the given date.\n *\n * @param date The date to calculate the days for.\n * @returns Number of days in the month.\n */\nexport function getDaysInMonth(date: Date): number {\n  return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();\n}\n\n/**\n * Computes the expected DateRange for a given option, mirroring the\n * logic in updateDateWithSelectedOption. Used for auto-matching a\n * provided selectedDates against the available options list.\n *\n * Returns null for CUSTOM options and any unhandled types.\n *\n * @param option - The date option to compute a range for\n * @returns Computed DateRange, or null if not applicable\n */\nexport function computeOptionDateRange(\n  option: ISelectDateOption\n): DateRange<Date> | null {\n  if (option.optionType === DATE_OPTION_TYPE.CUSTOM) {\n    return null;\n  }\n\n  if (option.callBackFunction) {\n    return option.callBackFunction();\n  }\n\n  const currDate = new Date();\n  let startDate: Date = new Date();\n  let lastDate: Date = new Date();\n\n  switch (option.optionType) {\n    case DATE_OPTION_TYPE.DATE_DIFF:\n      startDate = new Date();\n      startDate.setDate(startDate.getDate() + (option.dateDiff ?? 0));\n      lastDate = new Date();\n      break;\n\n    case DATE_OPTION_TYPE.LAST_MONTH: {\n      const lastMonth = new Date(currDate);\n      lastMonth.setMonth(currDate.getMonth() - 1);\n      startDate = new Date(lastMonth.getFullYear(), lastMonth.getMonth(), 1);\n      lastDate = new Date(\n        lastMonth.getFullYear(),\n        lastMonth.getMonth(),\n        getDaysInMonth(lastMonth)\n      );\n      break;\n    }\n\n    case DATE_OPTION_TYPE.THIS_MONTH:\n      startDate = new Date(currDate.getFullYear(), currDate.getMonth(), 1);\n      lastDate = new Date(\n        currDate.getFullYear(),\n        currDate.getMonth(),\n        getDaysInMonth(currDate)\n      );\n      break;\n\n    case DATE_OPTION_TYPE.YEAR_TO_DATE:\n      startDate = new Date(currDate.getFullYear(), 0, 1);\n      lastDate = new Date();\n      break;\n\n    case DATE_OPTION_TYPE.MONTH_TO_DATE:\n      startDate = new Date(currDate.getFullYear(), currDate.getMonth(), 1);\n      lastDate = new Date();\n      break;\n\n    default:\n      return null;\n  }\n\n  return new DateRange<Date>(startDate, lastDate);\n}\n\n/**\n * Overrides the `activeDate` setter for a MatCalendar instance, injecting custom handler logic\n * while preserving the original setter behavior. Useful for reacting to internal date navigation\n * events (e.g., month changes) in Angular Material's calendar.\n *\n * @param calendar - Instance of MatCalendar whose `activeDate` setter will be overridden.\n * @param cdref - ChangeDetectorRef to trigger view updates after the setter runs.\n * @param handler - Custom callback function executed whenever `activeDate` is set.\n */\nexport function overrideActiveDateSetter(\n  calendar: MatCalendar<Date>,\n  cdref: ChangeDetectorRef,\n  handler: (date: ActiveDate) => void\n): void {\n  const proto = Object.getPrototypeOf(calendar);\n  const descriptor = Object.getOwnPropertyDescriptor(proto, 'activeDate');\n\n  if (!(descriptor?.set && descriptor?.get)) {\n    console.warn(\n      'overrideActiveDateSetter: activeDate setter/getter not found on MatCalendar prototype.'\n    );\n    return;\n  }\n  const originalSetter = descriptor.set;\n  const originalGetter = descriptor.get;\n\n  Object.defineProperty(calendar, 'activeDate', {\n    configurable: true,\n    enumerable: false,\n    get() {\n      return originalGetter.call(this);\n    },\n\n    set(value: Date) {\n      const activeDate: ActiveDate = {\n        previous: originalGetter.call(this) ?? value,\n        current: value,\n      };\n      originalSetter.call(this, value);\n      handler.call(this, activeDate);\n      cdref.markForCheck();\n    },\n  });\n}\n","/**\n * @(#)default-date-options.ts Sept 08, 2023\n *\n * @author Aakash Kumar\n */\nimport { DATE_OPTION_TYPE } from '../constant/date-filter-const';\nimport { ISelectDateOption } from '../model/select-date-option.model';\nimport { createOption } from '../utils/date-picker-utilities';\n\nexport const DEFAULT_DATE_OPTIONS: ISelectDateOption[] = <ISelectDateOption[]>[\n  createOption('Today', DATE_OPTION_TYPE.DATE_DIFF, 0),\n  createOption('Yesterday', DATE_OPTION_TYPE.DATE_DIFF, -1),\n  createOption('Last 7 Days', DATE_OPTION_TYPE.DATE_DIFF, -7),\n  createOption('Last 30 Days', DATE_OPTION_TYPE.DATE_DIFF, -30),\n  createOption('Last Month', DATE_OPTION_TYPE.LAST_MONTH),\n  createOption('This Month', DATE_OPTION_TYPE.THIS_MONTH),\n  createOption('Month To Date', DATE_OPTION_TYPE.MONTH_TO_DATE),\n  createOption('Week To Date', DATE_OPTION_TYPE.WEEK_TO_DATE, 0, false),\n  createOption('Year To Date', DATE_OPTION_TYPE.YEAR_TO_DATE),\n  createOption('Custom Range', DATE_OPTION_TYPE.CUSTOM),\n];\n","/**\n * Human-readable timedelta / date parsing utilities.\n *\n * Three independent parsers plus a public entry point that combines them:\n *  1. {@link parseIso8601Duration} - ISO 8601 durations (`P7D`, `PT1H30M`),\n *     strict uppercase as required by the spec.\n *  2. {@link parseDateMath} - Grafana/Elasticsearch style date math (`now-7d`).\n *  3. {@link parseNaturalLanguage} - natural language (`7 days ago`) via a\n *     parser the host app registers with {@link setNaturalLanguageParser}\n *     (typically `chrono-node`). No parser registered means this step is a\n *     no-op, so the library never depends on `chrono-node` directly.\n *\n * {@link parseHumanDate} tries all three and accepts lowercase ISO durations.\n */\n\n/**\n * A calendar duration parsed from an ISO 8601 duration string.\n * Each field defaults to 0 when its component is absent.\n */\nexport interface Duration {\n  years: number;\n  months: number;\n  weeks: number;\n  days: number;\n  hours: number;\n  minutes: number;\n  seconds: number;\n}\n\n/**\n * Options for {@link parseHumanDate}.\n */\nexport interface ParseHumanDateOptions {\n  /** Reference \"now\" used to resolve relative expressions. Defaults to `new Date()`. */\n  base?: Date;\n  /**\n   * Direction applied to a bare ISO 8601 duration: `-1` resolves it to the\n   * past (`base - duration`, e.g. \"last 7 days\"), `1` to the future.\n   * Defaults to `-1` to match this picker's \"Last N days\" vocabulary.\n   */\n  durationSign?: 1 | -1;\n  /**\n   * Whether to fall back to the registered natural-language parser.\n   * Defaults to `true`. Has no effect if no parser was registered.\n   */\n  useNaturalLanguage?: boolean;\n}\n\n// ISO 8601 duration. Designators are uppercase per spec; `M` is months before\n// the `T` separator and minutes after it. Fractions allow `.` or `,`.\n// The `(?!$)` guards reject the degenerate `P` and `PT` strings.\nconst ISO_8601_DURATION =\n  /^P(?!$)(?:(\\d+(?:[.,]\\d+)?)Y)?(?:(\\d+(?:[.,]\\d+)?)M)?(?:(\\d+(?:[.,]\\d+)?)W)?(?:(\\d+(?:[.,]\\d+)?)D)?(?:T(?!$)(?:(\\d+(?:[.,]\\d+)?)H)?(?:(\\d+(?:[.,]\\d+)?)M)?(?:(\\d+(?:[.,]\\d+)?)S)?)?$/;\n\n// Date math: `now` followed by zero or more `±N<unit>` operations.\n// Units: y=year, M=month, w=week, d=day, h=hour, m=minute, s=second.\nconst DATE_MATH = /^now((?:[+-]\\d+[yMwdhms])*)$/;\nconst DATE_MATH_OP = /([+-])(\\d+)([yMwdhms])/g;\n\n/**\n * Parses a strict, uppercase ISO 8601 duration string into a {@link Duration}.\n *\n * Spec-compliant: designators must be uppercase, so `P7D` parses but `p7d`\n * does not. Use {@link parseHumanDate} if you need lenient (lowercase) input.\n *\n * @param input - Candidate ISO 8601 duration, e.g. `P1Y2M10DT2H30M`.\n * @returns The parsed duration, or `null` if the string is not a valid duration.\n */\nexport function parseIso8601Duration(input: string): Duration | null {\n  const match = ISO_8601_DURATION.exec(input);\n  if (!match) {\n    return null;\n  }\n  const num = (value: string | undefined): number =>\n    value === undefined ? 0 : parseFloat(value.replace(',', '.'));\n  return {\n    years: num(match[1]),\n    months: num(match[2]),\n    weeks: num(match[3]),\n    days: num(match[4]),\n    hours: num(match[5]),\n    minutes: num(match[6]),\n    seconds: num(match[7]),\n  };\n}\n\n/**\n * Applies a single date-math unit to a date, returning a new Date.\n * Date-level units use calendar-aware setters; the caller guarantees `unit`.\n */\nfunction applyUnit(date: Date, unit: string, amount: number): Date {\n  const result = new Date(date.getTime());\n  switch (unit) {\n    case 'y':\n      result.setFullYear(result.getFullYear() + amount);\n      break;\n    case 'M':\n      result.setMonth(result.getMonth() + amount);\n      break;\n    case 'w':\n      result.setDate(result.getDate() + amount * 7);\n      break;\n    case 'd':\n      result.setDate(result.getDate() + amount);\n      break;\n    case 'h':\n      result.setHours(result.getHours() + amount);\n      break;\n    case 'm':\n      result.setMinutes(result.getMinutes() + amount);\n      break;\n    case 's':\n      result.setSeconds(result.getSeconds() + amount);\n      break;\n  }\n  return result;\n}\n\n/**\n * Applies a {@link Duration} to a base date, returning a new Date.\n *\n * Calendar units (years, months, weeks, days) use Date setters and are\n * therefore truncated to integers; sub-day units (hours, minutes, seconds)\n * are applied as milliseconds and preserve fractional values.\n *\n * @param base - The date to offset from.\n * @param duration - The duration to apply.\n * @param sign - `1` to add (future), `-1` to subtract (past). Defaults to `1`.\n * @returns A new Date offset from `base`.\n */\nexport function addDuration(base: Date, duration: Duration, sign: 1 | -1 = 1): Date {\n  let result = new Date(base.getTime());\n  result = applyUnit(result, 'y', sign * duration.years);\n  result = applyUnit(result, 'M', sign * duration.months);\n  result.setDate(result.getDate() + sign * (duration.weeks * 7 + duration.days));\n  const subDayMs =\n    (duration.hours * 3600 + duration.minutes * 60 + duration.seconds) * 1000;\n  result.setTime(result.getTime() + sign * subDayMs);\n  return result;\n}\n\n/**\n * Parses a Grafana/Elasticsearch style date-math expression into a Date.\n *\n * Supports `now` optionally followed by `±N<unit>` operations applied left to\n * right, e.g. `now`, `now-7d`, `now-1M+15d`. Units: `y M w d h m s`\n * (note `M` = month, `m` = minute). Snapping (`/d`) is not supported.\n *\n * @param input - The date-math expression.\n * @param base - Reference \"now\". Defaults to `new Date()`.\n * @returns The resolved Date, or `null` if the expression is not date math.\n */\nexport function parseDateMath(input: string, base: Date = new Date()): Date | null {\n  const match = DATE_MATH.exec(input);\n  if (!match) {\n    return null;\n  }\n  let result = new Date(base.getTime());\n  const operations = match[1];\n  DATE_MATH_OP.lastIndex = 0;\n  let op: RegExpExecArray | null;\n  while ((op = DATE_MATH_OP.exec(operations)) !== null) {\n    const sign = op[1] === '-' ? -1 : 1;\n    const amount = parseInt(op[2], 10);\n    result = applyUnit(result, op[3], sign * amount);\n  }\n  return result;\n}\n\n/**\n * Signature of a natural-language date parser, matching `chrono-node`'s\n * `parseDate(text, ref)` export.\n */\nexport type NaturalLanguageParser = (text: string, ref?: Date) => Date | null;\n\n// A parser registered by the host app via `setNaturalLanguageParser`. The\n// library never imports `chrono-node` itself, keeping it a truly optional\n// dependency that works the same in browser, SSR, and Node builds.\nlet registeredParser: NaturalLanguageParser | null = null;\n\n/**\n * Registers a natural-language parser (typically `chrono-node`'s `parseDate`)\n * for {@link parseNaturalLanguage} / {@link parseHumanDate} to use.\n *\n * The consumer imports the package themselves, so their bundler resolves it\n * and this library never references it directly. Call with `null` to disable.\n *\n * @example\n * import * as chrono from 'chrono-node';\n * setNaturalLanguageParser((text, ref) => chrono.parseDate(text, ref));\n *\n * @param parser - The parser to use, or `null` to disable.\n */\nexport function setNaturalLanguageParser(\n  parser: NaturalLanguageParser | null\n): void {\n  registeredParser = parser;\n}\n\n/**\n * Parses natural language (`7 days ago`, `next friday`) using the parser\n * registered via {@link setNaturalLanguageParser}.\n *\n * @param input - The natural-language date expression.\n * @param base - Reference date the parser resolves against. Defaults to `new Date()`.\n * @returns The parsed Date, or `null` if no parser is registered or the text\n *          could not be parsed.\n */\nexport function parseNaturalLanguage(\n  input: string,\n  base: Date = new Date()\n): Date | null {\n  if (!registeredParser) {\n    return null;\n  }\n  try {\n    return registeredParser(input, base) ?? null;\n  } catch {\n    return null;\n  }\n}\n\n/**\n * Public entry point: parses a human-readable date/duration expression into a\n * concrete Date by trying, in order, date math, ISO 8601 duration, then\n * natural language via the registered parser.\n *\n * Unlike {@link parseIso8601Duration}, this accepts lowercase ISO durations\n * (`p7d`) by upper-casing the input before the ISO attempt.\n *\n * @param input - The expression, e.g. `now-7d`, `P7D`, `p7d`, `3 weeks ago`.\n * @param options - See {@link ParseHumanDateOptions}.\n * @returns The parsed Date, or `null` if nothing matched.\n */\nexport function parseHumanDate(\n  input: string,\n  options: ParseHumanDateOptions = {}\n): Date | null {\n  const base = options.base ?? new Date();\n  const durationSign = options.durationSign ?? -1;\n  const useNaturalLanguage = options.useNaturalLanguage ?? true;\n\n  const trimmed = input?.trim();\n  if (!trimmed) {\n    return null;\n  }\n\n  // 1. Date math (`now-7d`) - unambiguous and cheap.\n  const fromDateMath = parseDateMath(trimmed, base);\n  if (fromDateMath) {\n    return fromDateMath;\n  }\n\n  // 2. ISO 8601 duration - upper-cased so lowercase input is accepted here.\n  const duration = parseIso8601Duration(trimmed.toUpperCase());\n  if (duration) {\n    return addDuration(base, duration, durationSign);\n  }\n\n  // 3. Natural language via the registered parser, if any.\n  if (useNaturalLanguage) {\n    return parseNaturalLanguage(trimmed, base);\n  }\n\n  return null;\n}\n","/**\n * @(#)calendar.component.scss Sept 07, 2023\n *\n * Custom Calendar Component that manages two side-by-side\n * month views with support for date range selection, hover\n * highlighting, and navigation controls.\n *\n * @author Aakash Kumar\n */\nimport {\n  AfterViewInit,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ElementRef,\n  EventEmitter,\n  inject,\n  Input,\n  Output,\n  Renderer2,\n  signal,\n  ViewChild,\n} from '@angular/core';\nimport { DateRange, MatCalendar } from '@angular/material/datepicker';\nimport { ActiveDate } from '../model/active-date.model';\nimport {\n  getDateOfNextMonth,\n  getFirstDateOfNextMonth,\n  overrideActiveDateSetter,\n} from '../utils/date-picker-utilities';\nimport { ACTIVE_DATE_DEBOUNCE } from '../constant/date-filter-const';\n\n@Component({\n  standalone: false,\n  selector: 'lib-calendar',\n  templateUrl: './calendar.component.html',\n  styleUrls: ['./calendar.component.css'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalendarComponent implements AfterViewInit {\n  firstViewStartDate = signal(new Date());\n  secondViewStartDate = signal(getDateOfNextMonth(this.firstViewStartDate()));\n  secondViewMinDate = signal(\n    getFirstDateOfNextMonth(this.firstViewStartDate())\n  );\n\n  @Input() minDate!: Date;\n  @Input() maxDate!: Date;\n\n  /** Emits when the user changes the selection by clicking dates in the views. */\n  @Output() selectedDatesChange = new EventEmitter<DateRange<Date>>();\n\n  @ViewChild('firstCalendarView') firstCalendarView!: MatCalendar<Date>;\n  @ViewChild('secondCalendarView') secondCalendarView!: MatCalendar<Date>;\n\n  private _selectedDates!: DateRange<Date> | null;\n  private isAllowHoverEvent: boolean = false;\n  private cdref = inject(ChangeDetectorRef);\n  private el = inject(ElementRef);\n  private renderer = inject(Renderer2);\n\n  /**\n   * Updates the selected date range and synchronizes both calendar views.\n   */\n  @Input()\n  set selectedDates(selectedDates: DateRange<Date> | null) {\n    this._selectedDates = selectedDates;\n    if (!selectedDates || !(selectedDates.start && selectedDates.end)) return;\n\n    const startDate = selectedDates.start ?? new Date();\n    const endDate = selectedDates.end;\n    this.firstViewStartDate.set(startDate);\n    this.secondViewMinDate.set(getFirstDateOfNextMonth(startDate));\n    const computedEndDate =\n      startDate.getMonth() === endDate.getMonth()\n        ? getDateOfNextMonth(endDate)\n        : endDate;\n    this.secondViewStartDate.set(computedEndDate);\n  }\n\n  get selectedDates() {\n    return this._selectedDates;\n  }\n\n  /**\n   * Lifecycle hook that is called after Angular has fully initialized\n   * the component's view (and child views).\n   *\n   * Used here to attach hover events and register active date change\n   * listeners once the calendar views are available in the DOM.\n   */\n  ngAfterViewInit(): void {\n    this.attachHoverEvent('firstCalendarView');\n    this.attachHoverEvent('secondCalendarView');\n    this.registerActiveDateChangeEvents();\n  }\n\n  /**\n   * Handles month selection in the first view.\n   *\n   * @param event - Selected month date\n   */\n  monthSelected(viewName: string) {\n    if (viewName === 'secondCalendarView') {\n      this.removeDefaultFocus(this);\n    }\n    this.attachHoverEvent(viewName);\n  }\n\n  /**\n   * Updates the selected date range when a date is clicked.\n   *\n   * @param date - Date clicked by the user\n   */\n  updateDateRangeSelection(date: Date | null): void {\n    const selectedDates = this.selectedDates;\n    if (\n      !selectedDates ||\n      (selectedDates.start && selectedDates.end) ||\n      (selectedDates.start && date && selectedDates.start > date)\n    ) {\n      this._selectedDates = new DateRange<Date>(date, null);\n      this.isAllowHoverEvent = true;\n    } else {\n      this.isAllowHoverEvent = false;\n      this._selectedDates = new DateRange<Date>(selectedDates.start, date);\n    }\n    this.selectedDatesChange.emit(this._selectedDates);\n    this.cdref.markForCheck();\n  }\n\n  /**\n   * Registers event handlers for active date changes on both calendar views.\n   *\n   * This method overrides the default `activeDate` property setter of each\n   * calendar view to ensure custom handlers are executed whenever the\n   * active date changes.\n   */\n  private registerActiveDateChangeEvents(): void {\n    overrideActiveDateSetter(\n      this.firstCalendarView,\n      this.cdref,\n      this.onFirstViewActiveDateChange.bind(this)\n    );\n    overrideActiveDateSetter(\n      this.secondCalendarView,\n      this.cdref,\n      this.onSecondViewActiveDateChange.bind(this)\n    );\n  }\n\n  /**\n   * Handles the event when the active date of the first calendar view changes.\n   *\n   * @param activeDate - Object containing `previous` and `current` date values.\n   */\n  private onFirstViewActiveDateChange(activeDate: ActiveDate): void {\n    const handler = this.isPrevious(activeDate)\n      ? () => this.handleFirstViewPrevEvent(activeDate)\n      : () => this.handleFirstViewNextEvent(activeDate.current);\n\n    // Delay execution because active date event fires before view update\n    setTimeout(handler, ACTIVE_DATE_DEBOUNCE);\n  }\n\n  /**\n   * Handles the event when the active date of the second calendar view changes.\n   *\n   * @param activeDate - Object containing `previous` and `current` date values.\n   */\n  private onSecondViewActiveDateChange(activeDate: ActiveDate): void {\n    this.attachHoverEvent('secondCalendarView');\n  }\n\n  /**\n   * Handles the \"next\" navigation event for the first calendar view.\n   *\n   * @param currDate - The currently active date in the first calendar view.\n   * @param force - Optional flag that can be used to enforce updates (not used in current logic).\n   */\n  private handleFirstViewNextEvent(currDate: Date, force?: boolean): void {\n    if (this.firstCalendarView.currentView.toLocaleLowerCase() !== 'month') {\n      return;\n    }\n    this.attachHoverEvent('firstCalendarView');\n    const nextMonthDate = getFirstDateOfNextMonth(currDate);\n    let secondViewActiveDate = this.secondCalendarView.activeDate;\n    if (nextMonthDate < secondViewActiveDate) {\n      this.secondViewMinDate.set(nextMonthDate);\n      this.attachHoverEvent('secondCalendarView');\n      return;\n    }\n    secondViewActiveDate = getDateOfNextMonth(currDate);\n    this.secondViewMinDate.set(nextMonthDate);\n    this.secondCalendarView.activeDate = secondViewActiveDate;\n    this.cdref.detectChanges();\n  }\n\n  /**\n   * Handles the \"previous\" navigation event for the first calendar view.\n   *\n   * @param activeDate - Object containing `previous` and `current` date values.\n   */\n  private handleFirstViewPrevEvent(activeDate: ActiveDate): void {\n    if (this.firstCalendarView.currentView.toLocaleLowerCase() !== 'month') {\n      return;\n    }\n    this.secondViewMinDate.set(getFirstDateOfNextMonth(activeDate.current));\n    this.attachHoverEvent('firstCalendarView');\n    this.attachHoverEvent('secondCalendarView');\n  }\n\n  /**\n   * Checks whether the previous date is greater than the current date.\n   *\n   * @param activeDate - Object containing `previous` and `current` date values.\n   * @returns `true` if the previous date is later than the current date, otherwise `false`.\n   */\n  private isPrevious(activeDate: ActiveDate): boolean {\n    return activeDate.previous > activeDate.current;\n  }\n\n  /**\n   * Attaches hover events to all date cells in the first view.\n   */\n  private attachHoverEvent(viewId: string) {\n    const nodes = this.el.nativeElement.querySelectorAll(\n      `#${viewId} .mat-calendar-body-cell`\n    );\n    setTimeout(() => this.addHoverEvents(nodes), ACTIVE_DATE_DEBOUNCE);\n  }\n\n  /**\n   * Removes active focus from the second view.\n   *\n   * @param classRef - Reference to this component\n   */\n  private removeDefaultFocus(classRef: CalendarComponent): void {\n    setTimeout(() => {\n      const btn: HTMLButtonElement[] =\n        classRef.el.nativeElement.querySelectorAll(\n          '#secondCalendarView button.mat-calendar-body-active'\n        );\n      if (btn?.length) {\n        btn[0].blur();\n      }\n    }, 1);\n  }\n\n  /**\n   * Updates the selection range dynamically on hover.\n   *\n   * @param date - Hovered date\n   */\n  private updateSelectionOnMouseHover(date: Date): void {\n    const selectedDates = this.selectedDates;\n    if (selectedDates?.start && date && selectedDates.start < date) {\n      const dateRange: DateRange<Date> = new DateRange<Date>(\n        selectedDates.start,\n        date\n      );\n      this.firstCalendarView.selected = dateRange;\n      this.secondCalendarView.selected = dateRange;\n      this.firstCalendarView['_changeDetectorRef'].markForCheck();\n      this.secondCalendarView['_changeDetectorRef'].markForCheck();\n      this.isAllowHoverEvent = true;\n    }\n  }\n\n  /**\n   * Attaches hover events to given nodes to update range selection.\n   *\n   * @param nodes - Date cell nodes\n   */\n  private addHoverEvents(nodes: any): void {\n    if (!nodes) {\n      return;\n    }\n    Array.from(nodes).forEach((button) => {\n      this.renderer.listen(button, 'mouseover', (event) => {\n        if (this.isAllowHoverEvent) {\n          const date = new Date(event.target['ariaLabel']);\n          this.updateSelectionOnMouseHover(date);\n        }\n      });\n    });\n    this.firstCalendarView['_changeDetectorRef'].markForCheck();\n    this.secondCalendarView['_changeDetectorRef'].markForCheck();\n  }\n}\n","<!--**\n * @(#)calendar.component.html Sept 07, 2023\n\n * @author Aakash Kumar\n *-->\n<div class=\"calendar-container\">\n  <div class=\"first-view\">\n    <mat-calendar id=\"firstCalendarView\" #firstCalendarView [startAt]=\"firstViewStartDate()\" [selected]=\"selectedDates\"\n      (selectedChange)=\"updateDateRangeSelection($event)\" (monthSelected)=\"monthSelected('firstCalendarView')\" [minDate]=\"minDate\"\n      [maxDate]=\"maxDate\"></mat-calendar>\n  </div>\n  <div class=\"second-view\">\n    <mat-calendar id=\"secondCalendarView\" #secondCalendarView [startAt]=\"secondViewStartDate()\" [minDate]=\"secondViewMinDate()\"\n      [maxDate]=\"maxDate\" [selected]=\"selectedDates\" (selectedChange)=\"updateDateRangeSelection($event)\"\n      (monthSelected)=\"monthSelected('secondCalendarView')\"></mat-calendar>\n  </div>\n</div>\n","/**\n * @(#)ng-date-picker.component.ts Sept 05, 2023\n *\n * @author Aakash Kumar\n */\nimport {\n  AfterViewInit,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  computed,\n  ElementRef,\n  EventEmitter,\n  inject,\n  Input,\n  OnInit,\n  Output,\n  Signal,\n  signal,\n  WritableSignal,\n} from '@angular/core';\nimport {\n  AbstractControl,\n  FormControl,\n  FormGroup,\n  ValidationErrors,\n  Validators,\n} from '@angular/forms';\nimport { DateRange } from '@angular/material/datepicker';\nimport { SelectedDateEvent } from '../public-api';\nimport { CalendarComponent } from './calendar/calendar.component';\nimport { DATE_OPTION_TYPE } from './constant/date-filter-const';\nimport { DEFAULT_DATE_OPTIONS } from './data/default-date-options';\nimport { ISelectDateOption } from './model/select-date-option.model';\nimport {\n  computeOptionDateRange,\n  getClone,\n  getDateString,\n  getDateWithOffset,\n  getDaysInMonth,\n  getFormattedDateString,\n  getRelativeExpr,  \n  parseDateByFormat,\n  isSameDay,\n  resetOptionSelection,\n  selectCustomOption,\n} from './utils/date-picker-utilities';\nimport { parseHumanDate } from './utils/human-date-parser';\n\n@Component({\n  standalone: false,\n  selector: 'ng-date-range-picker',\n  templateUrl: './ng-date-picker.component.html',\n  styleUrls: ['./ng-date-picker.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDatePickerComponent implements OnInit, AfterViewInit {\n  public isDateOptionList: boolean = false;\n  public isCustomRange: boolean = false;\n  @Input() inputLabel: string = 'Date Range';\n  @Input() staticOptionId = 'static-options';\n  @Input() dynamicOptionId = 'dynamic-options';\n  @Input() calendarId: string = 'custom-calendar';\n  @Input() enableDefaultOptions: boolean = true;\n  @Input() selectedDates!: DateRange<Date> | null;\n  @Input() dateFormat: string = 'dd/MM/yyyy';\n  @Input() isShowStaticDefaultOptions: boolean = false;\n  @Input() hideDefaultOptions: boolean = false;\n  @Input() cdkConnectedOverlayOffsetX = 0;\n  @Input() cdkConnectedOverlayOffsetY = 0;\n  @Input() listCdkConnectedOverlayOffsetY = 0;\n  @Input() listCdkConnectedOverlayOffsetX = 0;\n  @Input() selectedOptionIndex = 3;\n  @Input() displaySelectedLabel = false;\n  /**\n   * When true, the main input shows the human-readable expressions\n   * (e.g. `now-7d - now`) instead of the absolute date range. If\n   * `displaySelectedLabel` is also true, the label takes priority.\n   */\n  @Input() displaySelectedExpression = false;\n  /**\n   * When true, the custom-range footer shows two editable Material inputs\n   * (start / end) that accept dates in `dateFormat`, ISO 8601 durations\n   * (`p7d`), or date math (`now-7d`). When false, a read-only label is shown.\n   */\n  @Input() enableEditableDates = false;\n  @Input() cdkConnectedOverlayPush = true;\n  @Input() cdkConnectedOverlayPositions = [];\n  @Input() allowSingleDateSelection = true;\n  /**\n   * When true, automatically selects the preset option whose computed date range\n   * matches the provided selectedDates (works with both default and custom options).\n   * Falls back to \"Custom Range\" if no option matches.\n   */\n  @Input() autoSelectOption: boolean = false;\n\n  // default min date is current date - 10 years.\n  @Input() minDate = getDateWithOffset(-10);\n  // default max date is current date + 10 years.\n  @Input() maxDate = getDateWithOffset(10);\n\n  @Output() onDateSelectionChanged = new EventEmitter<SelectedDateEvent>();\n  @Output() dateListOptions = new EventEmitter<ISelectDateOption[]>();\n\n  private cdref: ChangeDetectorRef = inject(ChangeDetectorRef);\n  private el: ElementRef = inject(ElementRef);\n\n  private _dateOptions: WritableSignal<ISelectDateOption[]> = signal([]);\n  visibleOptions = computed(() =>\n    this._dateOptions().filter((op) => op.isVisible)\n  );\n\n  /**\n   * Reactive form backing the editable start/end inputs. Each control accepts\n   * a `dateFormat` date, an ISO 8601 duration, or a date-math expression; the\n   * group is invalid when either value is unparseable or start is after end.\n   */\n  editableForm = new FormGroup(\n    {\n      start: new FormControl('', {\n        nonNullable: true,\n        validators: [Validators.required, (c) => this.validateDateControl(c)],\n      }),\n      end: new FormControl('', {\n        nonNullable: true,\n        validators: [Validators.required, (c) => this.validateDateControl(c)],\n      }),\n    },\n    { validators: (g) => this.validateRange(g) }\n  );\n\n  // The raw expressions the user last committed via the editable inputs, kept\n  // so human-language input (e.g. `now-7d`) is shown again instead of being\n  // replaced by an absolute date - but only while it still resolves to the\n  // current range (see populateEditableForm).\n  private editableExpr: { start: string; end: string } | null = null;\n\n  constructor() {}\n\n  @Input()\n  set dateDropDownOptions(defaultDateList: ISelectDateOption[]) {\n    const options = [\n      ...(this.enableDefaultOptions ? getClone(DEFAULT_DATE_OPTIONS) : []),\n      ...(defaultDateList ?? []),\n    ];\n    this._dateOptions.set(options);\n  }\n\n  get dateDropDownOptions(): ISelectDateOption[] {\n    return this._dateOptions() ?? [];\n  }\n\n  ngOnInit(): void {\n    if (this.isDefaultInitRequired()) {\n      this.initDefaultOptions();\n    }\n    this.dateListOptions.emit(this.dateDropDownOptions);\n  }\n\n  ngAfterViewInit(): void {\n    this.updateDefaultDatesValues();\n  }\n\n  /**\n   * Toggles the visibility of the default date option list.\n   * If the custom range panel is open, closes it instead.\n   *\n   * @param event Optional MouseEvent triggering the toggle.\n   */\n  toggleDateOptionSelectionList(event?: MouseEvent): void {\n    event?.preventDefault();\n    event?.stopImmediatePropagation();\n\n    if (this.isCustomRange) {\n      this.isCustomRange = false;\n      return;\n    }\n    if (this.isDateOptionList) {\n      this.isDateOptionList = false;\n      return;\n    }\n    // When the active selection is a custom range, reopen straight into the\n    // custom-range view instead of the options list.\n    const selectedOption = this.dateDropDownOptions.find((o) => o.isSelected);\n    if (selectedOption?.optionType === DATE_OPTION_TYPE.CUSTOM) {\n      this.isCustomRange = true;\n      this.populateEditableForm();\n      return;\n    }\n    this.isDateOptionList = true;\n  }\n\n  /**\n   * Updates the custom date range selection from the input.\n   *\n   * @param input The HTML input element associated with the date picker.\n   * @param selectedDates The selected date range.\n   */\n  updateCustomRange(\n    input: HTMLInputElement,\n    selectedDates: DateRange<Date> | null\n  ): void {\n    if (this.allowSingleDateSelection && !selectedDates?.end) {\n      const date = selectedDates?.start  ?? new Date();\n      selectedDates = new DateRange<Date>(date, date);\n    }\n    if (this.isCustomRange) {\n      resetOptionSelection(this.dateDropDownOptions);\n      selectCustomOption(this.dateDropDownOptions);\n      this.syncOptionSelection();\n      this.isCustomRange = false;\n    }\n\n    const start = selectedDates?.start ?? new Date();\n    const end = selectedDates?.end ?? new Date();\n    this.updateSelectedDates(input, start, end, null);\n  }\n\n  /**\n   * Updates the selection when a specific date option is clicked.\n   *\n   * @param option The selected date option.\n   * @param input The HTML input element to update with selected dates.\n   */\n  updateSelection(option: ISelectDateOption, input: HTMLInputElement): void {\n    this.isDateOptionList = false;\n    this.isCustomRange = option.optionType === DATE_OPTION_TYPE.CUSTOM;\n    if (this.isCustomRange) {\n      resetOptionSelection(this.dateDropDownOptions);\n      selectCustomOption(this.dateDropDownOptions);\n      this.populateEditableForm();\n    } else {\n      resetOptionSelection(this.dateDropDownOptions, option);\n      this.updateDateOnOptionSelect(option, input);\n    }\n    this.syncOptionSelection();\n    this.cdref.markForCheck();\n  }\n\n  /**\n   * Re-emits the options signal after an in-place selection change so the\n   * OnPush views (bound to the `visibleOptions` computed) reliably reflect the\n   * new `isSelected` state - the same notification the initial signal `set`\n   * provides.\n   */\n  private syncOptionSelection(): void {\n    this._dateOptions.update((options) => [...options]);\n  }\n\n  /**\n   * Toggles the custom date range selection view visibility.\n   */\n  toggleCustomDateRangeView(): void {\n    this.isCustomRange = !this.isCustomRange;\n    if (this.isCustomRange) {\n      this.populateEditableForm();\n    }\n  }\n\n  /**\n   * Parses a single editable input value, accepting either a `dateFormat`\n   * date or one of the human formats (ISO 8601 duration, date math).\n   *\n   * @param value - The raw input string.\n   * @returns The parsed Date, or `null` if it cannot be parsed.\n   */\n  private parseInputValue(value: string): Date | null {\n    const trimmed = value?.trim();\n    if (!trimmed) {\n      return null;\n    }\n    return parseDateByFormat(trimmed, this.dateFormat) ?? parseHumanDate(trimmed);\n  }\n\n  /**\n   * Validator for a single editable date control: valid when the value parses\n   * to a date. Empty values are left to the `required` validator.\n   */\n  private validateDateControl(control: AbstractControl): ValidationErrors | null {\n    const value = (control.value ?? '').trim();\n    if (!value) {\n      return null;\n    }\n    return this.parseInputValue(value) ? null : { invalidDate: true };\n  }\n\n  /**\n   * Group validator ensuring the parsed start date is not after the end date.\n   */\n  private validateRange(group: AbstractControl): ValidationErrors | null {\n    const start = this.parseInputValue(group.get('start')?.value ?? '');\n    const end = this.parseInputValue(group.get('end')?.value ?? '');\n    if (start && end && start > end) {\n      return { rangeOrder: true };\n    }\n    return null;\n  }\n\n  /**\n   * Commits the editable inputs to the calendar so the views and the Apply\n   * action reflect the typed values. No-op when editing is disabled or the\n   * form is invalid.\n   *\n   * @param calendar - The calendar component instance from the template.\n   */\n  commitEditableDates(calendar: CalendarComponent): void {\n    if (!this.enableEditableDates || this.editableForm.invalid) {\n      return;\n    }\n    const startRaw = this.editableForm.controls.start.value.trim();\n    const endRaw = this.editableForm.controls.end.value.trim();\n    const start = this.parseInputValue(startRaw);\n    const end = this.parseInputValue(endRaw);\n    if (!start || !end) {\n      return;\n    }\n    // Remember exactly what the user typed so the expression (e.g. `now-7d`)\n    // survives a reopen instead of being shown as a resolved absolute date.\n    this.editableExpr = { start: startRaw, end: endRaw };\n    calendar.selectedDates = new DateRange<Date>(start, end);\n    this.cdref.markForCheck();\n  }\n\n  /**\n   * Reflects a calendar (date-click) selection in the editable inputs as\n   * absolute dates. A calendar pick is an explicit absolute selection, so any\n   * remembered expression is cleared and the inputs show formatted dates.\n   *\n   * @param range - The range emitted by the calendar.\n   */\n  onCalendarSelectionChange(range: DateRange<Date>): void {\n    if (!this.enableEditableDates) {\n      return;\n    }\n    this.editableExpr = null;\n    this.editableForm.setValue({\n      start: range.start ? getDateString(range.start, this.dateFormat) : '',\n      end: range.end ? getDateString(range.end, this.dateFormat) : '',\n    });\n    this.cdref.markForCheck();\n  }\n\n  /**\n   * Commits the editable inputs and applies the range, closing the panel -\n   * the same as clicking Apply. Used for the Enter key. No-op when editing is\n   * disabled or the form is invalid, so Enter never closes with bad input.\n   *\n   * @param input - The main date input element to update.\n   * @param calendar - The calendar component instance from the template.\n   */\n  applyEditableDates(input: HTMLInputElement, calendar: CalendarComponent): void {\n    if (!this.enableEditableDates || this.editableForm.invalid) {\n      return;\n    }\n    this.commitEditableDates(calendar);\n    this.updateCustomRange(input, calendar.selectedDates);\n  }\n\n  /**\n   * Pre-fills the editable inputs from the current selection: relative\n   * expressions for a day-diff option (e.g. `now-7d` .. `now`), otherwise the\n   * absolute formatted dates.\n   */\n  private populateEditableForm(): void {\n    if (!this.enableEditableDates) {\n      return;\n    }\n    const range = this.selectedDates;\n    if (range?.start && range?.end) {\n      const option =\n        this.dateDropDownOptions.find((o) => o.isSelected) ?? null;\n      this.editableForm.setValue(\n        this.resolveDisplayExpr(range.start, range.end, option)\n      );\n    } else {\n      this.editableForm.setValue({ start: '', end: '' });\n    }\n  }\n\n  /**\n   * Resolves the human-readable start/end expressions for a range. Prefers the\n   * user's own committed expression (when it still resolves to this range),\n   * then the relative form of a day-diff option, and finally the absolute\n   * formatted dates. Shared by the editable inputs and the emitted event.\n   *\n   * @param start - Range start date.\n   * @param end - Range end date.\n   * @param opt - The associated date option, if any.\n   * @returns The start and end expression strings.\n   */\n  private resolveDisplayExpr(\n    start: Date,\n    end: Date,\n    opt: ISelectDateOption | null\n  ): { start: string; end: string } {\n    if (this.editableExpr && this.exprMatchesDates(this.editableExpr, start, end)) {\n      return { start: this.editableExpr.start, end: this.editableExpr.end };\n    }\n    const optionExpr = getRelativeExpr(opt);\n    if (optionExpr) {\n      return optionExpr;\n    }\n    return {\n      start: getDateString(start, this.dateFormat),\n      end: getDateString(end, this.dateFormat),\n    };\n  }\n\n  /**\n   * Checks whether a saved expression still resolves (to day precision) to the\n   * given dates, so a stale expression is not reused after the range changed\n   * by other means.\n   */\n  private exprMatchesDates(\n    expr: { start: string; end: string },\n    start: Date,\n    end: Date\n  ): boolean {\n    const exprStart = this.parseInputValue(expr.start);\n    const exprEnd = this.parseInputValue(expr.end);\n    return (\n      !!exprStart &&\n      !!exprEnd &&\n      isSameDay(exprStart, start) &&\n      isSameDay(exprEnd, end)\n    );\n  }\n\n  /**\n   * Clears the currently selected dates and resets all related properties.\n   *\n   * @param event The MouseEvent triggering the clear action.\n   */\n  clearSelection(event: MouseEvent): void {\n    event?.stopImmediatePropagation();\n    this.minDate = getDateWithOffset(-10);\n    this.maxDate = getDateWithOffset(10);\n    this.selectedDates = null;\n    resetOptionSelection(this.dateDropDownOptions);\n    this.syncOptionSelection();\n    this.clearDateInput();\n    this.cdref.markForCheck();\n    const selectedDateEventData: SelectedDateEvent = {\n      range: null,\n      selectedOption: null,\n      startExpr: null,\n      endExpr: null,\n    };\n    this.onDateSelectionChanged.emit(selectedDateEventData);\n  }\n\n  /**\n   * Clears the input field value for the date picker.\n   */\n  private clearDateInput(): void {\n    const dateInputField =\n      this.el.nativeElement.querySelector('#date-input-field');\n    if (dateInputField) {\n      dateInputField.value = '';\n    }\n  }\n\n  /**\n   * Updates selected dates based on a selected option and input element.\n   *\n   * @param option The selected date option.\n   * @param input The HTML input element to update.\n   */\n  private updateDateOnOptionSelect(\n    option: ISelectDateOption,\n    input: HTMLInputElement\n  ): void {\n    // If there is a callback function, use it to get the date range\n    if (option?.callBackFunction) {\n      const dateRange: DateRange<Date> = option.callBackFunction();\n      if (dateRange?.start && dateRange?.end) {\n        this.updateSelectedDates(input, dateRange.start, dateRange.end, option);\n        return;\n      }\n    }\n    this.updateDateWithSelectedOption(option, input);\n  }\n\n  /**\n   * Calculates and updates the start and end dates based on the selected option.\n   *\n   * @param option The selected date option.\n   * @param input The HTML input element to update.\n   */\n  private updateDateWithSelectedOption(\n    option: ISelectDateOption,\n    input: HTMLInputElement\n  ): void {\n    const currDate = new Date();\n    let startDate: Date = new Date();\n    let lastDate: Date = new Date();\n    // Determine the date range based on the option key\n    switch (option.optionType) {\n      case DATE_OPTION_TYPE.DATE_DIFF:\n        startDate.setDate(startDate.getDate() + (option.dateDiff ?? 0));\n        break;\n\n      case DATE_OPTION_TYPE.LAST_MONTH:\n        currDate.setMonth(currDate.getMonth() - 1);\n        startDate = new Date(currDate.getFullYear(), currDate.getMonth(), 1);\n        lastDate = new Date(\n          currDate.getFullYear(),\n          currDate.getMonth(),\n          getDaysInMonth(currDate)\n        );\n        break;\n\n      case DATE_OPTION_TYPE.THIS_MONTH:\n        startDate = new Date(currDate.getFullYear(), currDate.getMonth(), 1);\n        lastDate = new Date(\n          currDate.getFullYear(),\n          currDate.getMonth(),\n          getDaysInMonth(currDate)\n        );\n        break;\n\n      case DATE_OPTION_TYPE.YEAR_TO_DATE:\n        startDate = new Date(currDate.getFullYear(), 0, 1);\n        break;\n\n      case DATE_OPTION_TYPE.MONTH_TO_DATE:\n        startDate = new Date(currDate.getFullYear(), currDate.getMonth(), 1);\n        break;\n\n      default:\n        break;\n    }\n\n    // Update the selected dates\n    this.updateSelectedDates(input, startDate, lastDate, option);\n  }\n\n  /**\n   * Updates the date range and input display.\n   *\n   * @param input The HTML input element.\n   * @param start Start date of the range.\n   * @param end End date of the range.\n   * @param opt Optional selected date option.\n   */\n  private updateSelectedDates(\n    input: HTMLInputElement,\n    start: Date,\n    end: Date,\n    opt: ISelectDateOption | null\n  ): void {\n    const range = new DateRange(start, end);\n    this.selectedDates = range;\n\n    const expr = this.resolveDisplayExpr(start, end, opt);\n    const rangeLabel = `${getDateString(\n      start,\n      this.dateFormat\n    )} - ${getDateString(end, this.dateFormat)}`;\n\n    if (this.displaySelectedLabel && opt?.optionLabel) {\n      input.value = opt.optionLabel;\n    } else if (this.displaySelectedExpression) {\n      input.value = `${expr.start} - ${expr.end}`;\n    } else {\n      input.value = rangeLabel;\n    }\n\n    this.onDateSelectionChanged.emit({\n      range,\n      selectedOption:\n        this.dateDropDownOptions.find((o) => o.isSelected) ?? null,\n      startExpr: expr.start,\n      endExpr: expr.end,\n    });\n    this.cdref.markForCheck();\n  }\n\n  /**\n   * Updates the input and internal state with default dates on initialization.\n   * When autoSelectOption is true and selectedDates is provided, attempts to\n   * match against existing options before falling back to Custom Range.\n   */\n  private updateDefaultDatesValues(): void {\n    const input: HTMLInputElement =\n      this.el.nativeElement.querySelector('#date-input-field');\n\n    if (this.selectedDates?.start && this.selectedDates?.end) {\n      const matchedOption = this.autoSelectOption\n        ? this.findMatchingOption(this.selectedDates as DateRange<Date>)\n        : null;\n\n      if (matchedOption) {\n        resetOptionSelection(this.dateDropDownOptions, matchedOption);\n        const label = this.displaySelectedLabel ? matchedOption.optionLabel : null;\n        input.value = label ?? getFormattedDateString(this.selectedDates, this.dateFormat);\n      } else {\n        resetOptionSelection(this.dateDropDownOptions);\n        selectCustomOption(this.dateDropDownOptions);\n        input.value = getFormattedDateString(this.selectedDates, this.dateFormat);\n      }\n\n      this.cdref.detectChanges();\n      return;\n    }\n\n    const selectedOptions = this._dateOptions().find(\n      (option) => option.isSelected\n    );\n\n    if (\n      selectedOptions &&\n      selectedOptions.optionType !== DATE_OPTION_TYPE.CUSTOM\n    ) {\n      this.updatedFromListValueSelection(selectedOptions, input);\n      this.cdref.detectChanges();\n    }\n  }\n\n  /**\n   * Iterates over all non-custom options and returns the first one whose\n   * computed date range matches the provided selectedDates (day-level comparison).\n   * Works for both default options and consumer-provided options with callBackFunction.\n   *\n   * @param selectedDates The date range to match against\n   * @returns The matching ISelectDateOption, or null if none found\n   */\n  private findMatchingOption(\n    selectedDates: DateRange<Date>\n  ): ISelectDateOption | null {\n    const candidates = this.dateDropDownOptions.filter(\n      (option) => option.optionType !== DATE_OPTION_TYPE.CUSTOM\n    );\n\n    for (const option of candidates) {\n      const range = computeOptionDateRange(option);\n      if (\n        range?.start &&\n        range?.end &&\n        isSameDay(range.start, selectedDates.start!) &&\n        isSameDay(range.end, selectedDates.end!)\n      ) {\n        return option;\n      }\n    }\n\n    return null;\n  }\n\n  /**\n   * Updates the input and selected dates based on a selected option from the list.\n   *\n   * @param selectedOption The selected date option.\n   * @param input The HTML input element to update.\n   */\n  private updatedFromListValueSelection(\n    selectedOption: ISelectDateOption,\n    input: HTMLInputElement\n  ): void {\n    // This will update value if option is selected from default list.\n    if (!selectedOption['callBackFunction']) {\n      this.updateDateOnOptionSelect(selectedOption, input);\n      return;\n    }\n    // This will update value if option is selected from provided custom list.\n    const dateRange: DateRange<Date> = selectedOption.callBackFunction();\n    this.updateSelectedDates(\n      input,\n      dateRange.start ?? new Date(),\n      dateRange.end ?? new Date(),\n      selectedOption\n    );\n  }\n\n  /**\n   * Checks whether default initialization of options is required.\n   *\n   * @returns True if default options need to be initialized, otherwise false.\n   */\n  private isDefaultInitRequired(): boolean {\n    return this.enableDefaultOptions && !this._dateOptions.length;\n  }\n\n  /**\n   * Initializes the default date options with the selected index.\n   */\n  private initDefaultOptions(): void {\n    const options = getClone<ISelectDateOption[]>(DEFAULT_DATE_OPTIONS).map(\n      (opt, idx) => ({\n        ...opt,\n        isSelected: idx === this.selectedOptionIndex,\n      })\n    );\n    this._dateOptions.set(options);\n  }\n}\n","<!--**\n * @(#)ng-date-picker.component.html Sept 05, 2023\n\n * @author Aakash Kumar\n *-->\n<div class=\"date-picker-main ndp-main\" cdkOverlayOrigin #trigger>\n  <mat-form-field class=\"w-full\" [class]=\"{'display-hidden':isShowStaticDefaultOptions}\" (click)=\"toggleDateOptionSelectionList($event)\">\n    <mat-label (click)=\"toggleDateOptionSelectionList($event)\">{{inputLabel}}</mat-label>\n    <input matInput readonly=\"readonly\" #dateInput class=\"cursor-pointer\" id=\"date-input-field\">\n    @if (!!dateInput.value) {\n      <button mat-icon-button matSuffix class=\"cursor-pointer pe-0 ps-0\" matTooltip=\"Clear\"\n      (click)=\"clearSelection($event)\">\n        <mat-icon>clear</mat-icon>\n      </button>\n    }\n    <button mat-icon-button matSuffix class=\"cursor-pointer\"> <mat-icon>date_range</mat-icon></button>\n  </mat-form-field>\n\n  @if(dateDropDownOptions.length && isShowStaticDefaultOptions) {\n    <ng-container *ngTemplateOutlet=\"dateOptionList;\n      context: {\n        $implicit: visibleOptions(),\n        dateInput: dateInput,\n        optionId: staticOptionId,\n        className:'w-full custom-ckd-container ndp-cdk-container range-input',\n      }\"\n    ></ng-container>\n  }\n\n  <ng-template cdkConnectedOverlay [cdkConnectedOverlayHasBackdrop]=\"false\" [cdkConnectedOverlayOrigin]=\"trigger\"\n    [cdkConnectedOverlayOpen]=\"isDateOptionList\" [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n    [cdkConnectedOverlayOffsetX]=\"listCdkConnectedOverlayOffsetX\"\n    [cdkConnectedOverlayOffsetY]=\"listCdkConnectedOverlayOffsetY\"\n    (overlayOutsideClick)=\"!isShowStaticDefaultOptions && toggleDateOptionSelectionList()\">\n\n    @if(dateDropDownOptions.length && !isShowStaticDefaultOptions) {\n      <ng-container *ngTemplateOutlet=\"dateOptionList;\n        context: {\n          $implicit: visibleOptions(),\n          dateInput: dateInput,\n          optionId: dynamicOptionId,\n          className:'w-full custom-ckd-container ndp-cdk-container range-input',\n        }\"\n      ></ng-container>\n    }\n  </ng-template>\n\n  <ng-template cdkConnectedOverlay [cdkConnectedOverlayHasBackdrop]=\"false\" [cdkConnectedOverlayOrigin]=\"trigger\"\n    [cdkConnectedOverlayOpen]=\"isCustomRange\" [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n    [cdkConnectedOverlayPositions]=\"cdkConnectedOverlayPositions\"\n    [cdkConnectedOverlayOffsetX]=\"cdkConnectedOverlayOffsetX\" [cdkConnectedOverlayOffsetY]=\"cdkConnectedOverlayOffsetY\"\n    (overlayOutsideClick)=\"toggleCustomDateRangeView()\">\n    <div class=\"custom-ckd-container ndp-cdk-container custom-calendar-container ndp-calendar-container\" [class]=\"{'without-default-opt':hideDefaultOptions}\">\n      <div class=\"row-1\">\n        @if (!hideDefaultOptions) {\n          <div class=\"pt-custom column-1\">\n            <ng-container\n              *ngTemplateOutlet=\"dateOptionList;\n              context: {\n                $implicit: visibleOptions(),\n                dateInput: dateInput,\n              }\"\n            ></ng-container>\n          </div>\n          <div class=\"ndp-column-separator\"></div>\n        }\n        <div class=\"mt-2 column-2\"><lib-calendar [selectedDates]=\"selectedDates\" #calendar [minDate]=\"minDate\"\n            [maxDate]=\"maxDate\" (selectedDatesChange)=\"onCalendarSelectionChange($event)\"></lib-calendar></div>\n      </div>\n      <div class=\"row-2 br-top\">\n        <div class=\"footer-content ndp-footer-content\">\n          @if (enableEditableDates) {\n            <form class=\"ndp-date-inputs\" [formGroup]=\"editableForm\">\n              <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n                <mat-label>Start</mat-label>\n                <input matInput formControlName=\"start\" placeholder=\"e.g. now-7d\"\n                  (blur)=\"commitEditableDates(calendar)\"\n                  (keydown.enter)=\"applyEditableDates(dateInput, calendar)\">\n                @if (editableForm.controls.start.hasError('required')) {\n                  <mat-error>Required</mat-error>\n                } @else if (editableForm.controls.start.hasError('invalidDate')) {\n                  <mat-error>Invalid date or expression</mat-error>\n                }\n              </mat-form-field>\n              <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n                <mat-label>End</mat-label>\n                <input matInput formControlName=\"end\" placeholder=\"e.g. now\"\n                  (blur)=\"commitEditableDates(calendar)\"\n                  (keydown.enter)=\"applyEditableDates(dateInput, calendar)\">\n                @if (editableForm.controls.end.hasError('required')) {\n                  <mat-error>Required</mat-error>\n                } @else if (editableForm.controls.end.hasError('invalidDate')) {\n                  <mat-error>Invalid date or expression</mat-error>\n                } @else if (editableForm.hasError('rangeOrder')) {\n                  <mat-error>Start must be before end</mat-error>\n                }\n              </mat-form-field>\n            </form>\n          } @else {\n            <span id=\"range-label-text\" class=\"ndp-range-label-text\">\n              {{calendar?.selectedDates?.start | date: dateFormat}}\n              @if (calendar?.selectedDates?.end) {\n                <span> - {{calendar.selectedDates?.end | date: dateFormat}} </span>\n              }\n            </span>\n          }\n          <div class=\"buttons\">\n            <button mat-button mat-raised-button (click)=\"isCustomRange=false;\">Cancel</button>\n            <button mat-button mat-raised-button color=\"primary\"\n              [class.disabled]=\"enableEditableDates ? editableForm.invalid : !(calendar?.selectedDates?.start && calendar?.selectedDates?.end)\"\n              (click)=\"enableEditableDates && commitEditableDates(calendar); updateCustomRange(dateInput,calendar.selectedDates);\">&nbsp;Apply&nbsp;</button>\n          </div>\n        </div>\n      </div>\n    </div>\n  </ng-template>\n</div>\n\n<ng-template #dateOptionList let-options let-input=\"dateInput\" let-optionId=\"optionId\" let-className=\"className\">\n  <mat-action-list [ngClass]=\"className\" [id]=\"optionId\">\n    @for (option of options; track option.optionLabel) {\n      <mat-list-item [activated]=\"option.isSelected\" (click)=\"updateSelection(option, input)\">\n        {{option.optionLabel}}\n      </mat-list-item>\n    }\n  </mat-action-list>\n</ng-template>\n","import { DateRange } from '@angular/material/datepicker';\nimport { DATE_OPTION_TYPE } from '../constant/date-filter-const';\n\n/**\n * @(#)select-date-option.ts Sept 08, 2023\n *\n * Defines the structure and behavior of a selectable date option,\n * used in date filtering components.\n *\n * @author Aakash Kumar\n */\nexport interface ISelectDateOption {\n  /**\n   * Label displayed in the drop-down list for this option.\n   * Example: \"Last 7 Days\", \"Today\", \"Custom\".\n   */\n  optionLabel: string;\n\n  /**\n   * Type of the option, indicating how the date is determined.\n   * Defaults to DATE_DIFF if not provided.\n   */\n  optionType?: DATE_OPTION_TYPE;\n\n  /**\n   * Number of days offset from today.\n   *\n   * - Positive numbers indicate future dates.\n   * - Negative numbers indicate past dates.\n   * - Used only when optionType is DATE_DIFF and no callback is provided.\n   *\n   * Example: -7 → \"Last 7 Days\"\n   */\n  dateDiff?: number;\n\n  /**\n   * Whether this option is currently selected.\n   */\n  isSelected: boolean;\n\n  /**\n   * Whether this option should be shown in the drop-down list.\n   */\n  isVisible: boolean;\n\n  /**\n   * Custom function to calculate and return a DateRange.\n   * Used when optionType requires special handling beyond dateDiff.\n   */\n  callBackFunction?: () => DateRange<Date>;\n\n  /**\n   * Optional date-math/relative expression shown for the range start when\n   * editable inputs are enabled (e.g. `now-7d`). Overrides the value derived\n   * from `dateDiff`. Must be paired with {@link endExpr}.\n   */\n  startExpr?: string;\n\n  /**\n   * Optional date-math/relative expression shown for the range end when\n   * editable inputs are enabled (e.g. `now`). Must be paired with\n   * {@link startExpr}.\n   */\n  endExpr?: string;\n}\n\n/**\n * Default implementation of a selectable date option.\n * Provides default values for all fields.\n */\nexport class SelectDateOption implements ISelectDateOption {\n  optionLabel = '';\n  optionType = DATE_OPTION_TYPE.DATE_DIFF;\n  dateDiff = 0;\n  isSelected = false;\n  isVisible = false;\n  callBackFunction!: () => DateRange<Date>;\n}\n","/**\n * @(#)ng-date-picker.module.ts Sept 05, 2023\n *\n * @author Aakash Kumar\n */\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatListModule } from '@angular/material/list';\nimport { CalendarComponent } from './calendar/calendar.component';\nimport { NgDatePickerComponent } from './ng-date-picker.component';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@NgModule({\n  declarations: [NgDatePickerComponent, CalendarComponent],\n  imports: [\n    CommonModule,\n    FormsModule,\n    ReactiveFormsModule,\n    MatDatepickerModule,\n    MatNativeDateModule,\n    MatInputModule,\n    MatAutocompleteModule,\n    OverlayModule,\n    MatIconModule,\n    MatButtonModule,\n    MatListModule,\n    MatFormFieldModule,\n    MatTooltipModule,\n  ],\n  exports: [NgDatePickerComponent],\n})\nexport class NgDatePickerModule {}\n","/**\n * @(#)public-api.ts Sept 05, 2023\n *\n * @author Aakash Kumar\n */\n\n// Public API Surface of ng-date-picker\nexport * from './lib/ng-date-picker.component';\nexport * from './lib/model/select-date-option.model';\nexport * from './lib/ng-date-picker.module';\nexport * from './lib/constant/date-filter-const';\nexport * from './lib/model/date-selection-event.model';\nexport * from './lib/utils/human-date-parser';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i9.CalendarComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAIG;AACI,MAAM,oBAAoB,GAAG;IAExB;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa;AACb,IAAA,gBAAA,CAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc;AACd,IAAA,gBAAA,CAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc;AACd,IAAA,gBAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAgB;AAChB,IAAA,gBAAA,CAAA,gBAAA,C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