3x-ui/web/assets/persian-datepicker/persian-datepicker.min.js

1 line
19 KiB
JavaScript
Raw Normal View History

!function(){"use strict";!function(){var t=void 0;function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e=function(t){return void 0===t},i=function(t){return"function"==typeof t},o=function(t){return"string"==typeof t},a=function(t){return JSON.parse(JSON.stringify(t))},r=function(t){if(!t||!t.constructor||t.nodeType)return!1;try{return"{}"===JSON.stringify(t)}catch(t){return!0}},s=function o(){for(var a,s,u,h,d,c=arguments.length,p=new Array(c),m=0;m<c;m++)p[m]=arguments[m];var l=p[0]||{},y=1,f=p.length,v=!1;for("boolean"==typeof l&&(v=l,l=p[y]||{},y+=1),"object"!==n(l)&&i(l)&&(l={}),y===f&&(l=t,y-=1);y<f;y++)if(a=p[y],!e(a)&&null!==a)for(var g=0;g<window.Object.keys(a).length;g++){var D=window.Object.keys(a)[g];if(Object.prototype.hasOwnProperty.call(a,D)){if(u=a[D],"__proto__"===D||l===u)return!0;h=Array.isArray(u),v&&u&&(r(u)||h)?(s=l[D],d=h&&!Array.isArray(s)?[]:h||r(s)?s:{},l[D]=o(v,d,u)):e(u)||(l[D]=u)}}return l},u=function(t,n){return window.Math.abs(t-n*window.Math.floor(t/n))},h=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,e=String(Math.abs(t)),i=e.length,o="";for(t<0&&(o+="-");i<n;)i+=1,o+="0";return o+e},d=function(t,n,e){var i=s(n,e),o=t.initDate,a=t.options.maxDate,r=t.options.minDate,u=i.year,h=i.month,d=i.day;return isNaN(u)||u<1e3||u>1999?u=o.year:u<r.year?u=r.year:u>a.year&&(u=a.year),isNaN(h)||h<1||h>12?h=o.month:u<=r.year&&h<r.month?h=r.month:u>=a.year&&h>a.month&&(h=a.month),isNaN(d)||d<1?d=o.day:h<=r.month&&d<r.day?d=r.day:h>=a.month&&d>a.day&&(d=a.day),{year:parseInt(u),month:parseInt(h),day:parseInt(d)}},c=function(t,n,e){var i=s(n,e),o=t.initTime,a=t.options.maxTime,r=t.options.minTime,u=i.hour,h=i.minute,d=i.second;return isNaN(u)||u<0||u>23?u=o.hour:u<r.hour?u=r.hour:u>a.hour&&(u=a.hour),isNaN(h)||h<0||h>59?h=o.minute:u<=r.hour&&h<r.minute?h=r.minute:u>=a.hour&&h>a.minute&&(h=a.minute),isNaN(d)||d<0||d>59?d=o.second:u<=r.hour&&h<=r.minute&&d<r.second?d=r.second:u>=a.hour&&h>=a.minute&&d>a.second&&(d=a.second),{hour:parseInt(u),minute:parseInt(h),second:parseInt(d)}},p=function(t,n,e,i){var o=t.options.minDate,a=t.options.maxDate,s=l(t,{year:n,month:e,day:i});return o=r(o)?s:l(t,{year:o.year,month:o.month,day:o.day}),s<=(a=r(a)?s:l(t,{year:a.year,month:a.month,day:a.day}))&&s>=o},m=function(t,n){var e=t.options.separatorChars,i=n.split(e.between),o=t.options.date?i[0].split(e.date):{},a=t.options.date?t.options.time&&i[1]?i[1].split(e.time):{}:i[0].split(e.time);return{year:parseInt(o[0]),month:parseInt(o[1]),day:parseInt(o[2]),hour:parseInt(a[0]),minute:parseInt(a[1]),second:parseInt(a[2])}},l=function(t,n){var e=t.options.separatorChars;return"".concat(n.year).concat(e.date).concat(h(n.month)).concat(e.date).concat(h(n.day))},y=function(t,n){if(!n)return!1;var e=n.substr(0,10).split(t.options.separatorChars.date);return 3===e.length&&4===e[0].length&&2===e[1].length&&2===e[2].length},f=function(t,n){if(!n)return!1;var e=n.substr(t.options.date?11:0,8).split(t.options.separatorChars.time);return e.length===(t.options.hasSecond?3:2)&&!e.find((function(t){return 2!==t.toString().length}))},v="jdp",g="".concat(v,"-container"),D="".concat(v,"-overlay"),w="div.".concat(v,"-years"),_="div.".concat(v,"-year"),b="div.".concat(v,"-months"),C="div.".concat(v,"-month"),T="div.".concat(v,"-days"),x="div.".concat(v,"-day"),I="div.".concat(v,"-day.not-in-month"),M="div.".concat(v,"-day.disabled-day"),S="".concat(I,".disabled-day"),A="div.".concat(v,"-day-name"),E="div.".concat(v,"-icon-plus"),O="div.".concat(v,"-icon-minus"),j="div.".concat(v,"-footer"),N="div.".concat(v,"-btn-today"),P="div.".concat(v,"-btn-empty"),V="div.".concat(v,"-btn-close"),B="div.".concat(v,"-time-container"),H="div.".concat(v,"-time"),Y="not-in-range",L="holly-day",k="".concat(v,":change"),z="click",R="focusin",J="today",W="attr",q="data-jdp-only-date",F="data-jdp-only-time",X=("data-".concat(v),"visible"),G="block",K="none",Q