System.register([],function(_export,_context){"use strict";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function n(n,r){if(!n)return null;var u=r.match(/[^A-Z]/i);if(!u)return null;var t=u[0];if(!n.includes(t))return null;var l=n.split(t),e=r.split(t);var i=null,f=null,Y=null;for(var _n=0;_n<e.length;_n++){var _r=e[_n],_u=l[_n];if(!_u)return null;if("DD"===_r){if(2!==_u.length)return null;i=Number(_u);}if("MM"===_r){if(2!==_u.length)return null;f=Number(_u)-1;}if("YYYY"===_r){if(4!==_u.length)return null;Y=Number(_u);}}if(null==i||null==f||null==Y)return null;var s=new Date(Y,f,i);return s.getFullYear()!==Y||s.getMonth()!==f||s.getDate()!==i?null:s;}function r(n,r){if(!n)return"";var u=String(n.getDate()).padStart(2,"0"),t=String(n.getMonth()+1).padStart(2,"0"),l=n.getFullYear();switch(r){case"DD/MM/YYYY":default:return"".concat(u,"/").concat(t,"/").concat(l);case"MM/DD/YYYY":return"".concat(t,"/").concat(u,"/").concat(l);case"YYYY/MM/DD":return"".concat(l,"/").concat(t,"/").concat(u);case"YYYY.MM.DD":return"".concat(l,".").concat(t,".").concat(u);case"DD.MM.YYYY":return"".concat(u,".").concat(t,".").concat(l);}}function u(r,u,t,l){if(!t)return{first:n(r,u),second:null};if(!r.includes(l))return{first:n(r,u),second:null};var _r$split=r.split(l),_r$split2=_slicedToArray(_r$split,2),e=_r$split2[0],i=_r$split2[1];return{first:n(e,u),second:i?n(i,u):null};}function t(n,r){return n&&r&&n.getTime()>r.getTime()?[r,n]:[n,r];}_export({f:r,n:t,p:u});return{setters:[],execute:function execute(){}};});
//# sourceMappingURL=nile-date-picker-utils.cjs.js.map
