UNPKG

@progress/kendo-vue-dateinputs

Version:
37 lines (36 loc) 1.46 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ const y = "d", _ = "wide", M = (e, h, u, f) => { const l = e[f + e.length - u.length], s = e.substring(0, f + e.length - u.length), n = u.substring(0, f), b = []; if (s === n && f > 0) return b.push([h[f - 1], n[f - 1]]), b; if (s.indexOf(n) === 0 && (n.length === 0 || h[n.length - 1] !== h[n.length])) { let p = ""; n.length === 1 && b.push([h[0], n[0]]); for (let g = n.length; g < s.length; g++) h[g] !== p && h[g] !== "_" && (p = h[g], b.push([p, ""])); return b; } if (n.indexOf(s) === 0 || h[f - 1] === "_") { let p = h[0]; for (let g = Math.max(0, s.length - 1); g < h.length; g++) if (h[g] !== "_") { p = h[g]; break; } return [[p, n[f - 1]]]; } return n[n.length - 1] === " " || n[n.length - 1] === l ? [[h[f - 1], "_"]] : [[h[f - 1], n[f - 1]]]; }, t = (e, h) => (e[h.pattern[0]] = h.type, e), x = (e, h, u) => e === null || !(h && h > e || u && u < e); export { M as approximateStringMatching, t as dateSymbolMap, y as defaultFormat, _ as defaultFormatPlaceholder, x as isInRange };