{"version":3,"file":"moveToWithinRange.mjs","sources":["../../../../src/common/dateUtils/moveToWithinRange/moveToWithinRange.ts"],"sourcesContent":["// Makes sure that date is between min and max dates, returns a cloned min or max\nexport function moveToWithinRange(date: Date, min: Date | null, max: Date | null) {\n  if (min && date < min) {\n    return new Date(min);\n  }\n  if (max && date > max) {\n    return new Date(max);\n  }\n  return date;\n}\n"],"names":["moveToWithinRange","date","min","max","Date"],"mappings":"AAAA;SACgBA,iBAAiBA,CAACC,IAAU,EAAEC,GAAgB,EAAEC,GAAgB,EAAA;AAC9E,EAAA,IAAID,GAAG,IAAID,IAAI,GAAGC,GAAG,EAAE;AACrB,IAAA,OAAO,IAAIE,IAAI,CAACF,GAAG,CAAC;AACtB,EAAA;AACA,EAAA,IAAIC,GAAG,IAAIF,IAAI,GAAGE,GAAG,EAAE;AACrB,IAAA,OAAO,IAAIC,IAAI,CAACD,GAAG,CAAC;AACtB,EAAA;AACA,EAAA,OAAOF,IAAI;AACb;;;;"}