date-DMQDRzzu.js 13 KB

1
  1. import{aQ as F,bf as z,aB as A,bg as X}from"./index-Cd2JsgaO.js";import{p as f,c as U}from"./format-hlGAdIUH.js";const we=async()=>{const{data:e}=await F.get("/associado-partner-agreement");return e.payload},ve=async()=>{const{data:e}=await F.get("/associado/partner-agreement");return e.payload},y=[-61,9,38,199,426,686,756,818,1111,1181,1210,1635,2060,2097,2192,2262,2324,2394,2456,3178];function Se(e,t,a){return Object.prototype.toString.call(e)==="[object Date]"&&(a=e.getDate(),t=e.getMonth()+1,e=e.getFullYear()),G(O(e,t,a))}function $e(e,t,a){return _(R(e,t,a))}function J(e){return B(e)===0}function P(e,t){return t<=6?31:t<=11||J(e)?30:29}function B(e){const t=y.length;let a=y[0],n,s,r,c,o;if(e<a||e>=y[t-1])throw new Error("Invalid Jalaali year "+e);for(o=1;o<t&&(n=y[o],s=n-a,!(e<n));o+=1)a=n;return c=e-a,s-c<6&&(c=c-s+d(s+4,33)*33),r=h(h(c+1,33)-1,4),r===-1&&(r=4),r}function E(e,t){const a=y.length,n=e+621;let s=-14,r=y[0],c,o,i,g,u;if(e<r||e>=y[a-1])throw new Error("Invalid Jalaali year "+e);for(u=1;u<a&&(c=y[u],o=c-r,!(e<c));u+=1)s=s+d(o,33)*8+d(h(o,33),4),r=c;g=e-r,s=s+d(g,33)*8+d(h(g,33)+3,4),h(o,33)===4&&o-g===4&&(s+=1);const l=d(n,4)-d((d(n,100)+1)*3,4)-150,m=20+s-l;return t||(o-g<6&&(g=g-o+d(o+4,33)*33),i=h(h(g+1,33)-1,4),i===-1&&(i=4)),{leap:i,gy:n,march:m}}function R(e,t,a){const n=E(e,!0);return O(n.gy,3,n.march)+(t-1)*31-d(t,7)*(t-7)+a-1}function G(e){const t=_(e).gy;let a=t-621,n,s,r;const c=E(a,!1),o=O(t,3,c.march);if(r=e-o,r>=0){if(r<=185)return s=1+d(r,31),n=h(r,31)+1,{jy:a,jm:s,jd:n};r-=186}else a-=1,r+=179,c.leap===1&&(r+=1);return s=7+d(r,30),n=h(r,30)+1,{jy:a,jm:s,jd:n}}function O(e,t,a){let n=d((e+d(t-8,6)+100100)*1461,4)+d(153*h(t+9,12)+2,5)+a-34840408;return n=n-d(d(e+100100+d(t-8,6),100)*3,4)+752,n}function _(e){let t=4*e+139361631;t=t+d(d(4*e+183187720,146097)*3,4)*4-3908;const a=d(h(t,1461),4)*5+308,n=d(h(a,153),5)+1,s=h(d(a,153),12)+1;return{gy:d(t,1461)-100100+d(8-s,6),gm:s,gd:n}}function d(e,t){return~~(e/t)}function h(e,t){return e-~~(e/t)*t}const N=864e5,W=36e5,I=6e4,j="YYYY-MM-DDTHH:mm:ss.SSSZ",V=/\[((?:[^\]\\]|\\]|\\)*)\]|do|d{1,4}|Mo|M{1,4}|m{1,2}|wo|w{1,2}|Qo|Do|DDDo|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]/g,q=/(\[[^\]]*\])|do|d{1,4}|Mo|M{1,4}|m{1,2}|wo|w{1,2}|Qo|Do|DDDo|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]|([.*+:?^,\s${}()|\\]+)/g,$={};function K(e,t){const a="("+t.days.join("|")+")",n=e+a;if($[n]!==void 0)return $[n];const s="("+t.daysShort.join("|")+")",r="("+t.months.join("|")+")",c="("+t.monthsShort.join("|")+")",o={};let i=0;const g=e.replace(q,l=>{switch(i++,l){case"YY":return o.YY=i,"(-?\\d{1,2})";case"YYYY":return o.YYYY=i,"(-?\\d{1,4})";case"M":return o.M=i,"(\\d{1,2})";case"Mo":return o.M=i++,"(\\d{1,2}(st|nd|rd|th))";case"MM":return o.M=i,"(\\d{2})";case"MMM":return o.MMM=i,c;case"MMMM":return o.MMMM=i,r;case"D":return o.D=i,"(\\d{1,2})";case"Do":return o.D=i++,"(\\d{1,2}(st|nd|rd|th))";case"DD":return o.D=i,"(\\d{2})";case"H":return o.H=i,"(\\d{1,2})";case"HH":return o.H=i,"(\\d{2})";case"h":return o.h=i,"(\\d{1,2})";case"hh":return o.h=i,"(\\d{2})";case"m":return o.m=i,"(\\d{1,2})";case"mm":return o.m=i,"(\\d{2})";case"s":return o.s=i,"(\\d{1,2})";case"ss":return o.s=i,"(\\d{2})";case"S":return o.S=i,"(\\d{1})";case"SS":return o.S=i,"(\\d{2})";case"SSS":return o.S=i,"(\\d{3})";case"A":return o.A=i,"(AM|PM)";case"a":return o.a=i,"(am|pm)";case"aa":return o.aa=i,"(a\\.m\\.|p\\.m\\.)";case"ddd":return s;case"dddd":return a;case"Q":case"d":case"E":return"(\\d{1})";case"do":return i++,"(\\d{1}(st|nd|rd|th))";case"Qo":return"(1st|2nd|3rd|4th)";case"DDD":case"DDDD":return"(\\d{1,3})";case"DDDo":return i++,"(\\d{1,3}(st|nd|rd|th))";case"w":return"(\\d{1,2})";case"wo":return i++,"(\\d{1,2}(st|nd|rd|th))";case"ww":return"(\\d{2})";case"Z":return o.Z=i,"(Z|[+-]\\d{2}:\\d{2})";case"ZZ":return o.ZZ=i,"(Z|[+-]\\d{2}\\d{2})";case"X":return o.X=i,"(-?\\d+)";case"x":return o.x=i,"(-?\\d{4,})";default:return i--,l[0]==="["&&(l=l.substring(1,l.length-1)),l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}),u={map:o,regex:new RegExp("^"+g)};return $[n]=u,u}function C(e,t){return e!==void 0?e:t!==void 0?t.date:X.date}function Z(e,t=""){const a=e>0?"-":"+",n=Math.abs(e),s=Math.floor(n/60),r=n%60;return a+f(s)+t+f(r)}function ee(e,t,a){let n=e.getFullYear(),s=e.getMonth();const r=e.getDate();return t.year!==void 0&&(n+=a*t.year,delete t.year),t.month!==void 0&&(s+=a*t.month,delete t.month),e.setDate(1),e.setMonth(2),e.setFullYear(n),e.setMonth(s),e.setDate(Math.min(r,T(e))),t.date!==void 0&&(e.setDate(e.getDate()+a*t.date),delete t.date),e}function te(e,t,a){const n=t.year!==void 0?t.year:e[`get${a}FullYear`](),s=t.month!==void 0?t.month-1:e[`get${a}Month`](),r=new Date(n,s+1,0).getDate(),c=Math.min(r,t.date!==void 0?t.date:e[`get${a}Date`]());return e[`set${a}Date`](1),e[`set${a}Month`](2),e[`set${a}FullYear`](n),e[`set${a}Month`](s),e[`set${a}Date`](c),delete t.year,delete t.month,delete t.date,e}function x(e,t,a){const n=k(t),s=new Date(e),r=n.year!==void 0||n.month!==void 0||n.date!==void 0?ee(s,n,a):s;for(const c in n){const o=U(c);r[`set${o}`](r[`get${o}`]()+a*n[c])}return r}function k(e){const t={...e};return e.years!==void 0&&(t.year=e.years,delete t.years),e.months!==void 0&&(t.month=e.months,delete t.months),e.days!==void 0&&(t.date=e.days,delete t.days),e.day!==void 0&&(t.date=e.day,delete t.day),e.hour!==void 0&&(t.hours=e.hour,delete t.hour),e.minute!==void 0&&(t.minutes=e.minute,delete t.minute),e.second!==void 0&&(t.seconds=e.second,delete t.second),e.millisecond!==void 0&&(t.milliseconds=e.millisecond,delete t.millisecond),t}function L(e,t,a){const n=k(t),s=a===!0?"UTC":"",r=new Date(e),c=n.year!==void 0||n.month!==void 0||n.date!==void 0?te(r,n,s):r;for(const o in n){const i=o.charAt(0).toUpperCase()+o.slice(1);c[`set${s}${i}`](n[o])}return c}function ne(e,t,a){const n=re(e,t,a),s=new Date(n.year,n.month===null?null:n.month-1,n.day===null?1:n.day,n.hour,n.minute,n.second,n.millisecond),r=s.getTimezoneOffset();return n.timezoneOffset===null||n.timezoneOffset===r?s:x(s,{minutes:n.timezoneOffset-r},1)}function re(e,t,a,n,s){const r={year:null,month:null,day:null,hour:null,minute:null,second:null,millisecond:null,timezoneOffset:null,dateHash:null,timeHash:null};if(s!==void 0&&Object.assign(r,s),e==null||e===""||typeof e!="string")return r;t===void 0&&(t=j);const c=C(a,z.props),o=c.months,i=c.monthsShort,{regex:g,map:u}=K(t,c),l=e.match(g);if(l===null)return r;let m="";if(u.X!==void 0||u.x!==void 0){const M=parseInt(l[u.X!==void 0?u.X:u.x],10);if(isNaN(M)===!0||M<0)return r;const Y=new Date(M*(u.X!==void 0?1e3:1));r.year=Y.getFullYear(),r.month=Y.getMonth()+1,r.day=Y.getDate(),r.hour=Y.getHours(),r.minute=Y.getMinutes(),r.second=Y.getSeconds(),r.millisecond=Y.getMilliseconds()}else{if(u.YYYY!==void 0)r.year=parseInt(l[u.YYYY],10);else if(u.YY!==void 0){const M=parseInt(l[u.YY],10);r.year=M<0?M:2e3+M}if(u.M!==void 0){if(r.month=parseInt(l[u.M],10),r.month<1||r.month>12)return r}else u.MMM!==void 0?r.month=i.indexOf(l[u.MMM])+1:u.MMMM!==void 0&&(r.month=o.indexOf(l[u.MMMM])+1);if(u.D!==void 0){if(r.day=parseInt(l[u.D],10),r.year===null||r.month===null||r.day<1)return r;const M=n!=="persian"?new Date(r.year,r.month,0).getDate():P(r.year,r.month);if(r.day>M)return r}u.H!==void 0?r.hour=parseInt(l[u.H],10)%24:u.h!==void 0&&(r.hour=parseInt(l[u.h],10)%12,(u.A&&l[u.A]==="PM"||u.a&&l[u.a]==="pm"||u.aa&&l[u.aa]==="p.m.")&&(r.hour+=12),r.hour=r.hour%24),u.m!==void 0&&(r.minute=parseInt(l[u.m],10)%60),u.s!==void 0&&(r.second=parseInt(l[u.s],10)%60),u.S!==void 0&&(r.millisecond=parseInt(l[u.S],10)*10**(3-l[u.S].length)),(u.Z!==void 0||u.ZZ!==void 0)&&(m=u.Z!==void 0?l[u.Z].replace(":",""):l[u.ZZ],r.timezoneOffset=(m[0]==="+"?-1:1)*(60*m.slice(1,3)+1*m.slice(3,5)))}return r.dateHash=f(r.year,4)+"/"+f(r.month)+"/"+f(r.day),r.timeHash=f(r.hour)+":"+f(r.minute)+":"+f(r.second)+m,r}function ae(e){return typeof e=="number"?!0:isNaN(Date.parse(e))===!1}function se(e,t){return L(new Date,e,t)}function oe(e){const t=new Date(e).getDay();return t===0?7:t}function v(e){const t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);const a=new Date(t.getFullYear(),0,4);a.setDate(a.getDate()-(a.getDay()+6)%7+3);const n=t.getTimezoneOffset()-a.getTimezoneOffset();t.setHours(t.getHours()-n);const s=(t-a)/(N*7);return 1+Math.floor(s)}function ue(e){return e.getFullYear()*1e4+e.getMonth()*100+e.getDate()}function H(e,t){const a=new Date(e);return t===!0?ue(a):a.getTime()}function ie(e,t,a,n={}){const s=H(t,n.onlyDate),r=H(a,n.onlyDate),c=H(e,n.onlyDate);return(c>s||n.inclusiveFrom===!0&&c===s)&&(c<r||n.inclusiveTo===!0&&c===r)}function ce(e,t){return x(e,t,1)}function le(e,t){return x(e,t,-1)}function D(e,t,a){const n=new Date(e),s=`set${a===!0?"UTC":""}`;switch(t){case"year":case"years":n[`${s}Month`](0);case"month":case"months":n[`${s}Date`](1);case"day":case"days":case"date":n[`${s}Hours`](0);case"hour":case"hours":n[`${s}Minutes`](0);case"minute":case"minutes":n[`${s}Seconds`](0);case"second":case"seconds":n[`${s}Milliseconds`](0)}return n}function de(e,t,a){const n=new Date(e),s=`set${a===!0?"UTC":""}`;switch(t){case"year":case"years":n[`${s}Month`](11);case"month":case"months":n[`${s}Date`](T(n));case"day":case"days":case"date":n[`${s}Hours`](23);case"hour":case"hours":n[`${s}Minutes`](59);case"minute":case"minutes":n[`${s}Seconds`](59);case"second":case"seconds":n[`${s}Milliseconds`](999)}return n}function fe(e){let t=new Date(e);return Array.prototype.slice.call(arguments,1).forEach(a=>{t=Math.max(t,new Date(a))}),t}function he(e){let t=new Date(e);return Array.prototype.slice.call(arguments,1).forEach(a=>{t=Math.min(t,new Date(a))}),t}function w(e,t,a){return(e.getTime()-e.getTimezoneOffset()*I-(t.getTime()-t.getTimezoneOffset()*I))/a}function Q(e,t,a="days"){const n=new Date(e),s=new Date(t);switch(a){case"years":case"year":return n.getFullYear()-s.getFullYear();case"months":case"month":return(n.getFullYear()-s.getFullYear())*12+n.getMonth()-s.getMonth();case"days":case"day":case"date":return w(D(n,"day"),D(s,"day"),N);case"hours":case"hour":return w(D(n,"hour"),D(s,"hour"),W);case"minutes":case"minute":return w(D(n,"minute"),D(s,"minute"),I);case"seconds":case"second":return w(D(n,"second"),D(s,"second"),1e3)}}function S(e){return Q(e,D(e,"year"),"days")+1}function ge(e){return A(e)===!0?"date":typeof e=="number"?"number":"string"}function De(e,t,a){const n=new Date(e);if(t){const s=new Date(t);if(n<s)return s}if(a){const s=new Date(a);if(n>s)return s}return n}function Me(e,t,a){const n=new Date(e),s=new Date(t);if(a===void 0)return n.getTime()===s.getTime();switch(a){case"second":case"seconds":if(n.getSeconds()!==s.getSeconds())return!1;case"minute":case"minutes":if(n.getMinutes()!==s.getMinutes())return!1;case"hour":case"hours":if(n.getHours()!==s.getHours())return!1;case"day":case"days":case"date":if(n.getDate()!==s.getDate())return!1;case"month":case"months":if(n.getMonth()!==s.getMonth())return!1;case"year":case"years":if(n.getFullYear()!==s.getFullYear())return!1;break;default:throw new Error(`date isSameDate unknown unit ${a}`)}return!0}function T(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function p(e){if(e>=11&&e<=13)return`${e}th`;switch(e%10){case 1:return`${e}st`;case 2:return`${e}nd`;case 3:return`${e}rd`}return`${e}th`}const b={YY(e,t,a){const n=this.YYYY(e,t,a)%100;return n>=0?f(n):"-"+f(Math.abs(n))},YYYY(e,t,a){return a??e.getFullYear()},M(e){return e.getMonth()+1},Mo(e){return p(e.getMonth()+1)},MM(e){return f(e.getMonth()+1)},MMM(e,t){return t.monthsShort[e.getMonth()]},MMMM(e,t){return t.months[e.getMonth()]},Q(e){return Math.ceil((e.getMonth()+1)/3)},Qo(e){return p(this.Q(e))},D(e){return e.getDate()},Do(e){return p(e.getDate())},DD(e){return f(e.getDate())},DDD(e){return S(e)},DDDo(e){return p(S(e))},DDDD(e){return f(S(e),3)},d(e){return e.getDay()},do(e){return p(e.getDay())},dd(e,t){return t.days[e.getDay()].slice(0,2)},ddd(e,t){return t.daysShort[e.getDay()]},dddd(e,t){return t.days[e.getDay()]},E(e){return e.getDay()||7},w(e){return v(e)},wo(e){return p(v(e))},ww(e){return f(v(e))},H(e){return e.getHours()},HH(e){return f(e.getHours())},h(e){const t=e.getHours();return t===0?12:t>12?t%12:t},hh(e){return f(this.h(e))},m(e){return e.getMinutes()},mm(e){return f(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return f(e.getSeconds())},S(e){return Math.floor(e.getMilliseconds()/100)},SS(e){return f(Math.floor(e.getMilliseconds()/10))},SSS(e){return f(e.getMilliseconds(),3)},A(e){return e.getHours()<12?"AM":"PM"},a(e){return e.getHours()<12?"am":"pm"},aa(e){return e.getHours()<12?"a.m.":"p.m."},Z(e,t,a,n){const s=n??e.getTimezoneOffset();return Z(s,":")},ZZ(e,t,a,n){const s=n??e.getTimezoneOffset();return Z(s)},X(e){return Math.floor(e.getTime()/1e3)},x(e){return e.getTime()}};function ye(e,t,a,n,s){if(e!==0&&!e||e===1/0||e===-1/0)return;const r=new Date(e);if(isNaN(r))return;t===void 0&&(t=j);const c=C(a,z.props);return t.replace(V,(o,i)=>o in b?b[o](r,c,n,s):i===void 0?o:i.split("\\]").join("]"))}function me(e){return A(e)===!0?new Date(e.getTime()):e}const He={isValid:ae,extractDate:ne,buildDate:se,getDayOfWeek:oe,getWeekOfYear:v,isBetweenDates:ie,addToDate:ce,subtractFromDate:le,adjustDate:L,startOfDate:D,endOfDate:de,getMaxDate:fe,getMinDate:he,getDateDiff:Q,getDayOfYear:S,inferDateFormat:ge,getDateBetween:De,isSameDate:Me,daysInMonth:T,formatDate:ye,clone:me};export{re as _,$e as a,Q as b,ve as c,He as d,ye as f,we as g,P as j,Se as t};