diff --git a/ui/dist/assets/index-D0F7NB_8.js b/ui/dist/assets/index-DipHpsma.js similarity index 99% rename from ui/dist/assets/index-D0F7NB_8.js rename to ui/dist/assets/index-DipHpsma.js index d19ad202..d543c8e9 100644 --- a/ui/dist/assets/index-D0F7NB_8.js +++ b/ui/dist/assets/index-DipHpsma.js @@ -304,7 +304,7 @@ var dj;function xe(){return dj.apply(null,arguments)}function p4(e){dj=e}functio [`+o+"] ";for(i in arguments[0])dt(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];r.push(s)}hj(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Cb={};function mj(e,t){xe.deprecationHandler!=null&&xe.deprecationHandler(e,t),Cb[e]||(hj(t),Cb[e]=!0)}xe.suppressDeprecationWarnings=!1;xe.deprecationHandler=null;function as(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function y4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],as(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Cg(e,t){var n=fo({},e),r;for(r in t)dt(t,r)&&(ri(e[r])&&ri(t[r])?(n[r]={},fo(n[r],e[r]),fo(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&ri(e[r])&&(n[r]=fo({},n[r]));return n}function Jv(e){e!=null&&this.set(e)}var jg;Object.keys?jg=Object.keys:jg=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var v4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function x4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return as(r)?r.call(t,n):r}function rs(e,t,n){var r=""+Math.abs(e),s=t-r.length,o=e>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var ex=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ju=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,tp={},_a={};function Le(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(_a[e]=s),t&&(_a[t[0]]=function(){return rs(s.apply(this,arguments),t[1],t[2])}),n&&(_a[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function w4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function b4(e){var t=e.match(ex),n,r;for(n=0,r=t.length;n=0&&Ju.test(e);)e=e.replace(Ju,r),Ju.lastIndex=0,n-=1;return e}var _4={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function S4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ex).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var k4="Invalid date";function C4(){return this._invalidDate}var j4="%d",E4=/\d{1,2}/;function N4(e){return this._ordinal.replace("%d",e)}var T4={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function P4(e,t,n,r){var s=this._relativeTime[n];return as(s)?s(e,t,n,r):s.replace(/%d/i,e)}function R4(e,t){var n=this._relativeTime[e>0?"future":"past"];return as(n)?n(t):n.replace(/%s/i,t)}var jb={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function pr(e){return typeof e=="string"?jb[e]||jb[e.toLowerCase()]:void 0}function tx(e){var t={},n,r;for(r in e)dt(e,r)&&(n=pr(r),n&&(t[n]=e[r]));return t}var A4={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function D4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:A4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var gj=/\d/,tr=/\d\d/,yj=/\d{3}/,nx=/\d{4}/,Sh=/[+-]?\d{6}/,jt=/\d\d?/,vj=/\d\d\d\d?/,xj=/\d\d\d\d\d\d?/,kh=/\d{1,3}/,rx=/\d{1,4}/,Ch=/[+-]?\d{1,6}/,sl=/\d+/,jh=/[+-]?\d+/,O4=/Z|[+-]\d\d:?\d\d/gi,Eh=/Z|[+-]\d\d(?::?\d\d)?/gi,I4=/[+-]?\d+(\.\d{1,3})?/,fu=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ol=/^[1-9]\d?/,sx=/^([1-9]\d|\d)/,uf;uf={};function Ee(e,t,n){uf[e]=as(t)?t:function(r,s){return r&&n?n:t}}function M4(e,t){return dt(uf,e)?uf[e](t._strict,t._locale):new RegExp(L4(e))}function L4(e){return Ps(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,o){return n||r||s||o}))}function Ps(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ir(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=ir(t)),n}var Eg={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Fs(t)&&(r=function(o,i){i[t]=rt(o)}),s=e.length,n=0;n68?1900:2e3)};var wj=il("FullYear",!0);function U4(){return Nh(this.year())}function il(e,t){return function(n){return n!=null?(bj(this,e,n),xe.updateOffset(this,t),this):Ec(this,e)}}function Ec(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function bj(e,t,n){var r,s,o,i,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}o=n,i=e.month(),a=e.date(),a=a===29&&i===1&&!Nh(o)?28:a,s?r.setUTCFullYear(o,i,a):r.setFullYear(o,i,a)}}function V4(e){return e=pr(e),as(this[e])?this[e]():this}function B4(e,t){if(typeof e=="object"){e=tx(e);var n=D4(e),r,s=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,s,o,i),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,o,i),a}function Nc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function df(e,t,n){var r=7+t-n,s=(7+Nc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function Ej(e,t,n,r,s){var o=(7+n-r)%7,i=df(e,r,s),a=1+7*(t-1)+o+i,c,u;return a<=0?(c=e-1,u=Ql(c)+a):a>Ql(e)?(c=e+1,u=a-Ql(e)):(c=e,u=a),{year:c,dayOfYear:u}}function Tc(e,t,n){var r=df(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+Rs(i,t,n)):s>Rs(e.year(),t,n)?(o=s-Rs(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function Rs(e,t,n){var r=df(e,t,n),s=df(e+1,t,n);return(Ql(e)-r+s)/7}Le("w",["ww",2],"wo","week");Le("W",["WW",2],"Wo","isoWeek");Ee("w",jt,ol);Ee("ww",jt,tr);Ee("W",jt,ol);Ee("WW",jt,tr);hu(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=rt(e)});function n3(e){return Tc(e,this._week.dow,this._week.doy).week}var r3={dow:0,doy:6};function s3(){return this._week.dow}function o3(){return this._week.doy}function i3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function a3(e){var t=Tc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Le("d",0,"do","day");Le("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Le("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Le("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Le("e",0,0,"weekday");Le("E",0,0,"isoWeekday");Ee("d",jt);Ee("e",jt);Ee("E",jt);Ee("dd",function(e,t){return t.weekdaysMinRegex(e)});Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ee("dddd",function(e,t){return t.weekdaysRegex(e)});hu(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Qe(n).invalidWeekday=e});hu(["d","e","E"],function(e,t,n,r){t[r]=rt(e)});function l3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function c3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ix(e,t){return e.slice(t,7).concat(e.slice(0,t))}var u3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Nj="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),d3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),f3=fu,h3=fu,m3=fu;function p3(e,t){var n=Dr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ix(n,this._week.dow):e?n[e.day()]:n}function g3(e){return e===!0?ix(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function y3(e){return e===!0?ix(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function v3(e,t,n){var r,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=is([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=$t.call(this._weekdaysParse,i),s!==-1||(s=$t.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=$t.call(this._shortWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=$t.call(this._minWeekdaysParse,i),s!==-1||(s=$t.call(this._weekdaysParse,i),s!==-1)?s:(s=$t.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function x3(e,t,n){var r,s,o;if(this._weekdaysParseExact)return v3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=is([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function w3(e){if(!this.isValid())return e!=null?this:NaN;var t=Ec(this,"Day");return e!=null?(e=l3(e,this.localeData()),this.add(e-t,"d")):t}function b3(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function _3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=c3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function S3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=f3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function k3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=h3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function C3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||ax.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=m3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ax(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],o,i,a,c,u;for(o=0;o<7;o++)i=is([2e3,1]).day(o),a=Ps(this.weekdaysMin(i,"")),c=Ps(this.weekdaysShort(i,"")),u=Ps(this.weekdays(i,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function lx(){return this.hours()%12||12}function j3(){return this.hours()||24}Le("H",["HH",2],0,"hour");Le("h",["hh",2],0,lx);Le("k",["kk",2],0,j3);Le("hmm",0,0,function(){return""+lx.apply(this)+rs(this.minutes(),2)});Le("hmmss",0,0,function(){return""+lx.apply(this)+rs(this.minutes(),2)+rs(this.seconds(),2)});Le("Hmm",0,0,function(){return""+this.hours()+rs(this.minutes(),2)});Le("Hmmss",0,0,function(){return""+this.hours()+rs(this.minutes(),2)+rs(this.seconds(),2)});function Tj(e,t){Le(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Tj("a",!0);Tj("A",!1);function Pj(e,t){return t._meridiemParse}Ee("a",Pj);Ee("A",Pj);Ee("H",jt,sx);Ee("h",jt,ol);Ee("k",jt,ol);Ee("HH",jt,tr);Ee("hh",jt,tr);Ee("kk",jt,tr);Ee("hmm",vj);Ee("hmmss",xj);Ee("Hmm",vj);Ee("Hmmss",xj);vt(["H","HH"],Xt);vt(["k","kk"],function(e,t,n){var r=rt(e);t[Xt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[Xt]=rt(e),Qe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r)),Qe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s)),Qe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[Xt]=rt(e.substr(0,r)),t[Cr]=rt(e.substr(r,2)),t[Es]=rt(e.substr(s))});function E3(e){return(e+"").toLowerCase().charAt(0)==="p"}var N3=/[ap]\.?m?\.?/i,T3=il("Hours",!0);function P3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Rj={calendar:v4,longDateFormat:_4,invalidDate:k4,ordinal:j4,dayOfMonthOrdinalParse:E4,relativeTime:T4,months:H4,monthsShort:_j,week:r3,weekdays:u3,weekdaysMin:d3,weekdaysShort:Nj,meridiemParse:N3},Tt={},Cl={},Pc;function R3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=Th(o.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&R3(o,r)>=n-1)break;n--}t++}return Pc}function D3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Th(e){var t=null,n;if(Tt[e]===void 0&&typeof Nd<"u"&&Nd&&Nd.exports&&D3(e))try{t=Pc._abbr,n=require,n("./locale/"+e),So(t)}catch{Tt[e]=null}return Tt[e]}function So(e,t){var n;return e&&(Tn(t)?n=Ks(e):n=cx(e,t),n?Pc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Pc._abbr}function cx(e,t){if(t!==null){var n,r=Rj;if(t.abbr=e,Tt[e]!=null)mj("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=Th(t.parentLocale),n!=null)r=n._config;else return Cl[t.parentLocale]||(Cl[t.parentLocale]=[]),Cl[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new Jv(Cg(r,t)),Cl[e]&&Cl[e].forEach(function(s){cx(s.name,s.config)}),So(e),Tt[e]}else return delete Tt[e],null}function O3(e,t){if(t!=null){var n,r,s=Rj;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Cg(Tt[e]._config,t)):(r=Th(e),r!=null&&(s=r._config),t=Cg(s,t),r==null&&(t.abbr=e),n=new Jv(t),n.parentLocale=Tt[e],Tt[e]=n),So(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===So()&&So(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function Ks(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Pc;if(!Dr(e)){if(t=Th(e),t)return t;e=[e]}return A3(e)}function I3(){return jg(Tt)}function ux(e){var t,n=e._a;return n&&Qe(e).overflow===-2&&(t=n[js]<0||n[js]>11?js:n[Yr]<1||n[Yr]>ox(n[gn],n[js])?Yr:n[Xt]<0||n[Xt]>24||n[Xt]===24&&(n[Cr]!==0||n[Es]!==0||n[Xo]!==0)?Xt:n[Cr]<0||n[Cr]>59?Cr:n[Es]<0||n[Es]>59?Es:n[Xo]<0||n[Xo]>999?Xo:-1,Qe(e)._overflowDayOfYear&&(tYr)&&(t=Yr),Qe(e)._overflowWeeks&&t===-1&&(t=F4),Qe(e)._overflowWeekday&&t===-1&&(t=$4),Qe(e).overflow=t),e}var M3=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,L3=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,z3=/Z|[+-]\d\d(?::?\d\d)?/,ed=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],np=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],F3=/^\/?Date\((-?\d+)/i,$3=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,U3={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Aj(e){var t,n,r=e._i,s=M3.exec(r)||L3.exec(r),o,i,a,c,u=ed.length,d=np.length;if(s){for(Qe(e).iso=!0,t=0,n=u;tQl(i)||e._dayOfYear===0)&&(Qe(e)._overflowDayOfYear=!0),n=Nc(i,0,e._dayOfYear),e._a[js]=n.getUTCMonth(),e._a[Yr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Xt]===24&&e._a[Cr]===0&&e._a[Es]===0&&e._a[Xo]===0&&(e._nextDay=!0,e._a[Xt]=0),e._d=(e._useUTC?Nc:t3).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(Qe(e).weekdayMismatch=!0)}}function Z3(e){var t,n,r,s,o,i,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,n=Yi(t.GG,e._a[gn],Tc(Ct(),1,4).year),r=Yi(t.W,1),s=Yi(t.E,1),(s<1||s>7)&&(c=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,u=Tc(Ct(),o,i),n=Yi(t.gg,e._a[gn],u.year),r=Yi(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(c=!0)):s=o),r<1||r>Rs(n,o,i)?Qe(e)._overflowWeeks=!0:c!=null?Qe(e)._overflowWeekday=!0:(a=Ej(n,r,s,o,i),e._a[gn]=a.year,e._dayOfYear=a.dayOfYear)}xe.ISO_8601=function(){};xe.RFC_2822=function(){};function fx(e){if(e._f===xe.ISO_8601){Aj(e);return}if(e._f===xe.RFC_2822){Dj(e);return}e._a=[],Qe(e).empty=!0;var t=""+e._i,n,r,s,o,i,a=t.length,c=0,u,d;for(s=pj(e._f,e._locale).match(ex)||[],d=s.length,n=0;n0&&Qe(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),_a[o]?(r?Qe(e).empty=!1:Qe(e).unusedTokens.push(o),z4(o,r,e)):e._strict&&!r&&Qe(e).unusedTokens.push(o);Qe(e).charsLeftOver=a-c,t.length>0&&Qe(e).unusedInput.push(t),e._a[Xt]<=12&&Qe(e).bigHour===!0&&e._a[Xt]>0&&(Qe(e).bigHour=void 0),Qe(e).parsedDateParts=e._a.slice(0),Qe(e).meridiem=e._meridiem,e._a[Xt]=q3(e._locale,e._a[Xt],e._meridiem),u=Qe(e).era,u!==null&&(e._a[gn]=e._locale.erasConvertYear(u,e._a[gn])),dx(e),ux(e)}function q3(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function X3(e){var t,n,r,s,o,i,a=!1,c=e._f.length;if(c===0){Qe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:_h()});function Mj(e,t){var n,r;if(t.length===1&&Dr(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function v5(){if(!Tn(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Qv(e,this),e=Oj(e),e._a?(t=e._isUTC?is(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&c5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function x5(){return this.isValid()?!this._isUTC:!1}function w5(){return this.isValid()?this._isUTC:!1}function zj(){return this.isValid()?this._isUTC&&this._offset===0:!1}var b5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,_5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zr(e,t){var n=e,r=null,s,o,i;return Sd(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Fs(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=b5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:rt(r[Yr])*s,h:rt(r[Xt])*s,m:rt(r[Cr])*s,s:rt(r[Es])*s,ms:rt(Ng(r[Xo]*1e3))*s}):(r=_5.exec(e))?(s=r[1]==="-"?-1:1,n={y:$o(r[2],s),M:$o(r[3],s),w:$o(r[4],s),d:$o(r[5],s),h:$o(r[6],s),m:$o(r[7],s),s:$o(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=S5(Ct(n.from),Ct(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),o=new Ph(n),Sd(e)&&dt(e,"_locale")&&(o._locale=e._locale),Sd(e)&&dt(e,"_isValid")&&(o._isValid=e._isValid),o}zr.fn=Ph.prototype;zr.invalid=l5;function $o(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Nb(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function S5(e,t){var n;return e.isValid()&&t.isValid()?(t=mx(t,e),e.isBefore(t)?n=Nb(e,t):(n=Nb(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Fj(e,t){return function(n,r){var s,o;return r!==null&&!isNaN(+r)&&(mj(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),s=zr(n,r),$j(this,s,e),this}}function $j(e,t,n,r){var s=t._milliseconds,o=Ng(t._days),i=Ng(t._months);e.isValid()&&(r=r??!0,i&&kj(e,Ec(e,"Month")+i*n),o&&bj(e,"Date",Ec(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&xe.updateOffset(e,o||i))}var k5=Fj(1,"add"),C5=Fj(-1,"subtract");function Uj(e){return typeof e=="string"||e instanceof String}function j5(e){return Or(e)||uu(e)||Uj(e)||Fs(e)||N5(e)||E5(e)||e===null||e===void 0}function E5(e){var t=ri(e)&&!qv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=r.length;for(s=0;sn.valueOf():n.valueOf()9999?_d(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):as(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_d(n,"Z")):_d(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function V5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(n+r+s+o)}function B5(e){e||(e=this.isUtc()?xe.defaultFormatUtc:xe.defaultFormat);var t=_d(this,e);return this.localeData().postformat(t)}function W5(e,t){return this.isValid()&&(Or(e)&&e.isValid()||Ct(e).isValid())?zr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function H5(e){return this.from(Ct(),e)}function Y5(e,t){return this.isValid()&&(Or(e)&&e.isValid()||Ct(e).isValid())?zr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function K5(e){return this.to(Ct(),e)}function Vj(e){var t;return e===void 0?this._locale._abbr:(t=Ks(e),t!=null&&(this._locale=t),this)}var Bj=mr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Wj(){return this._locale}var ff=1e3,Sa=60*ff,hf=60*Sa,Hj=(365*400+97)*24*hf;function ka(e,t){return(e%t+t)%t}function Yj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Hj:new Date(e,t,n).valueOf()}function Kj(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Hj:Date.UTC(e,t,n)}function G5(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kj:Yj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ka(t+(this._isUTC?0:this.utcOffset()*Sa),hf);break;case"minute":t=this._d.valueOf(),t-=ka(t,Sa);break;case"second":t=this._d.valueOf(),t-=ka(t,ff);break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function Z5(e){var t,n;if(e=pr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Kj:Yj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hf-ka(t+(this._isUTC?0:this.utcOffset()*Sa),hf)-1;break;case"minute":t=this._d.valueOf(),t+=Sa-ka(t,Sa)-1;break;case"second":t=this._d.valueOf(),t+=ff-ka(t,ff)-1;break}return this._d.setTime(t),xe.updateOffset(this,!0),this}function q5(){return this._d.valueOf()-(this._offset||0)*6e4}function X5(){return Math.floor(this.valueOf()/1e3)}function Q5(){return new Date(this.valueOf())}function J5(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function e6(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function t6(){return this.isValid()?this.toISOString():null}function n6(){return Xv(this)}function r6(){return fo({},Qe(this))}function s6(){return Qe(this).overflow}function o6(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Le("N",0,0,"eraAbbr");Le("NN",0,0,"eraAbbr");Le("NNN",0,0,"eraAbbr");Le("NNNN",0,0,"eraName");Le("NNNNN",0,0,"eraNarrow");Le("y",["y",1],"yo","eraYear");Le("y",["yy",2],0,"eraYear");Le("y",["yyy",3],0,"eraYear");Le("y",["yyyy",4],0,"eraYear");Ee("N",px);Ee("NN",px);Ee("NNN",px);Ee("NNNN",g6);Ee("NNNNN",y6);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Qe(n).era=s:Qe(n).invalidEra=e});Ee("y",sl);Ee("yy",sl);Ee("yyy",sl);Ee("yyyy",sl);Ee("yo",v6);vt(["y","yy","yyy","yyyy"],gn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[gn]=n._locale.eraYearOrdinalParse(e,s):t[gn]=parseInt(e,10)});function i6(e,t){var n,r,s,o=this._eras||Ks("en")._eras;for(n=0,r=o.length;n=0)return o[r]}function l6(e,t){var n=e.since<=e.until?1:-1;return t===void 0?xe(e.since).year():xe(e.since).year()+(t-e.offset)*n}function c6(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;eo&&(t=o),C6.call(this,e,t,n,r,s))}function C6(e,t,n,r,s){var o=Ej(e,t,n,r,s),i=Nc(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}Le("Q",0,"Qo","quarter");Ee("Q",gj);vt("Q",function(e,t){t[js]=(rt(e)-1)*3});function j6(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Le("D",["DD",2],"Do","date");Ee("D",jt,ol);Ee("DD",jt,tr);Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Yr);vt("Do",function(e,t){t[Yr]=rt(e.match(jt)[0])});var Zj=il("Date",!0);Le("DDD",["DDDD",3],"DDDo","dayOfYear");Ee("DDD",kh);Ee("DDDD",yj);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=rt(e)});function E6(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Le("m",["mm",2],0,"minute");Ee("m",jt,sx);Ee("mm",jt,tr);vt(["m","mm"],Cr);var N6=il("Minutes",!1);Le("s",["ss",2],0,"second");Ee("s",jt,sx);Ee("ss",jt,tr);vt(["s","ss"],Es);var T6=il("Seconds",!1);Le("S",0,0,function(){return~~(this.millisecond()/100)});Le(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Le(0,["SSS",3],0,"millisecond");Le(0,["SSSS",4],0,function(){return this.millisecond()*10});Le(0,["SSSSS",5],0,function(){return this.millisecond()*100});Le(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Le(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Le(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Le(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ee("S",kh,gj);Ee("SS",kh,tr);Ee("SSS",kh,yj);var ho,qj;for(ho="SSSS";ho.length<=9;ho+="S")Ee(ho,sl);function P6(e,t){t[Xo]=rt(("0."+e)*1e3)}for(ho="S";ho.length<=9;ho+="S")vt(ho,P6);qj=il("Milliseconds",!1);Le("z",0,0,"zoneAbbr");Le("zz",0,0,"zoneName");function R6(){return this._isUTC?"UTC":""}function A6(){return this._isUTC?"Coordinated Universal Time":""}var le=du.prototype;le.add=k5;le.calendar=R5;le.clone=A5;le.diff=F5;le.endOf=Z5;le.format=B5;le.from=W5;le.fromNow=H5;le.to=Y5;le.toNow=K5;le.get=V4;le.invalidAt=s6;le.isAfter=D5;le.isBefore=O5;le.isBetween=I5;le.isSame=M5;le.isSameOrAfter=L5;le.isSameOrBefore=z5;le.isValid=n6;le.lang=Bj;le.locale=Vj;le.localeData=Wj;le.max=n5;le.min=t5;le.parsingFlags=r6;le.set=B4;le.startOf=G5;le.subtract=C5;le.toArray=J5;le.toObject=e6;le.toDate=Q5;le.toISOString=U5;le.inspect=V5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=t6;le.toString=$5;le.unix=X5;le.valueOf=q5;le.creationData=o6;le.eraName=c6;le.eraNarrow=u6;le.eraAbbr=d6;le.eraYear=f6;le.year=wj;le.isLeapYear=U4;le.weekYear=x6;le.isoWeekYear=w6;le.quarter=le.quarters=j6;le.month=Cj;le.daysInMonth=Q4;le.week=le.weeks=i3;le.isoWeek=le.isoWeeks=a3;le.weeksInYear=S6;le.weeksInWeekYear=k6;le.isoWeeksInYear=b6;le.isoWeeksInISOWeekYear=_6;le.date=Zj;le.day=le.days=w3;le.weekday=b3;le.isoWeekday=_3;le.dayOfYear=E6;le.hour=le.hours=T3;le.minute=le.minutes=N6;le.second=le.seconds=T6;le.millisecond=le.milliseconds=qj;le.utcOffset=d5;le.utc=h5;le.local=m5;le.parseZone=p5;le.hasAlignedHourOffset=g5;le.isDST=y5;le.isLocal=x5;le.isUtcOffset=w5;le.isUtc=zj;le.isUTC=zj;le.zoneAbbr=R6;le.zoneName=A6;le.dates=mr("dates accessor is deprecated. Use date instead.",Zj);le.months=mr("months accessor is deprecated. Use month instead",Cj);le.years=mr("years accessor is deprecated. Use year instead",wj);le.zone=mr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",f5);le.isDSTShifted=mr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",v5);function D6(e){return Ct(e*1e3)}function O6(){return Ct.apply(null,arguments).parseZone()}function Xj(e){return e}var ft=Jv.prototype;ft.calendar=x4;ft.longDateFormat=S4;ft.invalidDate=C4;ft.ordinal=N4;ft.preparse=Xj;ft.postformat=Xj;ft.relativeTime=P4;ft.pastFuture=R4;ft.set=y4;ft.eras=i6;ft.erasParse=a6;ft.erasConvertYear=l6;ft.erasAbbrRegex=m6;ft.erasNameRegex=h6;ft.erasNarrowRegex=p6;ft.months=G4;ft.monthsShort=Z4;ft.monthsParse=X4;ft.monthsRegex=e3;ft.monthsShortRegex=J4;ft.week=n3;ft.firstDayOfYear=o3;ft.firstDayOfWeek=s3;ft.weekdays=p3;ft.weekdaysMin=y3;ft.weekdaysShort=g3;ft.weekdaysParse=x3;ft.weekdaysRegex=S3;ft.weekdaysShortRegex=k3;ft.weekdaysMinRegex=C3;ft.isPM=E3;ft.meridiem=P3;function mf(e,t,n,r){var s=Ks(),o=is().set(r,t);return s[n](o,e)}function Qj(e,t,n){if(Fs(e)&&(t=e,e=void 0),e=e||"",t!=null)return mf(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=mf(e,r,n,"month");return s}function yx(e,t,n,r){typeof e=="boolean"?(Fs(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Fs(t)&&(n=t,t=void 0),t=t||"");var s=Ks(),o=e?s._week.dow:0,i,a=[];if(n!=null)return mf(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=mf(t,(i+o)%7,r,"day");return a}function I6(e,t){return Qj(e,t,"months")}function M6(e,t){return Qj(e,t,"monthsShort")}function L6(e,t,n){return yx(e,t,n,"weekdays")}function z6(e,t,n){return yx(e,t,n,"weekdaysShort")}function F6(e,t,n){return yx(e,t,n,"weekdaysMin")}So("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=rt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});xe.lang=mr("moment.lang is deprecated. Use moment.locale instead.",So);xe.langData=mr("moment.langData is deprecated. Use moment.localeData instead.",Ks);var ys=Math.abs;function $6(){var e=this._data;return this._milliseconds=ys(this._milliseconds),this._days=ys(this._days),this._months=ys(this._months),e.milliseconds=ys(e.milliseconds),e.seconds=ys(e.seconds),e.minutes=ys(e.minutes),e.hours=ys(e.hours),e.months=ys(e.months),e.years=ys(e.years),this}function Jj(e,t,n,r){var s=zr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function U6(e,t){return Jj(this,e,t,1)}function V6(e,t){return Jj(this,e,t,-1)}function Tb(e){return e<0?Math.floor(e):Math.ceil(e)}function B6(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,o,i,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Tb(Pg(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=ir(e/1e3),r.seconds=s%60,o=ir(s/60),r.minutes=o%60,i=ir(o/60),r.hours=i%24,t+=ir(i/24),c=ir(eE(t)),n+=c,t-=Tb(Pg(c)),a=ir(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function eE(e){return e*4800/146097}function Pg(e){return e*146097/4800}function W6(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=pr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+eE(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Pg(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Gs(e){return function(){return this.as(e)}}var tE=Gs("ms"),H6=Gs("s"),Y6=Gs("m"),K6=Gs("h"),G6=Gs("d"),Z6=Gs("w"),q6=Gs("M"),X6=Gs("Q"),Q6=Gs("y"),J6=tE;function e$(){return zr(this)}function t$(e){return e=pr(e),this.isValid()?this[e+"s"]():NaN}function Ni(e){return function(){return this.isValid()?this._data[e]:NaN}}var n$=Ni("milliseconds"),r$=Ni("seconds"),s$=Ni("minutes"),o$=Ni("hours"),i$=Ni("days"),a$=Ni("months"),l$=Ni("years");function c$(){return ir(this.days()/7)}var bs=Math.round,ca={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function u$(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function d$(e,t,n,r){var s=zr(e).abs(),o=bs(s.as("s")),i=bs(s.as("m")),a=bs(s.as("h")),c=bs(s.as("d")),u=bs(s.as("M")),d=bs(s.as("w")),f=bs(s.as("y")),h=o<=n.ss&&["s",o]||o0,h[4]=r,u$.apply(null,h)}function f$(e){return e===void 0?bs:typeof e=="function"?(bs=e,!0):!1}function h$(e,t){return ca[e]===void 0?!1:t===void 0?ca[e]:(ca[e]=t,e==="s"&&(ca.ss=t-1),!0)}function m$(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ca,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ca,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),o=d$(this,!n,r,s),n&&(o=s.pastFuture(+this,o)),s.postformat(o)}var rp=Math.abs;function Vi(e){return(e>0)-(e<0)||+e}function Ah(){if(!this.isValid())return this.localeData().invalidDate();var e=rp(this._milliseconds)/1e3,t=rp(this._days),n=rp(this._months),r,s,o,i,a=this.asSeconds(),c,u,d,f;return a?(r=ir(e/60),s=ir(r/60),e%=60,r%=60,o=ir(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Vi(this._months)!==Vi(a)?"-":"",d=Vi(this._days)!==Vi(a)?"-":"",f=Vi(this._milliseconds)!==Vi(a)?"-":"",c+"P"+(o?u+o+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var at=Ph.prototype;at.isValid=a5;at.abs=$6;at.add=U6;at.subtract=V6;at.as=W6;at.asMilliseconds=tE;at.asSeconds=H6;at.asMinutes=Y6;at.asHours=K6;at.asDays=G6;at.asWeeks=Z6;at.asMonths=q6;at.asQuarters=X6;at.asYears=Q6;at.valueOf=J6;at._bubble=B6;at.clone=e$;at.get=t$;at.milliseconds=n$;at.seconds=r$;at.minutes=s$;at.hours=o$;at.days=i$;at.weeks=c$;at.months=a$;at.years=l$;at.humanize=m$;at.toISOString=Ah;at.toString=Ah;at.toJSON=Ah;at.locale=Vj;at.localeData=Wj;at.toIsoString=mr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ah);at.lang=Bj;Le("X",0,0,"unix");Le("x",0,0,"valueOf");Ee("x",jh);Ee("X",I4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(rt(e))});//! moment.js -xe.version="2.30.1";p4(Ct);xe.fn=le;xe.min=r5;xe.max=s5;xe.now=o5;xe.utc=is;xe.unix=D6;xe.months=I6;xe.isDate=uu;xe.locale=So;xe.invalid=_h;xe.duration=zr;xe.isMoment=Or;xe.weekdays=L6;xe.parseZone=O6;xe.localeData=Ks;xe.isDuration=Sd;xe.monthsShort=M6;xe.weekdaysMin=F6;xe.defineLocale=cx;xe.updateLocale=O3;xe.locales=I3;xe.weekdaysShort=z6;xe.normalizeUnits=pr;xe.relativeTimeRounding=f$;xe.relativeTimeThreshold=h$;xe.calendarFormat=P5;xe.prototype=le;xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const p$=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),ls=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),g$=async e=>(e.deleted=xe.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Pb=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),y$=async e=>{const t=ot();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},v$=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Rb=async e=>await ot().collection("access_groups").update(e.id,e),x$=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},w$=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},vx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},al=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},nE=g.createContext({}),cn=()=>g.useContext(nE),b$=({children:e})=>{const[t,n]=g.useReducer(x$,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});g.useEffect(()=>{(async()=>{const d=await p$();n({type:"SET_ACCESSES",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await w$();n({type:"SET_EMAILS",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await Pb();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=g.useCallback(async()=>{const u=await Pb();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=g.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=g.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=g.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=g.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=g.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(nE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},_$={theme:"system",setTheme:()=>null},rE=g.createContext(_$);function S$({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=g.useState(()=>localStorage.getItem(n)||t);g.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(rE.Provider,{...r,value:i,children:e})}const k$=()=>{const e=g.useContext(rE);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function C$(){const{setTheme:e}=k$(),{t}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(WO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(UO,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ni,{onClick:()=>e("light"),children:t("common.theme.light")}),l.jsx(ni,{onClick:()=>e("dark"),children:t("common.theme.dark")}),l.jsx(ni,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}function j$(){const{i18n:e}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(LO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(xh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ni,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var E$="Separator",Ab="horizontal",N$=["horizontal","vertical"],sE=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ab,...s}=e,o=T$(r)?r:Ab,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Pe.div,{"data-orientation":o,...a,...s,ref:t})});sE.displayName=E$;function T$(e){return N$.includes(e)}var oE=sE;const _r=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(oE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_r.displayName=oE.displayName;const P$="Certimate v0.2.0",iE=()=>{const{t:e}=Ye();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(TO,{size:16}),l.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),l.jsx(_r,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P$})]})]})};function R$(){const e=er(),t=Mr(),{t:n}=Ye();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return l.jsx(GS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(b$,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(bn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(bn,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(Bw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),l.jsxs(bn,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(mg,{className:"h-4 w-4"}),n("domain.page.title")]}),l.jsxs(bn,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(Ww,{className:"h-4 w-4"}),n("access.page.title")]}),l.jsxs(bn,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(Vw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx($O,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(bh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(bn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(bn,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(Bw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),l.jsxs(bn,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(mg,{className:"h-5 w-5"}),n("domain.page.title")]}),l.jsxs(bn,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(Ww,{className:"h-5 w-5"}),n("access.page.title")]}),l.jsxs(bn,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(Vw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(C$,{}),l.jsx(j$,{}),l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(DO,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ni,{onClick:i,children:n("common.menu.settings")}),l.jsx(ni,{onClick:o,children:n("common.menu.logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(nv,{}),l.jsx(iE,{})]})]})]})})})}const xx=({phase:e,phaseSuccess:t})=>{const{t:n}=Ye();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})};var A$="VisuallyHidden",mu=g.forwardRef((e,t)=>l.jsx(Pe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));mu.displayName=A$;var D$=mu,[Dh,KH]=an("Tooltip",[nl]),Oh=nl(),aE="TooltipProvider",O$=700,Rg="tooltip.open",[I$,wx]=Dh(aE),bx=e=>{const{__scopeTooltip:t,delayDuration:n=O$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(I$,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};bx.displayName=aE;var Ih="Tooltip",[M$,Mh]=Dh(Ih),lE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=wx(Ih,e.__scopeTooltip),u=Oh(t),[d,f]=g.useState(null),h=Wn(),m=g.useRef(0),x=i??c.disableHoverableContent,p=a??c.delayDuration,w=g.useRef(!1),[y=!1,v]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rg))):c.onClose(),o==null||o(T)}}),b=g.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),_=g.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),C=g.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),j=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return g.useEffect(()=>()=>window.clearTimeout(m.current),[]),l.jsx(bv,{...u,children:l.jsx(M$,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:g.useCallback(()=>{x?C():window.clearTimeout(m.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};lE.displayName=Ih;var Ag="TooltipTrigger",cE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Mh(Ag,n),o=wx(Ag,n),i=Oh(n),a=g.useRef(null),c=Ge(t,a,s.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(_v,{asChild:!0,...i,children:l.jsx(Pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});cE.displayName=Ag;var L$="TooltipPortal",[GH,z$]=Dh(L$,{forceMount:void 0}),Ia="TooltipContent",_x=g.forwardRef((e,t)=>{const n=z$(Ia,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Mh(Ia,e.__scopeTooltip);return l.jsx(ln,{present:r||i.open,children:i.disableHoverableContent?l.jsx(uE,{side:s,...o,ref:t}):l.jsx(F$,{side:s,...o,ref:t})})}),F$=g.forwardRef((e,t)=>{const n=Mh(Ia,e.__scopeTooltip),r=wx(Ia,e.__scopeTooltip),s=g.useRef(null),o=Ge(t,s),[i,a]=g.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{a(null),f(!1)},[f]),m=g.useCallback((x,p)=>{const w=x.currentTarget,y={x:x.clientX,y:x.clientY},v=B$(y,w.getBoundingClientRect()),b=W$(y,v),_=H$(p.getBoundingClientRect()),C=K$([...b,..._]);a(C),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const x=p=>{const w=p.target,y={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!Y$(y,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(uE,{...e,ref:o})}),[$$,U$]=Dh(Ih,{isInside:!1}),uE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Mh(Ia,n),u=Oh(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(Rg,d),()=>document.removeEventListener(Rg,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Sv,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(lv,{children:r}),l.jsx($$,{scope:n,isInside:!0,children:l.jsx(D$,{id:c.contentId,role:"tooltip",children:s||r})})]})})});_x.displayName=Ia;var dE="TooltipArrow",V$=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Oh(n);return U$(dE,n).isInside?null:l.jsx(kv,{...s,...r,ref:t})});V$.displayName=dE;function B$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function W$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function H$(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function Y$(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function K$(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),G$(t)}function G$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Z$=bx,q$=lE,X$=cE,fE=_x;const Q$=Z$,hE=q$,mE=X$,pE=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(fE,{ref:r,sideOffset:t,className:re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));pE.displayName=fE.displayName;const Sx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(AO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(Q$,{children:l.jsxs(hE,{children:[l.jsx(mE,{asChild:!0,className:"cursor-pointer",children:l.jsx($w,{size:16,className:"text-red-700"})}),l.jsx(pE,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx($w,{size:16,className:"text-red-700"})})})},gE=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});gE.displayName="Pagination";const yE=g.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));yE.displayName="PaginationContent";const Dg=g.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("",e),...t}));Dg.displayName="PaginationItem";const vE=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:re(uh({variant:t?"outline":"ghost",size:n}),e),...r});vE.displayName="PaginationLink";const xE=({className:e,...t})=>{const{t:n}=Ye();return l.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(OO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};xE.displayName="PaginationEllipsis";const wE=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(gE,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(yE,{children:i.map((a,c)=>a==="..."?l.jsx(Dg,{children:l.jsx(xE,{})},c):l.jsx(Dg,{children:l.jsx(vE,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},dr=({when:e,children:t,fallback:n})=>e?t:n;var bE="AlertDialog",[J$,ZH]=an(bE,[WC]),Zs=WC(),_E=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Vv,{...r,...n,modal:!0})};_E.displayName=bE;var eU="AlertDialogTrigger",SE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(Bv,{...s,...r,ref:t})});SE.displayName=eU;var tU="AlertDialogPortal",kE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Wv,{...r,...n})};kE.displayName=tU;var nU="AlertDialogOverlay",CE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(iu,{...s,...r,ref:t})});CE.displayName=nU;var Ca="AlertDialogContent",[rU,sU]=J$(Ca),jE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Zs(n),i=g.useRef(null),a=Ge(t,i),c=g.useRef(null);return l.jsx(HF,{contentName:Ca,titleName:EE,docsSlug:"alert-dialog",children:l.jsx(rU,{scope:n,cancelRef:c,children:l.jsxs(au,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(lv,{children:r}),l.jsx(iU,{contentRef:i})]})})})});jE.displayName=Ca;var EE="AlertDialogTitle",NE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(lu,{...s,...r,ref:t})});NE.displayName=EE;var TE="AlertDialogDescription",PE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(cu,{...s,...r,ref:t})});PE.displayName=TE;var oU="AlertDialogAction",RE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(wh,{...s,...r,ref:t})});RE.displayName=oU;var AE="AlertDialogCancel",DE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=sU(AE,n),o=Zs(n),i=Ge(t,s);return l.jsx(wh,{...o,...r,ref:i})});DE.displayName=AE;var iU=({contentRef:e})=>{const t=`\`${Ca}\` requires a description for the component to be accessible for screen reader users. +xe.version="2.30.1";p4(Ct);xe.fn=le;xe.min=r5;xe.max=s5;xe.now=o5;xe.utc=is;xe.unix=D6;xe.months=I6;xe.isDate=uu;xe.locale=So;xe.invalid=_h;xe.duration=zr;xe.isMoment=Or;xe.weekdays=L6;xe.parseZone=O6;xe.localeData=Ks;xe.isDuration=Sd;xe.monthsShort=M6;xe.weekdaysMin=F6;xe.defineLocale=cx;xe.updateLocale=O3;xe.locales=I3;xe.weekdaysShort=z6;xe.normalizeUnits=pr;xe.relativeTimeRounding=f$;xe.relativeTimeThreshold=h$;xe.calendarFormat=P5;xe.prototype=le;xe.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const p$=async()=>await ot().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),ls=async e=>e.id?await ot().collection("access").update(e.id,e):await ot().collection("access").create(e),g$=async e=>(e.deleted=xe.utc().format("YYYY-MM-DD HH:mm:ss"),await ot().collection("access").update(e.id,e)),Pb=async()=>await ot().collection("access_groups").getFullList({sort:"-created",expand:"access"}),y$=async e=>{const t=ot();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},v$=async e=>{const t=ot();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Rb=async e=>await ot().collection("access_groups").update(e.id,e),x$=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},w$=async()=>{try{return await ot().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},vx=async e=>{try{return await ot().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},al=async e=>{const t=ot();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},nE=g.createContext({}),cn=()=>g.useContext(nE),b$=({children:e})=>{const[t,n]=g.useReducer(x$,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});g.useEffect(()=>{(async()=>{const d=await p$();n({type:"SET_ACCESSES",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await w$();n({type:"SET_EMAILS",payload:d})})()},[]),g.useEffect(()=>{(async()=>{const d=await Pb();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=g.useCallback(async()=>{const u=await Pb();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=g.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),o=g.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),i=g.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=g.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=g.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(nE.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:o,addAccess:i,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},_$={theme:"system",setTheme:()=>null},rE=g.createContext(_$);function S$({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,o]=g.useState(()=>localStorage.getItem(n)||t);g.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const i={theme:s,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return l.jsx(rE.Provider,{...r,value:i,children:e})}const k$=()=>{const e=g.useContext(rE);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function C$(){const{setTheme:e}=k$(),{t}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(WO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(UO,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ni,{onClick:()=>e("light"),children:t("common.theme.light")}),l.jsx(ni,{onClick:()=>e("dark"),children:t("common.theme.dark")}),l.jsx(ni,{onClick:()=>e("system"),children:t("common.theme.system")})]})]})}function j$(){const{i18n:e}=Ye();return l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",children:[l.jsx(LO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(xh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(ni,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var E$="Separator",Ab="horizontal",N$=["horizontal","vertical"],sE=g.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ab,...s}=e,o=T$(r)?r:Ab,a=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return l.jsx(Pe.div,{"data-orientation":o,...a,...s,ref:t})});sE.displayName=E$;function T$(e){return N$.includes(e)}var oE=sE;const _r=g.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(oE,{ref:s,decorative:n,orientation:t,className:re("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_r.displayName=oE.displayName;const P$="Certimate v0.2.1",iE=()=>{const{t:e}=Ye();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(TO,{size:16}),l.jsx("div",{className:"ml-1",children:e("common.menu.document")})]}),l.jsx(_r,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P$})]})]})};function R$(){const e=er(),t=Mr(),{t:n}=Ye();if(!ot().authStore.isValid||!ot().authStore.isAdmin)return l.jsx(GS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),o=()=>{ot().authStore.clear(),e("/login")},i=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(b$,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(bn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(bn,{to:"/",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(Bw,{className:"h-4 w-4"}),n("dashboard.page.title")]}),l.jsxs(bn,{to:"/domains",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx(mg,{className:"h-4 w-4"}),n("domain.page.title")]}),l.jsxs(bn,{to:"/access",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(Ww,{className:"h-4 w-4"}),n("access.page.title")]}),l.jsxs(bn,{to:"/history",className:re("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(Vw,{className:"h-4 w-4"}),n("history.page.title")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(Hv,{children:[l.jsx(Yv,{asChild:!0,children:l.jsxs(Me,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx($O,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(bh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(bn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(bn,{to:"/",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(Bw,{className:"h-5 w-5"}),n("dashboard.page.title")]}),l.jsxs(bn,{to:"/domains",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx(mg,{className:"h-5 w-5"}),n("domain.page.title")]}),l.jsxs(bn,{to:"/access",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(Ww,{className:"h-5 w-5"}),n("access.page.title")]}),l.jsxs(bn,{to:"/history",className:re("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(Vw,{className:"h-5 w-5"}),n("history.page.title")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(C$,{}),l.jsx(j$,{}),l.jsxs(Mv,{children:[l.jsx(Lv,{asChild:!0,children:l.jsxs(Me,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(DO,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(xh,{align:"end",children:[l.jsx(ni,{onClick:i,children:n("common.menu.settings")}),l.jsx(ni,{onClick:o,children:n("common.menu.logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(nv,{}),l.jsx(iE,{})]})]})]})})})}const xx=({phase:e,phaseSuccess:t})=>{const{t:n}=Ye();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:re("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("history.props.stage.progress.check")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("history.props.stage.progress.apply")}),l.jsx(_r,{className:re("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:re("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("history.props.stage.progress.deploy")})]})};var A$="VisuallyHidden",mu=g.forwardRef((e,t)=>l.jsx(Pe.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));mu.displayName=A$;var D$=mu,[Dh,KH]=an("Tooltip",[nl]),Oh=nl(),aE="TooltipProvider",O$=700,Rg="tooltip.open",[I$,wx]=Dh(aE),bx=e=>{const{__scopeTooltip:t,delayDuration:n=O$,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,[i,a]=g.useState(!0),c=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(I$,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:g.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:o})};bx.displayName=aE;var Ih="Tooltip",[M$,Mh]=Dh(Ih),lE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,c=wx(Ih,e.__scopeTooltip),u=Oh(t),[d,f]=g.useState(null),h=Wn(),m=g.useRef(0),x=i??c.disableHoverableContent,p=a??c.delayDuration,w=g.useRef(!1),[y=!1,v]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rg))):c.onClose(),o==null||o(T)}}),b=g.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),_=g.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,v(!0)},[v]),C=g.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),j=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0)},p)},[p,v]);return g.useEffect(()=>()=>window.clearTimeout(m.current),[]),l.jsx(bv,{...u,children:l.jsx(M$,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:g.useCallback(()=>{x?C():window.clearTimeout(m.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};lE.displayName=Ih;var Ag="TooltipTrigger",cE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Mh(Ag,n),o=wx(Ag,n),i=Oh(n),a=g.useRef(null),c=Ge(t,a,s.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx(_v,{asChild:!0,...i,children:l.jsx(Pe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});cE.displayName=Ag;var L$="TooltipPortal",[GH,z$]=Dh(L$,{forceMount:void 0}),Ia="TooltipContent",_x=g.forwardRef((e,t)=>{const n=z$(Ia,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,i=Mh(Ia,e.__scopeTooltip);return l.jsx(ln,{present:r||i.open,children:i.disableHoverableContent?l.jsx(uE,{side:s,...o,ref:t}):l.jsx(F$,{side:s,...o,ref:t})})}),F$=g.forwardRef((e,t)=>{const n=Mh(Ia,e.__scopeTooltip),r=wx(Ia,e.__scopeTooltip),s=g.useRef(null),o=Ge(t,s),[i,a]=g.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=g.useCallback(()=>{a(null),f(!1)},[f]),m=g.useCallback((x,p)=>{const w=x.currentTarget,y={x:x.clientX,y:x.clientY},v=B$(y,w.getBoundingClientRect()),b=W$(y,v),_=H$(p.getBoundingClientRect()),C=K$([...b,..._]);a(C),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const x=w=>m(w,d),p=w=>m(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),g.useEffect(()=>{if(i){const x=p=>{const w=p.target,y={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!Y$(y,i);v?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,i,u,h]),l.jsx(uE,{...e,ref:o})}),[$$,U$]=Dh(Ih,{isInside:!1}),uE=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,c=Mh(Ia,n),u=Oh(n),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(Rg,d),()=>document.removeEventListener(Rg,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx(Ja,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Sv,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(lv,{children:r}),l.jsx($$,{scope:n,isInside:!0,children:l.jsx(D$,{id:c.contentId,role:"tooltip",children:s||r})})]})})});_x.displayName=Ia;var dE="TooltipArrow",V$=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Oh(n);return U$(dE,n).isInside?null:l.jsx(kv,{...s,...r,ref:t})});V$.displayName=dE;function B$(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function W$(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function H$(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function Y$(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,i=t.length-1;or!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function K$(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),G$(t)}function G$(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],i=n[n.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Z$=bx,q$=lE,X$=cE,fE=_x;const Q$=Z$,hE=q$,mE=X$,pE=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(fE,{ref:r,sideOffset:t,className:re("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));pE.displayName=fE.displayName;const Sx=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(AO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(Q$,{children:l.jsxs(hE,{children:[l.jsx(mE,{asChild:!0,className:"cursor-pointer",children:l.jsx($w,{size:16,className:"text-red-700"})}),l.jsx(pE,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx($w,{size:16,className:"text-red-700"})})})},gE=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:re("mx-auto flex w-full justify-center",e),...t});gE.displayName="Pagination";const yE=g.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:re("flex flex-row items-center gap-1",e),...t}));yE.displayName="PaginationContent";const Dg=g.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:re("",e),...t}));Dg.displayName="PaginationItem";const vE=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:re(uh({variant:t?"outline":"ghost",size:n}),e),...r});vE.displayName="PaginationLink";const xE=({className:e,...t})=>{const{t:n}=Ye();return l.jsxs("span",{"aria-hidden":!0,className:re("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(OO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:n("common.pagination.more")})]})};xE.displayName="PaginationEllipsis";const wE=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=o(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},i=s();return l.jsx(l.Fragment,{children:l.jsx(gE,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(yE,{children:i.map((a,c)=>a==="..."?l.jsx(Dg,{children:l.jsx(xE,{})},c):l.jsx(Dg,{children:l.jsx(vE,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},dr=({when:e,children:t,fallback:n})=>e?t:n;var bE="AlertDialog",[J$,ZH]=an(bE,[WC]),Zs=WC(),_E=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Vv,{...r,...n,modal:!0})};_E.displayName=bE;var eU="AlertDialogTrigger",SE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(Bv,{...s,...r,ref:t})});SE.displayName=eU;var tU="AlertDialogPortal",kE=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zs(t);return l.jsx(Wv,{...r,...n})};kE.displayName=tU;var nU="AlertDialogOverlay",CE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(iu,{...s,...r,ref:t})});CE.displayName=nU;var Ca="AlertDialogContent",[rU,sU]=J$(Ca),jE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,o=Zs(n),i=g.useRef(null),a=Ge(t,i),c=g.useRef(null);return l.jsx(HF,{contentName:Ca,titleName:EE,docsSlug:"alert-dialog",children:l.jsx(rU,{scope:n,cancelRef:c,children:l.jsxs(au,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(lv,{children:r}),l.jsx(iU,{contentRef:i})]})})})});jE.displayName=Ca;var EE="AlertDialogTitle",NE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(lu,{...s,...r,ref:t})});NE.displayName=EE;var TE="AlertDialogDescription",PE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(cu,{...s,...r,ref:t})});PE.displayName=TE;var oU="AlertDialogAction",RE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Zs(n);return l.jsx(wh,{...s,...r,ref:t})});RE.displayName=oU;var AE="AlertDialogCancel",DE=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=sU(AE,n),o=Zs(n),i=Ge(t,s);return l.jsx(wh,{...o,...r,ref:i})});DE.displayName=AE;var iU=({contentRef:e})=>{const t=`\`${Ca}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${Ca}\` by passing a \`${TE}\` component as a child, which also benefits sighted users by adding visible context to the dialog. diff --git a/ui/dist/index.html b/ui/dist/index.html index 03c651f5..bfc57684 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,7 +5,7 @@ Certimate - Your Trusted SSL Automation Partner - + diff --git a/ui/src/domain/version.ts b/ui/src/domain/version.ts index 4cc14f1c..83bb044a 100644 --- a/ui/src/domain/version.ts +++ b/ui/src/domain/version.ts @@ -1 +1 @@ -export const version = "Certimate v0.2.0"; +export const version = "Certimate v0.2.1";