Liferay.Loader.define("dynamic-data-mapping-form-field-type@6.0.128/DatePicker/createAutoCorrectedDatePipe",["module","exports","require"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.createAutoCorrectedDatePipe=function createAutoCorrectedDatePipe(t="mm dd yyyy",{maxYear:n=9999,minYear:i=1}={}){const y=t.split(/[^dhmyHMS]+/).sort(((e,t)=>r.indexOf(e)-r.indexOf(t)));return function(r){const o=[],d={HH:23,MM:59,SS:59,dd:31,hh:12,mm:12,yy:99,yyyy:n},s={HH:0,MM:0,SS:0,dd:1,hh:1,mm:1,yy:0,yyyy:i},a=r.split("");y.forEach((e=>{const r=t.indexOf(e),n=parseInt(d[e].toString().substr(0,1),10);parseInt(a[r],10)>n&&(a[r+1]=a[r],a[r]=0,o.push(r))}));let c=0;return!y.some((y=>{const o=t.indexOf(y),a=y.length,u=r.substr(o,a).replace(/\D/g,""),m=parseInt(u,10);"mm"===y&&(c=m||0);const p="dd"===y?e[c]:d[y];if("yyyy"===y&&(1!==i||9999!==n)){const e=parseInt(d[y].toString().substring(0,u.length),10);return m<parseInt(s[y].toString().substring(0,u.length),10)||m>e}return m>p||u.length===a&&m<s[y]}))&&{indexesOfPipedChars:o,value:a.join("")}}};const e=[31,31,29,31,30,31,30,31,31,30,31,30,31],r=["yyyy","yy","mm","dd","HH","MM","SS","hh"]}}));
//# sourceMappingURL=createAutoCorrectedDatePipe.js.map