UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

18 lines (17 loc) 533 B
import { FRAME_SIZES as r, WEEKEND_DAYS_SEED as m } from "../../constants.js"; import { mod as n } from "../../../../../../utils/value/number.js"; const E = (e, t) => { if (t >= e) return e; let o = Math.max(1, r.indexOf(e)); for (; --o && t < r[o]; ) ; return r[o]; }, f = (e) => r[Math.max(r.indexOf(e), 0)], c = (e = 0) => ( // [TODO]: Derive weekend days based on locale Object.freeze(m.map((t) => n(6 - e + t, 7))) ); export { E as downsizeTimeFrame, c as getWeekendDays, f as resolveTimeFrameBlockSize };