From 30ef5841d6e6d6e83bf7242b916f405a7d60d610 Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Wed, 9 Oct 2024 09:26:39 +0800 Subject: [PATCH] dark mode style fix --- .../assets/{index-47M77bCI.js => index-8E76olt7.js} | 4 ++-- .../assets/{index-ClQTEWmX.css => index-DOft-CKV.css} | 2 +- ui/dist/index.html | 4 ++-- ui/src/components/certimate/StringList.tsx | 11 +++++++---- ui/src/domain/version.ts | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) rename ui/dist/assets/{index-47M77bCI.js => index-8E76olt7.js} (86%) rename ui/dist/assets/{index-ClQTEWmX.css => index-DOft-CKV.css} (89%) diff --git a/ui/dist/assets/index-47M77bCI.js b/ui/dist/assets/index-8E76olt7.js similarity index 86% rename from ui/dist/assets/index-47M77bCI.js rename to ui/dist/assets/index-8E76olt7.js index 34b3d21a..c60d8f42 100644 --- a/ui/dist/assets/index-47M77bCI.js +++ b/ui/dist/assets/index-8E76olt7.js @@ -304,7 +304,7 @@ var SC;function be(){return SC.apply(null,arguments)}function g4(e){SC=e}functio [`+i+"] ";for(o in arguments[0])dt(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[i];r.push(s)}CC(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Bw={};function jC(e,t){be.deprecationHandler!=null&&be.deprecationHandler(e,t),Bw[e]||(CC(t),Bw[e]=!0)}be.suppressDeprecationWarnings=!1;be.deprecationHandler=null;function ts(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function v4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],ts(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 Xm(e,t){var n=li({},e),r;for(r in t)dt(t,r)&&(to(e[r])&&to(t[r])?(n[r]={},li(n[r],e[r]),li(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&to(e[r])&&(n[r]=li({},n[r]));return n}function yv(e){e!=null&&this.set(e)}var Qm;Object.keys?Qm=Object.keys:Qm=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var x4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function w4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ts(r)?r.call(t,n):r}function Xr(e,t,n){var r=""+Math.abs(e),s=t-r.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var vv=/(\[[^\[]*\])|(\\)?([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,$u=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pp={},ma={};function Me(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(ma[e]=s),t&&(ma[t[0]]=function(){return Xr(s.apply(this,arguments),t[1],t[2])}),n&&(ma[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function b4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _4(e){var t=e.match(vv),n,r;for(n=0,r=t.length;n=0&&$u.test(e);)e=e.replace($u,r),$u.lastIndex=0,n-=1;return e}var S4={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 k4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(vv).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var C4="Invalid date";function j4(){return this._invalidDate}var E4="%d",N4=/\d{1,2}/;function T4(e){return this._ordinal.replace("%d",e)}var R4={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 ts(s)?s(e,t,n,r):s.replace(/%d/i,e)}function A4(e,t){var n=this._relativeTime[e>0?"future":"past"];return ts(n)?n(t):n.replace(/%s/i,t)}var Ww={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 dr(e){return typeof e=="string"?Ww[e]||Ww[e.toLowerCase()]:void 0}function xv(e){var t={},n,r;for(r in e)dt(e,r)&&(n=dr(r),n&&(t[n]=e[r]));return t}var O4={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:O4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var NC=/\d/,Qn=/\d\d/,TC=/\d{3}/,wv=/\d{4}/,sh=/[+-]?\d{6}/,jt=/\d\d?/,RC=/\d\d\d\d?/,PC=/\d\d\d\d\d\d?/,ih=/\d{1,3}/,bv=/\d{1,4}/,oh=/[+-]?\d{1,6}/,Ha=/\d+/,ah=/[+-]?\d+/,I4=/Z|[+-]\d\d:?\d\d/gi,lh=/Z|[+-]\d\d(?::?\d\d)?/gi,M4=/[+-]?\d+(\.\d{1,3})?/,qc=/[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,Ya=/^[1-9]\d?/,_v=/^([1-9]\d|\d)/,qd;qd={};function je(e,t,n){qd[e]=ts(t)?t:function(r,s){return r&&n?n:t}}function L4(e,t){return dt(qd,e)?qd[e](t._strict,t._locale):new RegExp(F4(e))}function F4(e){return bs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,i){return n||r||s||i}))}function bs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function nt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rr(t)),n}var Jm={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Ps(t)&&(r=function(i,o){o[t]=nt(i)}),s=e.length,n=0;n68?1900:2e3)};var AC=Ka("FullYear",!0);function V4(){return ch(this.year())}function Ka(e,t){return function(n){return n!=null?(OC(this,e,n),be.updateOffset(this,t),this):pc(this,e)}}function pc(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 OC(e,t,n){var r,s,i,o,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}i=n,o=e.month(),a=e.date(),a=a===29&&o===1&&!ch(i)?28:a,s?r.setUTCFullYear(i,o,a):r.setFullYear(i,o,a)}}function B4(e){return e=dr(e),ts(this[e])?this[e]():this}function W4(e,t){if(typeof e=="object"){e=xv(e);var n=D4(e),r,s=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,i,o),a}function mc(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 Xd(e,t,n){var r=7+t-n,s=(7+mc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function zC(e,t,n,r,s){var i=(7+n-r)%7,o=Xd(e,r,s),a=1+7*(t-1)+i+o,c,u;return a<=0?(c=e-1,u=zl(c)+a):a>zl(e)?(c=e+1,u=a-zl(e)):(c=e,u=a),{year:c,dayOfYear:u}}function gc(e,t,n){var r=Xd(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+_s(o,t,n)):s>_s(e.year(),t,n)?(i=s-_s(e.year(),t,n),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function _s(e,t,n){var r=Xd(e,t,n),s=Xd(e+1,t,n);return(zl(e)-r+s)/7}Me("w",["ww",2],"wo","week");Me("W",["WW",2],"Wo","isoWeek");je("w",jt,Ya);je("ww",jt,Qn);je("W",jt,Ya);je("WW",jt,Qn);Xc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=nt(e)});function r3(e){return gc(e,this._week.dow,this._week.doy).week}var s3={dow:0,doy:6};function i3(){return this._week.dow}function o3(){return this._week.doy}function a3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function l3(e){var t=gc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Me("d",0,"do","day");Me("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Me("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Me("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Me("e",0,0,"weekday");Me("E",0,0,"isoWeekday");je("d",jt);je("e",jt);je("E",jt);je("dd",function(e,t){return t.weekdaysMinRegex(e)});je("ddd",function(e,t){return t.weekdaysShortRegex(e)});je("dddd",function(e,t){return t.weekdaysRegex(e)});Xc(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Xe(n).invalidWeekday=e});Xc(["d","e","E"],function(e,t,n,r){t[r]=nt(e)});function c3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function u3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var d3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$C="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),f3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),h3=qc,p3=qc,m3=qc;function g3(e,t){var n=Tr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?kv(n,this._week.dow):e?n[e.day()]:n}function y3(e){return e===!0?kv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function v3(e){return e===!0?kv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function x3(e,t,n){var r,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=es([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(s=Ut.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=Ut.call(this._weekdaysParse,o),s!==-1||(s=Ut.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,o),s!==-1||(s=Ut.call(this._weekdaysParse,o),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=Ut.call(this._minWeekdaysParse,o),s!==-1||(s=Ut.call(this._weekdaysParse,o),s!==-1)?s:(s=Ut.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function w3(e,t,n){var r,s,i;if(this._weekdaysParseExact)return x3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=es([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]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(i.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 b3(e){if(!this.isValid())return e!=null?this:NaN;var t=pc(this,"Day");return e!=null?(e=c3(e,this.localeData()),this.add(e-t,"d")):t}function _3(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 S3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=u3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function k3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=h3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function C3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=p3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function j3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=m3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Cv(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],i,o,a,c,u;for(i=0;i<7;i++)o=es([2e3,1]).day(i),a=bs(this.weekdaysMin(o,"")),c=bs(this.weekdaysShort(o,"")),u=bs(this.weekdays(o,"")),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 jv(){return this.hours()%12||12}function E3(){return this.hours()||24}Me("H",["HH",2],0,"hour");Me("h",["hh",2],0,jv);Me("k",["kk",2],0,E3);Me("hmm",0,0,function(){return""+jv.apply(this)+Xr(this.minutes(),2)});Me("hmmss",0,0,function(){return""+jv.apply(this)+Xr(this.minutes(),2)+Xr(this.seconds(),2)});Me("Hmm",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)});Me("Hmmss",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)+Xr(this.seconds(),2)});function UC(e,t){Me(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}UC("a",!0);UC("A",!1);function VC(e,t){return t._meridiemParse}je("a",VC);je("A",VC);je("H",jt,_v);je("h",jt,Ya);je("k",jt,Ya);je("HH",jt,Qn);je("hh",jt,Qn);je("kk",jt,Qn);je("hmm",RC);je("hmmss",PC);je("Hmm",RC);je("Hmmss",PC);vt(["H","HH"],qt);vt(["k","kk"],function(e,t,n){var r=nt(e);t[qt]=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[qt]=nt(e),Xe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r)),Xe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s)),Xe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s))});function N3(e){return(e+"").toLowerCase().charAt(0)==="p"}var T3=/[ap]\.?m?\.?/i,R3=Ka("Hours",!0);function P3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var BC={calendar:x4,longDateFormat:S4,invalidDate:C4,ordinal:E4,dayOfMonthOrdinalParse:N4,relativeTime:R4,months:Y4,monthsShort:DC,week:s3,weekdays:d3,weekdaysMin:f3,weekdaysShort:$C,meridiemParse:T3},Tt={},ul={},yc;function A3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=uh(i.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&A3(i,r)>=n-1)break;n--}t++}return yc}function D3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function uh(e){var t=null,n;if(Tt[e]===void 0&&typeof md<"u"&&md&&md.exports&&D3(e))try{t=yc._abbr,n=require,n("./locale/"+e),xi(t)}catch{Tt[e]=null}return Tt[e]}function xi(e,t){var n;return e&&(En(t)?n=zs(e):n=Ev(e,t),n?yc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),yc._abbr}function Ev(e,t){if(t!==null){var n,r=BC;if(t.abbr=e,Tt[e]!=null)jC("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=uh(t.parentLocale),n!=null)r=n._config;else return ul[t.parentLocale]||(ul[t.parentLocale]=[]),ul[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new yv(Xm(r,t)),ul[e]&&ul[e].forEach(function(s){Ev(s.name,s.config)}),xi(e),Tt[e]}else return delete Tt[e],null}function I3(e,t){if(t!=null){var n,r,s=BC;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Xm(Tt[e]._config,t)):(r=uh(e),r!=null&&(s=r._config),t=Xm(s,t),r==null&&(t.abbr=e),n=new yv(t),n.parentLocale=Tt[e],Tt[e]=n),xi(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===xi()&&xi(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function zs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return yc;if(!Tr(e)){if(t=uh(e),t)return t;e=[e]}return O3(e)}function M3(){return Qm(Tt)}function Nv(e){var t,n=e._a;return n&&Xe(e).overflow===-2&&(t=n[ys]<0||n[ys]>11?ys:n[Vr]<1||n[Vr]>Sv(n[dn],n[ys])?Vr:n[qt]<0||n[qt]>24||n[qt]===24&&(n[br]!==0||n[vs]!==0||n[Zi]!==0)?qt:n[br]<0||n[br]>59?br:n[vs]<0||n[vs]>59?vs:n[Zi]<0||n[Zi]>999?Zi:-1,Xe(e)._overflowDayOfYear&&(tVr)&&(t=Vr),Xe(e)._overflowWeeks&&t===-1&&(t=$4),Xe(e)._overflowWeekday&&t===-1&&(t=U4),Xe(e).overflow=t),e}var 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)?)?$/,F3=/^\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)?/,Uu=[["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]],Ap=[["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/]],$3=/^\/?Date\((-?\d+)/i,U3=/^(?:(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}))$/,V3={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 WC(e){var t,n,r=e._i,s=L3.exec(r)||F3.exec(r),i,o,a,c,u=Uu.length,d=Ap.length;if(s){for(Xe(e).iso=!0,t=0,n=u;tzl(o)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),n=mc(o,0,e._dayOfYear),e._a[ys]=n.getUTCMonth(),e._a[Vr]=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[qt]===24&&e._a[br]===0&&e._a[vs]===0&&e._a[Zi]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?mc:n3).apply(null,r),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Xe(e).weekdayMismatch=!0)}}function q3(e){var t,n,r,s,i,o,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,n=Fo(t.GG,e._a[dn],gc(Ct(),1,4).year),r=Fo(t.W,1),s=Fo(t.E,1),(s<1||s>7)&&(c=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=gc(Ct(),i,o),n=Fo(t.gg,e._a[dn],u.year),r=Fo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),r<1||r>_s(n,i,o)?Xe(e)._overflowWeeks=!0:c!=null?Xe(e)._overflowWeekday=!0:(a=zC(n,r,s,i,o),e._a[dn]=a.year,e._dayOfYear=a.dayOfYear)}be.ISO_8601=function(){};be.RFC_2822=function(){};function Rv(e){if(e._f===be.ISO_8601){WC(e);return}if(e._f===be.RFC_2822){HC(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,n,r,s,i,o,a=t.length,c=0,u,d;for(s=EC(e._f,e._locale).match(vv)||[],d=s.length,n=0;n0&&Xe(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),ma[i]?(r?Xe(e).empty=!1:Xe(e).unusedTokens.push(i),z4(i,r,e)):e._strict&&!r&&Xe(e).unusedTokens.push(i);Xe(e).charsLeftOver=a-c,t.length>0&&Xe(e).unusedInput.push(t),e._a[qt]<=12&&Xe(e).bigHour===!0&&e._a[qt]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[qt]=X3(e._locale,e._a[qt],e._meridiem),u=Xe(e).era,u!==null&&(e._a[dn]=e._locale.erasConvertYear(u,e._a[dn])),Tv(e),Nv(e)}function X3(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 Q3(e){var t,n,r,s,i,o,a=!1,c=e._f.length;if(c===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:rh()});function GC(e,t){var n,r;if(t.length===1&&Tr(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 x5(){if(!En(this._isDSTShifted))return this._isDSTShifted;var e={},t;return gv(e,this),e=YC(e),e._a?(t=e._isUTC?es(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&u5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function w5(){return this.isValid()?!this._isUTC:!1}function b5(){return this.isValid()?this._isUTC:!1}function qC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,S5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var n=e,r=null,s,i,o;return ud(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Ps(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:nt(r[Vr])*s,h:nt(r[qt])*s,m:nt(r[br])*s,s:nt(r[vs])*s,ms:nt(eg(r[Zi]*1e3))*s}):(r=S5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Li(r[2],s),M:Li(r[3],s),w:Li(r[4],s),d:Li(r[5],s),h:Li(r[6],s),m:Li(r[7],s),s:Li(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=k5(Ct(n.from),Ct(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),i=new dh(n),ud(e)&&dt(e,"_locale")&&(i._locale=e._locale),ud(e)&&dt(e,"_isValid")&&(i._isValid=e._isValid),i}Dr.fn=dh.prototype;Dr.invalid=c5;function Li(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Yw(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 k5(e,t){var n;return e.isValid()&&t.isValid()?(t=Av(t,e),e.isBefore(t)?n=Yw(e,t):(n=Yw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function XC(e,t){return function(n,r){var s,i;return r!==null&&!isNaN(+r)&&(jC(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."),i=n,n=r,r=i),s=Dr(n,r),QC(this,s,e),this}}function QC(e,t,n,r){var s=t._milliseconds,i=eg(t._days),o=eg(t._months);e.isValid()&&(r=r??!0,o&&MC(e,pc(e,"Month")+o*n),i&&OC(e,"Date",pc(e,"Date")+i*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&be.updateOffset(e,i||o))}var C5=XC(1,"add"),j5=XC(-1,"subtract");function JC(e){return typeof e=="string"||e instanceof String}function E5(e){return Rr(e)||Gc(e)||JC(e)||Ps(e)||T5(e)||N5(e)||e===null||e===void 0}function N5(e){var t=to(e)&&!pv(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,i,o=r.length;for(s=0;sn.valueOf():n.valueOf()9999?cd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ts(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cd(n,"Z")):cd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function B5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,i;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",i=t+'[")]',this.format(n+r+s+i)}function W5(e){e||(e=this.isUtc()?be.defaultFormatUtc:be.defaultFormat);var t=cd(this,e);return this.localeData().postformat(t)}function H5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y5(e){return this.from(Ct(),e)}function K5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function G5(e){return this.to(Ct(),e)}function ej(e){var t;return e===void 0?this._locale._abbr:(t=zs(e),t!=null&&(this._locale=t),this)}var tj=ur("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 nj(){return this._locale}var Qd=1e3,ga=60*Qd,Jd=60*ga,rj=(365*400+97)*24*Jd;function ya(e,t){return(e%t+t)%t}function sj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-rj:new Date(e,t,n).valueOf()}function ij(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-rj:Date.UTC(e,t,n)}function Z5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ij:sj,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-=ya(t+(this._isUTC?0:this.utcOffset()*ga),Jd);break;case"minute":t=this._d.valueOf(),t-=ya(t,ga);break;case"second":t=this._d.valueOf(),t-=ya(t,Qd);break}return this._d.setTime(t),be.updateOffset(this,!0),this}function q5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ij:sj,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+=Jd-ya(t+(this._isUTC?0:this.utcOffset()*ga),Jd)-1;break;case"minute":t=this._d.valueOf(),t+=ga-ya(t,ga)-1;break;case"second":t=this._d.valueOf(),t+=Qd-ya(t,Qd)-1;break}return this._d.setTime(t),be.updateOffset(this,!0),this}function X5(){return this._d.valueOf()-(this._offset||0)*6e4}function Q5(){return Math.floor(this.valueOf()/1e3)}function J5(){return new Date(this.valueOf())}function ez(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function tz(){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 nz(){return this.isValid()?this.toISOString():null}function rz(){return mv(this)}function sz(){return li({},Xe(this))}function iz(){return Xe(this).overflow}function oz(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Me("N",0,0,"eraAbbr");Me("NN",0,0,"eraAbbr");Me("NNN",0,0,"eraAbbr");Me("NNNN",0,0,"eraName");Me("NNNNN",0,0,"eraNarrow");Me("y",["y",1],"yo","eraYear");Me("y",["yy",2],0,"eraYear");Me("y",["yyy",3],0,"eraYear");Me("y",["yyyy",4],0,"eraYear");je("N",Ov);je("NN",Ov);je("NNN",Ov);je("NNNN",yz);je("NNNNN",vz);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Xe(n).era=s:Xe(n).invalidEra=e});je("y",Ha);je("yy",Ha);je("yyy",Ha);je("yyyy",Ha);je("yo",xz);vt(["y","yy","yyy","yyyy"],dn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[dn]=n._locale.eraYearOrdinalParse(e,s):t[dn]=parseInt(e,10)});function az(e,t){var n,r,s,i=this._eras||zs("en")._eras;for(n=0,r=i.length;n=0)return i[r]}function cz(e,t){var n=e.since<=e.until?1:-1;return t===void 0?be(e.since).year():be(e.since).year()+(t-e.offset)*n}function uz(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ei&&(t=i),jz.call(this,e,t,n,r,s))}function jz(e,t,n,r,s){var i=zC(e,t,n,r,s),o=mc(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Me("Q",0,"Qo","quarter");je("Q",NC);vt("Q",function(e,t){t[ys]=(nt(e)-1)*3});function Ez(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Me("D",["DD",2],"Do","date");je("D",jt,Ya);je("DD",jt,Qn);je("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Vr);vt("Do",function(e,t){t[Vr]=nt(e.match(jt)[0])});var aj=Ka("Date",!0);Me("DDD",["DDDD",3],"DDDo","dayOfYear");je("DDD",ih);je("DDDD",TC);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=nt(e)});function Nz(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Me("m",["mm",2],0,"minute");je("m",jt,_v);je("mm",jt,Qn);vt(["m","mm"],br);var Tz=Ka("Minutes",!1);Me("s",["ss",2],0,"second");je("s",jt,_v);je("ss",jt,Qn);vt(["s","ss"],vs);var Rz=Ka("Seconds",!1);Me("S",0,0,function(){return~~(this.millisecond()/100)});Me(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Me(0,["SSS",3],0,"millisecond");Me(0,["SSSS",4],0,function(){return this.millisecond()*10});Me(0,["SSSSS",5],0,function(){return this.millisecond()*100});Me(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Me(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Me(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Me(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});je("S",ih,NC);je("SS",ih,Qn);je("SSS",ih,TC);var ci,lj;for(ci="SSSS";ci.length<=9;ci+="S")je(ci,Ha);function Pz(e,t){t[Zi]=nt(("0."+e)*1e3)}for(ci="S";ci.length<=9;ci+="S")vt(ci,Pz);lj=Ka("Milliseconds",!1);Me("z",0,0,"zoneAbbr");Me("zz",0,0,"zoneName");function Az(){return this._isUTC?"UTC":""}function Oz(){return this._isUTC?"Coordinated Universal Time":""}var le=Zc.prototype;le.add=C5;le.calendar=A5;le.clone=O5;le.diff=$5;le.endOf=q5;le.format=W5;le.from=H5;le.fromNow=Y5;le.to=K5;le.toNow=G5;le.get=B4;le.invalidAt=iz;le.isAfter=D5;le.isBefore=I5;le.isBetween=M5;le.isSame=L5;le.isSameOrAfter=F5;le.isSameOrBefore=z5;le.isValid=rz;le.lang=tj;le.locale=ej;le.localeData=nj;le.max=r5;le.min=n5;le.parsingFlags=sz;le.set=W4;le.startOf=Z5;le.subtract=j5;le.toArray=ez;le.toObject=tz;le.toDate=J5;le.toISOString=V5;le.inspect=B5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=nz;le.toString=U5;le.unix=Q5;le.valueOf=X5;le.creationData=oz;le.eraName=uz;le.eraNarrow=dz;le.eraAbbr=fz;le.eraYear=hz;le.year=AC;le.isLeapYear=V4;le.weekYear=wz;le.isoWeekYear=bz;le.quarter=le.quarters=Ez;le.month=LC;le.daysInMonth=J4;le.week=le.weeks=a3;le.isoWeek=le.isoWeeks=l3;le.weeksInYear=kz;le.weeksInWeekYear=Cz;le.isoWeeksInYear=_z;le.isoWeeksInISOWeekYear=Sz;le.date=aj;le.day=le.days=b3;le.weekday=_3;le.isoWeekday=S3;le.dayOfYear=Nz;le.hour=le.hours=R3;le.minute=le.minutes=Tz;le.second=le.seconds=Rz;le.millisecond=le.milliseconds=lj;le.utcOffset=f5;le.utc=p5;le.local=m5;le.parseZone=g5;le.hasAlignedHourOffset=y5;le.isDST=v5;le.isLocal=w5;le.isUtcOffset=b5;le.isUtc=qC;le.isUTC=qC;le.zoneAbbr=Az;le.zoneName=Oz;le.dates=ur("dates accessor is deprecated. Use date instead.",aj);le.months=ur("months accessor is deprecated. Use month instead",LC);le.years=ur("years accessor is deprecated. Use year instead",AC);le.zone=ur("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",h5);le.isDSTShifted=ur("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",x5);function Dz(e){return Ct(e*1e3)}function Iz(){return Ct.apply(null,arguments).parseZone()}function cj(e){return e}var ft=yv.prototype;ft.calendar=w4;ft.longDateFormat=k4;ft.invalidDate=j4;ft.ordinal=T4;ft.preparse=cj;ft.postformat=cj;ft.relativeTime=P4;ft.pastFuture=A4;ft.set=v4;ft.eras=az;ft.erasParse=lz;ft.erasConvertYear=cz;ft.erasAbbrRegex=mz;ft.erasNameRegex=pz;ft.erasNarrowRegex=gz;ft.months=Z4;ft.monthsShort=q4;ft.monthsParse=Q4;ft.monthsRegex=t3;ft.monthsShortRegex=e3;ft.week=r3;ft.firstDayOfYear=o3;ft.firstDayOfWeek=i3;ft.weekdays=g3;ft.weekdaysMin=v3;ft.weekdaysShort=y3;ft.weekdaysParse=w3;ft.weekdaysRegex=k3;ft.weekdaysShortRegex=C3;ft.weekdaysMinRegex=j3;ft.isPM=N3;ft.meridiem=P3;function ef(e,t,n,r){var s=zs(),i=es().set(r,t);return s[n](i,e)}function uj(e,t,n){if(Ps(e)&&(t=e,e=void 0),e=e||"",t!=null)return ef(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=ef(e,r,n,"month");return s}function Iv(e,t,n,r){typeof e=="boolean"?(Ps(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Ps(t)&&(n=t,t=void 0),t=t||"");var s=zs(),i=e?s._week.dow:0,o,a=[];if(n!=null)return ef(t,(n+i)%7,r,"day");for(o=0;o<7;o++)a[o]=ef(t,(o+i)%7,r,"day");return a}function Mz(e,t){return uj(e,t,"months")}function Lz(e,t){return uj(e,t,"monthsShort")}function Fz(e,t,n){return Iv(e,t,n,"weekdays")}function zz(e,t,n){return Iv(e,t,n,"weekdaysShort")}function $z(e,t,n){return Iv(e,t,n,"weekdaysMin")}xi("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=nt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});be.lang=ur("moment.lang is deprecated. Use moment.locale instead.",xi);be.langData=ur("moment.langData is deprecated. Use moment.localeData instead.",zs);var ls=Math.abs;function Uz(){var e=this._data;return this._milliseconds=ls(this._milliseconds),this._days=ls(this._days),this._months=ls(this._months),e.milliseconds=ls(e.milliseconds),e.seconds=ls(e.seconds),e.minutes=ls(e.minutes),e.hours=ls(e.hours),e.months=ls(e.months),e.years=ls(e.years),this}function dj(e,t,n,r){var s=Dr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Vz(e,t){return dj(this,e,t,1)}function Bz(e,t){return dj(this,e,t,-1)}function Kw(e){return e<0?Math.floor(e):Math.ceil(e)}function Wz(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,i,o,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Kw(ng(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=rr(e/1e3),r.seconds=s%60,i=rr(s/60),r.minutes=i%60,o=rr(i/60),r.hours=o%24,t+=rr(o/24),c=rr(fj(t)),n+=c,t-=Kw(ng(c)),a=rr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function fj(e){return e*4800/146097}function ng(e){return e*146097/4800}function Hz(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=dr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+fj(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ng(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 $s(e){return function(){return this.as(e)}}var hj=$s("ms"),Yz=$s("s"),Kz=$s("m"),Gz=$s("h"),Zz=$s("d"),qz=$s("w"),Xz=$s("M"),Qz=$s("Q"),Jz=$s("y"),e6=hj;function t6(){return Dr(this)}function n6(e){return e=dr(e),this.isValid()?this[e+"s"]():NaN}function So(e){return function(){return this.isValid()?this._data[e]:NaN}}var r6=So("milliseconds"),s6=So("seconds"),i6=So("minutes"),o6=So("hours"),a6=So("days"),l6=So("months"),c6=So("years");function u6(){return rr(this.days()/7)}var fs=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function d6(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function f6(e,t,n,r){var s=Dr(e).abs(),i=fs(s.as("s")),o=fs(s.as("m")),a=fs(s.as("h")),c=fs(s.as("d")),u=fs(s.as("M")),d=fs(s.as("w")),f=fs(s.as("y")),h=i<=n.ss&&["s",i]||i0,h[4]=r,d6.apply(null,h)}function h6(e){return e===void 0?fs:typeof e=="function"?(fs=e,!0):!1}function p6(e,t){return ta[e]===void 0?!1:t===void 0?ta[e]:(ta[e]=t,e==="s"&&(ta.ss=t-1),!0)}function m6(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ta,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ta,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),i=f6(this,!n,r,s),n&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Op=Math.abs;function Do(e){return(e>0)-(e<0)||+e}function hh(){if(!this.isValid())return this.localeData().invalidDate();var e=Op(this._milliseconds)/1e3,t=Op(this._days),n=Op(this._months),r,s,i,o,a=this.asSeconds(),c,u,d,f;return a?(r=rr(e/60),s=rr(r/60),e%=60,r%=60,i=rr(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Do(this._months)!==Do(a)?"-":"",d=Do(this._days)!==Do(a)?"-":"",f=Do(this._milliseconds)!==Do(a)?"-":"",c+"P"+(i?u+i+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+o+"S":"")):"P0D"}var at=dh.prototype;at.isValid=l5;at.abs=Uz;at.add=Vz;at.subtract=Bz;at.as=Hz;at.asMilliseconds=hj;at.asSeconds=Yz;at.asMinutes=Kz;at.asHours=Gz;at.asDays=Zz;at.asWeeks=qz;at.asMonths=Xz;at.asQuarters=Qz;at.asYears=Jz;at.valueOf=e6;at._bubble=Wz;at.clone=t6;at.get=n6;at.milliseconds=r6;at.seconds=s6;at.minutes=i6;at.hours=o6;at.days=a6;at.weeks=u6;at.months=l6;at.years=c6;at.humanize=m6;at.toISOString=hh;at.toString=hh;at.toJSON=hh;at.locale=ej;at.localeData=nj;at.toIsoString=ur("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hh);at.lang=tj;Me("X",0,0,"unix");Me("x",0,0,"valueOf");je("x",ah);je("X",M4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(nt(e))});//! moment.js -be.version="2.30.1";g4(Ct);be.fn=le;be.min=s5;be.max=i5;be.now=o5;be.utc=es;be.unix=Dz;be.months=Mz;be.isDate=Gc;be.locale=xi;be.invalid=rh;be.duration=Dr;be.isMoment=Rr;be.weekdays=Fz;be.parseZone=Iz;be.localeData=zs;be.isDuration=ud;be.monthsShort=Lz;be.weekdaysMin=$z;be.defineLocale=Ev;be.updateLocale=I3;be.locales=M3;be.weekdaysShort=zz;be.normalizeUnits=dr;be.relativeTimeRounding=h6;be.relativeTimeThreshold=p6;be.calendarFormat=P5;be.prototype=le;be.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 g6=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Us=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),y6=async e=>(e.deleted=be.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),Gw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),v6=async e=>{const t=st();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)},x6=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Zw=async e=>await st().collection("access_groups").update(e.id,e),w6=(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}},b6=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Mv=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ga=async e=>{const t=st();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},pj=v.createContext({}),In=()=>v.useContext(pj),_6=({children:e})=>{const[t,n]=v.useReducer(w6,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await g6();n({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await b6();n({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await Gw();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=v.useCallback(async()=>{const u=await Gw();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),i=v.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),o=v.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(pj.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},S6={theme:"system",setTheme:()=>null},mj=v.createContext(S6);function k6({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,i]=v.useState(()=>localStorage.getItem(n)||t);v.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 o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return l.jsx(mj.Provider,{...r,value:o,children:e})}const C6=()=>{const e=v.useContext(mj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function j6(){const{setTheme:e}=C6(),{t}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(YO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(VO,{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(eh,{align:"end",children:[l.jsx(eo,{onClick:()=>e("light"),children:t("theme.light")}),l.jsx(eo,{onClick:()=>e("dark"),children:t("theme.dark")}),l.jsx(eo,{onClick:()=>e("system"),children:t("theme.system")})]})]})}function E6(){const{i18n:e}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(FO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(eh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(eo,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var N6="Separator",qw="horizontal",T6=["horizontal","vertical"],gj=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=qw,...s}=e,i=R6(r)?r:qw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":i,...a,...s,ref:t})});gj.displayName=N6;function R6(e){return T6.includes(e)}var yj=gj;const xr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(yj,{ref:s,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xr.displayName=yj.displayName;const P6="Certimate v0.1.16",vj=()=>{const{t:e}=it();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("document")})]}),l.jsx(xr,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P6})]})]})};function A6(){const e=Dn(),t=Ar(),{t:n}=it();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(iS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),i=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(_6,{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(xn,{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(xn,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(aw,{className:"h-4 w-4"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx($m,{className:"h-4 w-4"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(lw,{className:"h-4 w-4"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(ow,{className:"h-4 w-4"}),n("deployment.log.name")]})]})})]})}),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(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(UO,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(nh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(xn,{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(xn,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(aw,{className:"h-5 w-5"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx($m,{className:"h-5 w-5"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(lw,{className:"h-5 w-5"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(ow,{className:"h-5 w-5"}),n("deployment.log.name")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(j6,{}),l.jsx(E6,{}),l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{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(eh,{align:"end",children:[l.jsx(Jk,{children:n("account")}),l.jsx(eC,{}),l.jsx(eo,{onClick:o,children:n("setting")}),l.jsx(eo,{onClick:i,children:n("logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(_y,{}),l.jsx(vj,{})]})]})]})})})}const Lv=({phase:e,phaseSuccess:t})=>{const{t:n}=it();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:se("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("deploy.progress.check")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:se("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("deploy.progress.apply")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:se("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("deploy.progress.deploy")})]})};var O6="VisuallyHidden",Qc=v.forwardRef((e,t)=>l.jsx(Re.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}}));Qc.displayName=O6;var D6=Qc,[ph,OH]=on("Tooltip",[Ba]),mh=Ba(),xj="TooltipProvider",I6=700,rg="tooltip.open",[M6,Fv]=ph(xj),zv=e=>{const{__scopeTooltip:t,delayDuration:n=I6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(M6,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:i})};zv.displayName=xj;var gh="Tooltip",[L6,yh]=ph(gh),wj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,c=Fv(gh,e.__scopeTooltip),u=mh(t),[d,f]=v.useState(null),h=Wn(),y=v.useRef(0),x=o??c.disableHoverableContent,g=a??c.delayDuration,w=v.useRef(!1),[m=!1,p]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(rg))):c.onClose(),i==null||i(T)}}),b=v.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),_=v.useCallback(()=>{window.clearTimeout(y.current),w.current=!1,p(!0)},[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),p(!1)},[p]),j=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(zy,{...u,children:l.jsx(L6,{scope:t,contentId:h,open:m,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:v.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};wj.displayName=gh;var sg="TooltipTrigger",bj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=yh(sg,n),i=Fv(sg,n),o=mh(n),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx($y,{asChild:!0,...o,children:l.jsx(Re.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&&!i.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)})})});bj.displayName=sg;var F6="TooltipPortal",[DH,z6]=ph(F6,{forceMount:void 0}),Na="TooltipContent",$v=v.forwardRef((e,t)=>{const n=z6(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=yh(Na,e.__scopeTooltip);return l.jsx(an,{present:r||o.open,children:o.disableHoverableContent?l.jsx(_j,{side:s,...i,ref:t}):l.jsx($6,{side:s,...i,ref:t})})}),$6=v.forwardRef((e,t)=>{const n=yh(Na,e.__scopeTooltip),r=Fv(Na,e.__scopeTooltip),s=v.useRef(null),i=Ke(t,s),[o,a]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const w=x.currentTarget,m={x:x.clientX,y:x.clientY},p=W6(m,w.getBoundingClientRect()),b=H6(m,p),_=Y6(g.getBoundingClientRect()),C=G6([...b,..._]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const x=w=>y(w,d),g=w=>y(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,h]),v.useEffect(()=>{if(o){const x=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!K6(m,o);p?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,h]),l.jsx(_j,{...e,ref:i})}),[U6,V6]=ph(gh,{isInside:!1}),_j=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,c=yh(Na,n),u=mh(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(rg,d),()=>document.removeEventListener(rg,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const y=h.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Uy,{"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(jy,{children:r}),l.jsx(U6,{scope:n,isInside:!0,children:l.jsx(D6,{id:c.contentId,role:"tooltip",children:s||r})})]})})});$v.displayName=Na;var Sj="TooltipArrow",B6=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return V6(Sj,n).isInside?null:l.jsx(Vy,{...s,...r,ref:t})});B6.displayName=Sj;function W6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function H6(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 Y6(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 K6(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;ir!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function G6(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Z6(t)}function Z6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 q6=zv,X6=wj,Q6=bj,kj=$v;const J6=q6,Cj=X6,jj=Q6,Ej=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(kj,{ref:r,sideOffset:t,className:se("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}));Ej.displayName=kj.displayName;const Uv=({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(OO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(J6,{children:l.jsxs(Cj,{children:[l.jsx(jj,{asChild:!0,className:"cursor-pointer",children:l.jsx(sw,{size:16,className:"text-red-700"})}),l.jsx(Ej,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(sw,{size:16,className:"text-red-700"})})})},Nj=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:se("mx-auto flex w-full justify-center",e),...t});Nj.displayName="Pagination";const Tj=v.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:se("flex flex-row items-center gap-1",e),...t}));Tj.displayName="PaginationContent";const ig=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:se("",e),...t}));ig.displayName="PaginationItem";const Rj=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:se(Hf({variant:t?"outline":"ghost",size:n}),e),...r});Rj.displayName="PaginationLink";const Pj=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:se("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(IO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Pj.displayName="PaginationEllipsis";const Aj=({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=i(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},o=s();return l.jsx(l.Fragment,{children:l.jsx(Nj,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(Tj,{children:o.map((a,c)=>a==="..."?l.jsx(ig,{children:l.jsx(Pj,{})},c):l.jsx(ig,{children:l.jsx(Rj,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},Ss=({when:e,children:t,fallback:n})=>e?t:n;var Oj="AlertDialog",[e$,IH]=on(Oj,[nC]),Vs=nC(),Dj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(ov,{...r,...n,modal:!0})};Dj.displayName=Oj;var t$="AlertDialogTrigger",Ij=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(av,{...s,...r,ref:t})});Ij.displayName=t$;var n$="AlertDialogPortal",Mj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(lv,{...r,...n})};Mj.displayName=n$;var r$="AlertDialogOverlay",Lj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Wc,{...s,...r,ref:t})});Lj.displayName=r$;var va="AlertDialogContent",[s$,i$]=e$(va),Fj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Vs(n),o=v.useRef(null),a=Ke(t,o),c=v.useRef(null);return l.jsx(YF,{contentName:va,titleName:zj,docsSlug:"alert-dialog",children:l.jsx(s$,{scope:n,cancelRef:c,children:l.jsxs(Hc,{role:"alertdialog",...i,...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(jy,{children:r}),l.jsx(a$,{contentRef:o})]})})})});Fj.displayName=va;var zj="AlertDialogTitle",$j=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Yc,{...s,...r,ref:t})});$j.displayName=zj;var Uj="AlertDialogDescription",Vj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Kc,{...s,...r,ref:t})});Vj.displayName=Uj;var o$="AlertDialogAction",Bj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(th,{...s,...r,ref:t})});Bj.displayName=o$;var Wj="AlertDialogCancel",Hj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=i$(Wj,n),i=Vs(n),o=Ke(t,s);return l.jsx(th,{...i,...r,ref:o})});Hj.displayName=Wj;var a$=({contentRef:e})=>{const t=`\`${va}\` requires a description for the component to be accessible for screen reader users. +be.version="2.30.1";g4(Ct);be.fn=le;be.min=s5;be.max=i5;be.now=o5;be.utc=es;be.unix=Dz;be.months=Mz;be.isDate=Gc;be.locale=xi;be.invalid=rh;be.duration=Dr;be.isMoment=Rr;be.weekdays=Fz;be.parseZone=Iz;be.localeData=zs;be.isDuration=ud;be.monthsShort=Lz;be.weekdaysMin=$z;be.defineLocale=Ev;be.updateLocale=I3;be.locales=M3;be.weekdaysShort=zz;be.normalizeUnits=dr;be.relativeTimeRounding=h6;be.relativeTimeThreshold=p6;be.calendarFormat=P5;be.prototype=le;be.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 g6=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Us=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),y6=async e=>(e.deleted=be.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),Gw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),v6=async e=>{const t=st();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)},x6=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Zw=async e=>await st().collection("access_groups").update(e.id,e),w6=(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}},b6=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Mv=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ga=async e=>{const t=st();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},pj=v.createContext({}),In=()=>v.useContext(pj),_6=({children:e})=>{const[t,n]=v.useReducer(w6,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await g6();n({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await b6();n({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await Gw();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=v.useCallback(async()=>{const u=await Gw();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),i=v.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),o=v.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(pj.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},S6={theme:"system",setTheme:()=>null},mj=v.createContext(S6);function k6({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,i]=v.useState(()=>localStorage.getItem(n)||t);v.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 o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return l.jsx(mj.Provider,{...r,value:o,children:e})}const C6=()=>{const e=v.useContext(mj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function j6(){const{setTheme:e}=C6(),{t}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(YO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(VO,{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(eh,{align:"end",children:[l.jsx(eo,{onClick:()=>e("light"),children:t("theme.light")}),l.jsx(eo,{onClick:()=>e("dark"),children:t("theme.dark")}),l.jsx(eo,{onClick:()=>e("system"),children:t("theme.system")})]})]})}function E6(){const{i18n:e}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(FO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(eh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(eo,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var N6="Separator",qw="horizontal",T6=["horizontal","vertical"],gj=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=qw,...s}=e,i=R6(r)?r:qw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":i,...a,...s,ref:t})});gj.displayName=N6;function R6(e){return T6.includes(e)}var yj=gj;const xr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(yj,{ref:s,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xr.displayName=yj.displayName;const P6="Certimate v0.1.17",vj=()=>{const{t:e}=it();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("document")})]}),l.jsx(xr,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P6})]})]})};function A6(){const e=Dn(),t=Ar(),{t:n}=it();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(iS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),i=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(_6,{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(xn,{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(xn,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(aw,{className:"h-4 w-4"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx($m,{className:"h-4 w-4"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(lw,{className:"h-4 w-4"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(ow,{className:"h-4 w-4"}),n("deployment.log.name")]})]})})]})}),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(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(UO,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(nh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(xn,{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(xn,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(aw,{className:"h-5 w-5"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx($m,{className:"h-5 w-5"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(lw,{className:"h-5 w-5"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(ow,{className:"h-5 w-5"}),n("deployment.log.name")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(j6,{}),l.jsx(E6,{}),l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{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(eh,{align:"end",children:[l.jsx(Jk,{children:n("account")}),l.jsx(eC,{}),l.jsx(eo,{onClick:o,children:n("setting")}),l.jsx(eo,{onClick:i,children:n("logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(_y,{}),l.jsx(vj,{})]})]})]})})})}const Lv=({phase:e,phaseSuccess:t})=>{const{t:n}=it();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:se("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("deploy.progress.check")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:se("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("deploy.progress.apply")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:se("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("deploy.progress.deploy")})]})};var O6="VisuallyHidden",Qc=v.forwardRef((e,t)=>l.jsx(Re.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}}));Qc.displayName=O6;var D6=Qc,[ph,OH]=on("Tooltip",[Ba]),mh=Ba(),xj="TooltipProvider",I6=700,rg="tooltip.open",[M6,Fv]=ph(xj),zv=e=>{const{__scopeTooltip:t,delayDuration:n=I6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(M6,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:i})};zv.displayName=xj;var gh="Tooltip",[L6,yh]=ph(gh),wj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,c=Fv(gh,e.__scopeTooltip),u=mh(t),[d,f]=v.useState(null),h=Wn(),y=v.useRef(0),x=o??c.disableHoverableContent,g=a??c.delayDuration,w=v.useRef(!1),[m=!1,p]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(rg))):c.onClose(),i==null||i(T)}}),b=v.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),_=v.useCallback(()=>{window.clearTimeout(y.current),w.current=!1,p(!0)},[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),p(!1)},[p]),j=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(zy,{...u,children:l.jsx(L6,{scope:t,contentId:h,open:m,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:v.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};wj.displayName=gh;var sg="TooltipTrigger",bj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=yh(sg,n),i=Fv(sg,n),o=mh(n),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx($y,{asChild:!0,...o,children:l.jsx(Re.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&&!i.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)})})});bj.displayName=sg;var F6="TooltipPortal",[DH,z6]=ph(F6,{forceMount:void 0}),Na="TooltipContent",$v=v.forwardRef((e,t)=>{const n=z6(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=yh(Na,e.__scopeTooltip);return l.jsx(an,{present:r||o.open,children:o.disableHoverableContent?l.jsx(_j,{side:s,...i,ref:t}):l.jsx($6,{side:s,...i,ref:t})})}),$6=v.forwardRef((e,t)=>{const n=yh(Na,e.__scopeTooltip),r=Fv(Na,e.__scopeTooltip),s=v.useRef(null),i=Ke(t,s),[o,a]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const w=x.currentTarget,m={x:x.clientX,y:x.clientY},p=W6(m,w.getBoundingClientRect()),b=H6(m,p),_=Y6(g.getBoundingClientRect()),C=G6([...b,..._]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const x=w=>y(w,d),g=w=>y(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,h]),v.useEffect(()=>{if(o){const x=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!K6(m,o);p?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,h]),l.jsx(_j,{...e,ref:i})}),[U6,V6]=ph(gh,{isInside:!1}),_j=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,c=yh(Na,n),u=mh(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(rg,d),()=>document.removeEventListener(rg,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const y=h.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Uy,{"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(jy,{children:r}),l.jsx(U6,{scope:n,isInside:!0,children:l.jsx(D6,{id:c.contentId,role:"tooltip",children:s||r})})]})})});$v.displayName=Na;var Sj="TooltipArrow",B6=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return V6(Sj,n).isInside?null:l.jsx(Vy,{...s,...r,ref:t})});B6.displayName=Sj;function W6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function H6(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 Y6(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 K6(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;ir!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function G6(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Z6(t)}function Z6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.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 q6=zv,X6=wj,Q6=bj,kj=$v;const J6=q6,Cj=X6,jj=Q6,Ej=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(kj,{ref:r,sideOffset:t,className:se("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}));Ej.displayName=kj.displayName;const Uv=({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(OO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(J6,{children:l.jsxs(Cj,{children:[l.jsx(jj,{asChild:!0,className:"cursor-pointer",children:l.jsx(sw,{size:16,className:"text-red-700"})}),l.jsx(Ej,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(sw,{size:16,className:"text-red-700"})})})},Nj=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:se("mx-auto flex w-full justify-center",e),...t});Nj.displayName="Pagination";const Tj=v.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:se("flex flex-row items-center gap-1",e),...t}));Tj.displayName="PaginationContent";const ig=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:se("",e),...t}));ig.displayName="PaginationItem";const Rj=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:se(Hf({variant:t?"outline":"ghost",size:n}),e),...r});Rj.displayName="PaginationLink";const Pj=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:se("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(IO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Pj.displayName="PaginationEllipsis";const Aj=({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=i(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},o=s();return l.jsx(l.Fragment,{children:l.jsx(Nj,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(Tj,{children:o.map((a,c)=>a==="..."?l.jsx(ig,{children:l.jsx(Pj,{})},c):l.jsx(ig,{children:l.jsx(Rj,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},Ss=({when:e,children:t,fallback:n})=>e?t:n;var Oj="AlertDialog",[e$,IH]=on(Oj,[nC]),Vs=nC(),Dj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(ov,{...r,...n,modal:!0})};Dj.displayName=Oj;var t$="AlertDialogTrigger",Ij=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(av,{...s,...r,ref:t})});Ij.displayName=t$;var n$="AlertDialogPortal",Mj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(lv,{...r,...n})};Mj.displayName=n$;var r$="AlertDialogOverlay",Lj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Wc,{...s,...r,ref:t})});Lj.displayName=r$;var va="AlertDialogContent",[s$,i$]=e$(va),Fj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Vs(n),o=v.useRef(null),a=Ke(t,o),c=v.useRef(null);return l.jsx(YF,{contentName:va,titleName:zj,docsSlug:"alert-dialog",children:l.jsx(s$,{scope:n,cancelRef:c,children:l.jsxs(Hc,{role:"alertdialog",...i,...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(jy,{children:r}),l.jsx(a$,{contentRef:o})]})})})});Fj.displayName=va;var zj="AlertDialogTitle",$j=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Yc,{...s,...r,ref:t})});$j.displayName=zj;var Uj="AlertDialogDescription",Vj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Kc,{...s,...r,ref:t})});Vj.displayName=Uj;var o$="AlertDialogAction",Bj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(th,{...s,...r,ref:t})});Bj.displayName=o$;var Wj="AlertDialogCancel",Hj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=i$(Wj,n),i=Vs(n),o=Ke(t,s);return l.jsx(th,{...i,...r,ref:o})});Hj.displayName=Wj;var a$=({contentRef:e})=>{const t=`\`${va}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${va}\` by passing a \`${Uj}\` component as a child, which also benefits sighted users by adding visible context to the dialog. @@ -321,7 +321,7 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE */(function(e,t){(function(n){e.exports=n()})(function(){return function n(r,s,i){function o(u,d){if(!s[u]){if(!r[u]){var f=typeof Bu=="function"&&Bu;if(!d&&f)return f(u,!0);if(a)return a(u,!0);var h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h}var y=s[u]={exports:{}};r[u][0].call(y.exports,function(x){var g=r[u][1][x];return o(g||x)},y,y.exports,n,r,s,i)}return s[u].exports}for(var a=typeof Bu=="function"&&Bu,c=0;c>2,y=(3&u)<<4|d>>4,x=1>6:64,g=2>4,d=(15&h)<<4|(y=a.indexOf(c.charAt(g++)))>>2,f=(3&y)<<6|(x=a.indexOf(c.charAt(g++))),p[w++]=u,y!==64&&(p[w++]=d),x!==64&&(p[w++]=f);return p}},{"./support":30,"./utils":32}],2:[function(n,r,s){var i=n("./external"),o=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(d,f,h,y,x){this.compressedSize=d,this.uncompressedSize=f,this.crc32=h,this.compression=y,this.compressedContent=x}u.prototype={getContentWorker:function(){var d=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(d,f,h){return d.pipe(new a).pipe(new c("uncompressedSize")).pipe(f.compressWorker(h)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var i=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var i=n("./utils"),o=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();r.exports=function(a,c){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(u,d,f,h){var y=o,x=h+f;u^=-1;for(var g=h;g>>8^y[255&(u^d[g])];return-1^u}(0|c,a,a.length,0):function(u,d,f,h){var y=o,x=h+f;u^=-1;for(var g=h;g>>8^y[255&(u^d.charCodeAt(g))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,r,s){var i=null;i=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:i}},{lie:37}],7:[function(n,r,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=i?"uint8array":"array";function d(f,h){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=h,this.meta={}}s.magic="\b\0",a.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(h){f.push({data:h,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function i(y,x){var g,w="";for(g=0;g>>=8;return w}function o(y,x,g,w,m,p){var b,_,C=y.file,j=y.compression,T=p!==u.utf8encode,P=a.transformTo("string",p(C.name)),A=a.transformTo("string",u.utf8encode(C.name)),D=C.comment,G=a.transformTo("string",p(D)),N=a.transformTo("string",u.utf8encode(D)),F=A.length!==C.name.length,S=N.length!==D.length,U="",J="",z="",W=C.dir,I=C.date,X={crc32:0,compressedSize:0,uncompressedSize:0};x&&!g||(X.crc32=y.crc32,X.compressedSize=y.compressedSize,X.uncompressedSize=y.uncompressedSize);var $=0;x&&($|=8),T||!F&&!S||($|=2048);var B=0,he=0;W&&(B|=16),m==="UNIX"?(he=798,B|=function(ie,De){var pe=ie;return ie||(pe=De?16893:33204),(65535&pe)<<16}(C.unixPermissions,W)):(he=20,B|=function(ie){return 63&(ie||0)}(C.dosPermissions)),b=I.getUTCHours(),b<<=6,b|=I.getUTCMinutes(),b<<=5,b|=I.getUTCSeconds()/2,_=I.getUTCFullYear()-1980,_<<=4,_|=I.getUTCMonth()+1,_<<=5,_|=I.getUTCDate(),F&&(J=i(1,1)+i(d(P),4)+A,U+="up"+i(J.length,2)+J),S&&(z=i(1,1)+i(d(G),4)+N,U+="uc"+i(z.length,2)+z);var re="";return re+=` -\0`,re+=i($,2),re+=j.magic,re+=i(b,2),re+=i(_,2),re+=i(X.crc32,4),re+=i(X.compressedSize,4),re+=i(X.uncompressedSize,4),re+=i(P.length,2),re+=i(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+re+P+U,dirRecord:f.CENTRAL_FILE_HEADER+i(he,2)+re+i(G.length,2)+"\0\0\0\0"+i(B,4)+i(w,4)+P+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(y,x,g,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=w,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(y){var x=y.meta.percent||0,g=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,c.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-w-1))/g:100}}))},h.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var x=this.streamFiles&&!y.file.dir;if(x){var g=o(y,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(y){this.accumulate=!1;var x=this.streamFiles&&!y.file.dir,g=o(y,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+i(w.crc32,4)+i(w.compressedSize,4)+i(w.uncompressedSize,4)}(y),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var y=this.bytesWritten,x=0;x=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(n,r,s){var i=n("./Uint8ArrayReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var i=n("./DataReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var i=n("./ArrayReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var i=n("../utils"),o=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=i.getTypeOf(f);return i.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new u(f):o.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,s){var i=n("./GenericWorker"),o=n("../utils");function a(c){i.call(this,"ConvertWorker to "+c),this.destType=c}o.inherits(a,i),a.prototype.processChunk=function(c){this.push({data:o.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var i=n("./GenericWorker"),o=n("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,i),a.prototype.processChunk=function(c){this.streamInfo.crc32=o(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var i=n("../utils"),o=n("./GenericWorker");function a(c){o.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(a,o),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}o.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var i=n("../utils"),o=n("./GenericWorker");function a(c){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var c=0;c "+o:o}},r.exports=i},{}],29:[function(n,r,s){var i=n("../utils"),o=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,g){return new d.Promise(function(w,m){var p=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){p.push(j),g&&g(T)}).on("error",function(j){p=[],m(j)}).on("end",function(){try{var j=function(T,P,A){switch(T){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),A);case"base64":return c.encode(P);default:return i.transformTo(T,P)}}(_,function(T,P){var A,D=0,G=null,N=0;for(A=0;A"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var i=n("./utils"),o=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(y){return o.nodebuffer?a.newBufferFrom(y,"utf-8"):function(x){var g,w,m,p,b,_=x.length,C=0;for(p=0;p<_;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<_&&(64512&(m=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),p++),C+=w<128?1:w<2048?2:w<65536?3:4;for(g=o.uint8array?new Uint8Array(C):new Array(C),p=b=0;b>>6:(w<65536?g[b++]=224|w>>>12:(g[b++]=240|w>>>18,g[b++]=128|w>>>12&63),g[b++]=128|w>>>6&63),g[b++]=128|63&w);return g}(y)},s.utf8decode=function(y){return o.nodebuffer?i.transformTo("nodebuffer",y).toString("utf-8"):function(x){var g,w,m,p,b=x.length,_=new Array(2*b);for(g=w=0;g>10&1023,_[w++]=56320|1023&m)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),i.applyFromCharCode(_)}(y=i.transformTo(o.uint8array?"uint8array":"array",y))},i.inherits(f,c),f.prototype.processChunk=function(y){var x=i.transformTo(o.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=x;(x=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),x.set(g,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(p,b){var _;for((b=b||p.length)>p.length&&(b=p.length),_=b-1;0<=_&&(192&p[_])==128;)_--;return _<0||_===0?b:_+u[p[_]]>b?_:b}(x),m=x;w!==x.length&&(o.uint8array?(m=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(m=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(m),meta:y.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,i.inherits(h,c),h.prototype.processChunk=function(y){this.push({data:s.utf8encode(y.data),meta:y.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var i=n("./support"),o=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(g){return g}function d(g,w){for(var m=0;m>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var x,g,w,m=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4>>6:(y<65536?h[w++]=224|y>>>12:(h[w++]=240|y>>>18,h[w++]=128|y>>>12&63),h[w++]=128|y>>>6&63),h[w++]=128|63&y);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new i.Buf8(f.length),y=0,x=h.length;y>10&1023,p[x++]=56320|1023&g)}return d(p,x)},s.utf8border=function(f,h){var y;for((h=h||f.length)>f.length&&(h=f.length),y=h-1;0<=y&&(192&f[y])==128;)y--;return y<0||y===0?h:y+c[f[y]]>h?y:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(i,o,a,c){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3>>1:o>>>1;a[c]=o}return a}();r.exports=function(o,a,c,u){var d=i,f=u+c;o^=-1;for(var h=u;h>>8^d[255&(o^a[h])];return-1^o}},{}],46:[function(n,r,s){var i,o=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,y=0,x=-2,g=-1,w=4,m=2,p=8,b=9,_=286,C=30,j=19,T=2*_+1,P=15,A=3,D=258,G=D+A+1,N=42,F=113,S=1,U=2,J=3,z=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4E.avail_out&&(Z=E.avail_out),Z!==0&&(o.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function he(E,ee){E.pending_buf[E.pending++]=ee}function re(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function ie(E,ee){var Z,O,k=E.max_chain_length,R=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,me=E.strstart+D,Ye=Y[R+M-1],$e=Y[R+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===$e&&Y[Z+M-1]===Ye&&Y[Z]===Y[R]&&Y[++Z]===Y[R+1]){R+=2,Z++;do;while(Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&RL&&--k!=0);return M<=E.lookahead?M:E.lookahead}function De(E){var ee,Z,O,k,R,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(o.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;O=E.head[--ee],E.head[ee]=te<=O?O-te:0,--Z;);for(ee=Z=te;O=E.prev[--ee],E.prev[ee]=te<=O?O-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y=A)for(R=E.strstart-E.insert,E.ins_h=E.window[R],E.ins_h=(E.ins_h<=A&&(E.ins_h=(E.ins_h<=A)if(O=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<=A&&(E.ins_h=(E.ins_h<=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,O=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(De(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var O=E.block_start+Z;if((E.strstart===0||E.strstart>=O)&&(E.lookahead=E.strstart-O,E.strstart=O,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:z):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Te(4,4,8,4,pe),new Te(4,5,16,8,pe),new Te(4,6,32,32,pe),new Te(4,4,16,16,_e),new Te(8,16,32,32,_e),new Te(8,16,128,128,_e),new Te(8,32,128,256,_e),new Te(32,128,258,1024,_e),new Te(32,258,258,4096,_e)],s.deflateInit=function(E,ee){return rt(E,ee,p,15,8,0)},s.deflateInit2=rt,s.deflateReset=Pe,s.deflateResetKeep=Ie,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,y):x},s.deflate=function(E,ee){var Z,O,k,R;if(!E||!E.state||5>8&255),he(O,O.gzhead.time>>16&255),he(O,O.gzhead.time>>24&255),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(he(O,255&O.gzhead.extra.length),he(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(E.adler=u(E.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(he(O,0),he(O,0),he(O,0),he(O,0),he(O,0),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,3),O.status=F);else{var M=p+(O.w_bits-8<<4)<<8;M|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(M|=32),M+=31-M%31,O.status=F,re(O,M),O.strstart!==0&&(re(O,E.adler>>>16),re(O,65535&E.adler)),E.adler=1}if(O.status===69)if(O.gzhead.extra){for(k=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending!==O.pending_buf_size));)he(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindexk&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindexk&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&$(E),O.pending+2<=O.pending_buf_size&&(he(O,255&E.adler),he(O,E.adler>>8&255),E.adler=0,O.status=F)):O.status=F),O.pending!==0){if($(E),E.avail_out===0)return O.last_flush=-1,y}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(O.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||O.lookahead!==0||ee!==f&&O.status!==666){var K=O.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(De(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):O.strategy===3?function(L,Y){for(var Q,te,me,Ye,$e=L.window;;){if(L.lookahead<=D){if(De(L),L.lookahead<=D&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):i[O.level].func(O,ee);if(K!==J&&K!==z||(O.status=666),K===S||K===J)return E.avail_out===0&&(O.last_flush=-1),y;if(K===U&&(ee===1?a._tr_align(O):ee!==5&&(a._tr_stored_block(O,0,0,!1),ee===3&&(X(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),$(E),E.avail_out===0))return O.last_flush=-1,y}return ee!==h?y:O.wrap<=0?1:(O.wrap===2?(he(O,255&E.adler),he(O,E.adler>>8&255),he(O,E.adler>>16&255),he(O,E.adler>>24&255),he(O,255&E.total_in),he(O,E.total_in>>8&255),he(O,E.total_in>>16&255),he(O,E.total_in>>24&255)):(re(O,E.adler>>>16),re(O,65535&E.adler)),$(E),0=Z.w_size&&(R===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new o.Buf8(Z.w_size),o.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,De(Z);Z.lookahead>=A;){for(O=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<>>=A=P>>>24,b-=A,(A=P>>>16&255)===0)U[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=_[(65535&P)+(p&(1<>>=A,b-=A),b<15&&(p+=S[c++]<>>=A=P>>>24,b-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=C[(65535&P)+(p&(1<>>=A,b-=A,(A=d-f)>3,p&=(1<<(b-=D<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var F;return N&&N.state?(F=N.state,N.total_in=N.total_out=F.total=0,N.msg="",F.wrap&&(N.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(g),F.distcode=F.distdyn=new i.Buf32(w),F.sane=1,F.back=-1,h):y}function _(N){var F;return N&&N.state?((F=N.state).wsize=0,F.whave=0,F.wnext=0,b(N)):y}function C(N,F){var S,U;return N&&N.state?(U=N.state,F<0?(S=0,F=-F):(S=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=z.wsize?(i.arraySet(z.window,F,S-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(U<(J=z.wsize-z.wnext)&&(J=U),i.arraySet(z.window,F,S-U,J,z.wnext),(U-=J)?(i.arraySet(z.window,F,S-U,U,0),z.wnext=U,z.whave=z.wsize):(z.wnext+=J,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,S.check=a(S.check,R,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<>8&1),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<>>8&255,R[2]=$>>>16&255,R[3]=$>>>24&255,S.check=a(S.check,R,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[z++]<>8),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[z++]<>>8&255,S.check=a(S.check,R,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(ie=S.length)&&(ie=I),ie&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),i.arraySet(S.head.extra,U,z,ie,E)),512&S.flags&&(S.check=a(S.check,U,ie,z)),I-=ie,z+=ie,S.length-=ie),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(ie=0;E=U[z+ie++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&ie>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[z++]<>>=1)){case 0:S.mode=14;break;case 1:if(D(S),S.mode=20,F!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[z++]<>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,F===6)break e;case 15:S.mode=16;case 16:if(ie=S.length){if(I>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=_e,B-=_e,S.lens[S.have++]=Fe;else{if(Fe===16){for(O=_e+2;B>>=_e,B-=_e,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],ie=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(O=_e+3;B>>=_e)),$>>>=3,B-=3}else{for(O=_e+7;B>>=_e)),$>>>=7,B-=7}if(S.have+ie>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;ie--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,F===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=z,N.avail_in=I,S.hold=$,S.bits=B,c(N,re),W=N.next_out,J=N.output,X=N.avail_out,z=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Te=(k=S.lencode[$&(1<>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,S.length=Fe,Te===0){S.mode=26;break}if(32&Te){S.back=-1,S.mode=12;break}if(64&Te){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Te,S.mode=22;case 22:if(S.extra){for(O=S.extra;B>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Te=(k=S.distcode[$&(1<>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,64&Te){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Te,S.mode=24;case 24:if(S.extra){for(O=S.extra;B>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(ie=re-X,S.offset>ie){if((ie=S.offset-ie)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}De=ie>S.wnext?(ie-=S.wnext,S.wsize-ie):S.wnext-ie,ie>S.length&&(ie=S.length),pe=S.window}else pe=J,De=W-S.offset,ie=S.length;for(XT?(A=De[pe+w[F]],B[he+w[F]]):(A=96,0),p=1<>W)+(b-=p)]=P<<24|A<<16|D|0,b!==0;);for(p=1<>=1;if(p!==0?($&=p-1,$+=p):$=0,F++,--re[N]==0){if(N===U)break;N=f[h+w[F]]}if(J>>7)]}function he(k,R){k.pending_buf[k.pending++]=255&R,k.pending_buf[k.pending++]=R>>>8&255}function re(k,R,M){k.bi_valid>m-M?(k.bi_buf|=R<>m-k.bi_valid,k.bi_valid+=M-m):(k.bi_buf|=R<>>=1,M<<=1,0<--R;);return M>>>1}function pe(k,R,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=R;L++){var te=k[2*L+1];te!==0&&(k[2*L]=De(Y[te]++,te))}}function _e(k){var R;for(R=0;R>1;1<=M;M--)Ie(k,Y,M);for(L=me;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ie(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Ie(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function($e,Et){var Jn,Yt,rs,lt,ss,is,er=Et.dyn_tree,ou=Et.max_code,au=Et.stat_desc.static_tree,ko=Et.stat_desc.has_stree,lu=Et.stat_desc.extra_bits,Co=Et.stat_desc.extra_base,Mr=Et.stat_desc.max_length,Ys=0;for(lt=0;lt<=w;lt++)$e.bl_count[lt]=0;for(er[2*$e.heap[$e.heap_max]+1]=0,Jn=$e.heap_max+1;Jn>=7;L>>=1)if(1&Ye&&te.dyn_ltree[2*me]!==0)return o;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(me=32;me>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&R!==-1?O(k,R,M,K):k.strategy===4||Y===L?(re(k,2+(K?1:0),3),Pe(k,G,N)):(re(k,4+(K?1:0),3),function(te,me,Ye,$e){var Et;for(re(te,me-257,5),re(te,Ye-1,5),re(te,$e-4,4),Et=0;Et<$e;Et++)re(te,te.bl_tree[2*D[Et]+1],3);ee(te,te.dyn_ltree,me-1),ee(te,te.dyn_dtree,Ye-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Pe(k,k.dyn_ltree,k.dyn_dtree)),_e(k),K&&Te(k)},s._tr_tally=function(k,R,M){return k.pending_buf[k.d_buf+2*k.last_lit]=R>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&R,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,R===0?k.dyn_ltree[2*M]++:(k.matches++,R--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(R)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){re(k,2,3),ie(k,b,G),function(R){R.bi_valid===16?(he(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,s){(function(i){(function(o,a){if(!o.setImmediate){var c,u,d,f,h=1,y={},x=!1,g=o.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(o);w=w&&w.setTimeout?w:o,c={}.toString.call(o.process)==="[object process]"?function(_){process.nextTick(function(){p(_)})}:function(){if(o.postMessage&&!o.importScripts){var _=!0,C=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",b,!1):o.attachEvent("onmessage",b),function(_){o.postMessage(f+_,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){p(_.data)},function(_){d.port2.postMessage(_)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(_){var C=g.createElement("script");C.onreadystatechange=function(){p(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(p,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j"u"?i===void 0?this:i:self)}).call(this,typeof hu<"u"?hu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(NE);var B$=NE.exports;const W$=Sf(B$);function H$(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const Y$=async(e,t)=>{const n=new W$;t.forEach(i=>{n.file(i.name,i.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},Ta=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},K$=e=>Ta(e).split(" ")[0];function TE(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${i}:${o}:${a}`}const G$=async e=>{let t=1;e.page&&(t=e.page);let n=2;e.perPage&&(n=e.perPage);const r=st();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=r.filter("expiredAt<{:expiredAt}",{expiredAt:TE(15)})),r.collection("domains").getList(t,n,{sort:"-created",expand:"lastDeployment",filter:s})},Z$=async()=>{const e=st(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:TE(15)})}),r=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},q$=async e=>await st().collection("domains").getOne(e),cg=async e=>e.id?await st().collection("domains").update(e.id,e):await st().collection("domains").create(e),X$=async e=>await st().collection("domains").delete(e),Q$=(e,t)=>st().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),J$=e=>{st().collection("domains").unsubscribe(e)},e8=()=>{const e=Ir(),t=Dn(),{t:n}=it(),r=Ar(),s=new URLSearchParams(r.search),i=s.get("page"),o=s.get("state"),[a,c]=v.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},y=async _=>{try{await X$(_),g(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,g]=v.useState([]);v.useEffect(()=>{(async()=>{const C=await G$({page:i?Number(i):1,perPage:10,state:o||""});g(C.items),c(C.totalPages)})()},[i,o]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await cg(T);const P=x.map(A=>A.id===_?{...A,checked:!j}:A);g(P)},m=async _=>{try{J$(_.id),Q$(_.id,C=>{console.log(C);const j=x.map(T=>T.id===C.id?{...C}:T);g(j)}),_.rightnow=!0,await cg(_),e.toast({title:n("operation.succeed"),description:n("domain.management.start.deploy.succeed.tips")})}catch{e.toast({title:n("domain.management.execution.failed"),description:l.jsxs(mD,{i18nKey:"domain.management.execution.failed.tips",children:["text1",l.jsx(xn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},p=async _=>{await m({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await Y$(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Zv,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.management.name")}),l.jsx(Ue,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-36",children:n("domain")}),l.jsx("div",{className:"w-40",children:n("domain.management.expiry.date")}),l.jsx("div",{className:"w-32",children:n("domain.management.last.execution.status")}),l.jsx("div",{className:"w-64",children:n("domain.management.last.execution.stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.management.last.execution.time")}),l.jsx("div",{className:"w-24",children:n("domain.management.enable")}),l.jsx("div",{className:"grow",children:n("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:n("domain")}),x.map(_=>{var C,j,T,P;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>l.jsxs(l.Fragment,{children:[A,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.management.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.management.expiry.date2",{date:K$(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Uv,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(Lv,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(P=_.expand.lastDeployment)==null?void 0:P.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ta(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(zv,{children:l.jsxs(Cj,{children:[l.jsx(jj,{children:l.jsx(Jc,{checked:_.enabled,onCheckedChange:()=>{w(_.id)}})}),l.jsx($v,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("disable"):n("enable")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>h(_.id),children:n("deployment.log.name")}),l.jsxs(Ss,{when:!!_.enabled,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>m(_),children:n("domain.management.start.deploying")})]}),l.jsxs(Ss,{when:!!(_.enabled&&_.deployed),children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>p(_),children:n("domain.management.forced.deployment")})]}),l.jsxs(Ss,{when:!!_.expiredAt,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:n("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{children:n("domain.delete")}),l.jsx(_h,{children:n("domain.management.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{children:n("cancel")}),l.jsx(Sh,{onClick:()=>{y(_.id)},children:n("confirm")})]})]})]}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>f(_.id),children:n("edit")})]})]})]},_.id)}),l.jsx(Aj,{totalPages:a,currentPage:i?Number(i):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx($m,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.management.empty")}),l.jsx(Ue,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var eu=e=>e.type==="checkbox",na=e=>e instanceof Date,bn=e=>e==null;const RE=e=>typeof e=="object";var Xt=e=>!bn(e)&&!Array.isArray(e)&&RE(e)&&!na(e),PE=e=>Xt(e)&&e.target?eu(e.target)?e.target.checked:e.target.value:e,t8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,AE=(e,t)=>e.has(t8(t)),n8=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},qv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(qv&&(e instanceof Blob||e instanceof FileList))&&(n||Xt(e)))if(t=n?[]:{},!n&&!n8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Nn(e[r]));else return e;return t}var Eh=e=>Array.isArray(e)?e.filter(Boolean):[],$t=e=>e===void 0,de=(e,t,n)=>{if(!t||!Xt(e))return n;const r=Eh(t.split(/[,[\].]+?/)).reduce((s,i)=>bn(s)?s:s[i],e);return $t(r)||r===e?$t(e[t])?n:e[t]:r},Br=e=>typeof e=="boolean",Xv=e=>/^\w*$/.test(e),OE=e=>Eh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pt=(e,t,n)=>{let r=-1;const s=Xv(t)?[t]:OE(t),i=s.length,o=i-1;for(;++rWe.useContext(DE),r8=e=>{const{children:t,...n}=e;return We.createElement(DE.Provider,{value:n},t)};var IE=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==wr.all&&(t._proxyFormState[o]=!r||wr.all),n&&(n[o]=!0),e[o]}});return s},Fn=e=>Xt(e)&&!Object.keys(e).length,ME=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Fn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||wr.all))},Ul=e=>Array.isArray(e)?e:[e],LE=(e,t,n)=>!e||!t||e===t||Ul(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Qv(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function s8(e){const t=Nh(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Qv({disabled:r,next:f=>c.current&&LE(d.current,f.name,i)&&ME(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),IE(o,n,u.current,!1)}var Hr=e=>typeof e=="string",FE=(e,t,n,r,s)=>Hr(e)?(r&&t.watch.add(e),de(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),de(n,i))):(r&&(t.watchAll=!0),n);function i8(e){const t=Nh(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=We.useRef(r);a.current=r,Qv({disabled:i,subject:n._subjects.values,next:d=>{LE(a.current,d.name,o)&&u(Nn(FE(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function o8(e){const t=Nh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=AE(s._names.array,n),a=i8({control:s,name:n,defaultValue:de(s._formValues,n,de(s._defaultValues,n,e.defaultValue)),exact:!0}),c=s8({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...Br(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||i,f=(h,y)=>{const x=de(s._fields,h);x&&x._f&&(x._f.mount=y)};if(f(n,!0),d){const h=Nn(de(s._options.defaultValues,n));pt(s._defaultValues,n,h),$t(de(s._formValues,n))&&pt(s._formValues,n,h)}return()=>{(o?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,o,i]),We.useEffect(()=>{de(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:de(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Br(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:PE(d),name:n},type:tf.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,n),name:n},type:tf.BLUR}),[n,s]),ref:d=>{const f=de(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,n)},error:{enumerable:!0,get:()=>de(c.errors,n)}})}}const a8=e=>e.render(o8(e));var zE=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Jw=e=>({isOnSubmit:!e||e===wr.onSubmit,isOnBlur:e===wr.onBlur,isOnChange:e===wr.onChange,isOnAll:e===wr.all,isOnTouch:e===wr.onTouched}),e1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Vl=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=de(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)break;if(o.ref&&t(o.ref,o.name)&&!r)break;Vl(a,t)}else Xt(a)&&Vl(a,t)}}};var l8=(e,t,n)=>{const r=Ul(de(e,n));return pt(r,"root",t[n]),pt(e,n,r),e},Jv=e=>e.type==="file",ui=e=>typeof e=="function",nf=e=>{if(!qv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pd=e=>Hr(e),ex=e=>e.type==="radio",rf=e=>e instanceof RegExp;const t1={value:!1,isValid:!1},n1={value:!0,isValid:!0};var $E=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?n1:{value:e[0].value,isValid:!0}:n1:t1}return t1};const r1={isValid:!1,value:null};var UE=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,r1):r1;function s1(e,t,n="validate"){if(pd(e)||Array.isArray(e)&&e.every(pd)||Br(e)&&!e)return{type:n,message:pd(e)?e:"",ref:t}}var Io=e=>Xt(e)&&!rf(e)?e:{value:e,message:""},i1=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:y,name:x,valueAsNumber:g,mount:w,disabled:m}=e._f,p=de(t,x);if(!w||m)return{};const b=o?o[0]:i,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Br(N)?"":N||""),b.reportValidity())},C={},j=ex(i),T=eu(i),P=j||T,A=(g||Jv(i))&&$t(i.value)&&$t(p)||nf(i)&&i.value===""||p===""||Array.isArray(p)&&!p.length,D=zE.bind(null,x,n,C),G=(N,F,S,U=cs.maxLength,J=cs.minLength)=>{const z=N?F:S;C[x]={type:N?U:J,message:z,ref:i,...D(N?U:J,z)}};if(s?!Array.isArray(p)||!p.length:a&&(!P&&(A||bn(p))||Br(p)&&!p||T&&!$E(o).isValid||j&&!UE(o).isValid)){const{value:N,message:F}=pd(a)?{value:!!a,message:a}:Io(a);if(N&&(C[x]={type:cs.required,message:F,ref:b,...D(cs.required,F)},!n))return _(F),C}if(!A&&(!bn(d)||!bn(f))){let N,F;const S=Io(f),U=Io(d);if(!bn(p)&&!isNaN(p)){const J=i.valueAsNumber||p&&+p;bn(S.value)||(N=J>S.value),bn(U.value)||(F=Jnew Date(new Date().toDateString()+" "+X),W=i.type=="time",I=i.type=="week";Hr(S.value)&&p&&(N=W?z(p)>z(S.value):I?p>S.value:J>new Date(S.value)),Hr(U.value)&&p&&(F=W?z(p)+N.value,U=!bn(F.value)&&p.length<+F.value;if((S||U)&&(G(S,N.message,F.message),!n))return _(C[x].message),C}if(h&&!A&&Hr(p)){const{value:N,message:F}=Io(h);if(rf(N)&&!p.match(N)&&(C[x]={type:cs.pattern,message:F,ref:i,...D(cs.pattern,F)},!n))return _(F),C}if(y){if(ui(y)){const N=await y(p,t),F=s1(N,b);if(F&&(C[x]={...F,...D(cs.validate,F.message)},!n))return _(F.message),C}else if(Xt(y)){let N={};for(const F in y){if(!Fn(N)&&!n)break;const S=s1(await y[F](p,t),b,F);S&&(N={...S,...D(F,S.message)},_(S.message),n&&(C[x]=N))}if(!Fn(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function c8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},sf=e=>bn(e)||!RE(e);function qi(e,t){if(sf(e)||sf(t))return e===t;if(na(e)&&na(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(na(i)&&na(o)||Xt(i)&&Xt(o)||Array.isArray(i)&&Array.isArray(o)?!qi(i,o):i!==o)return!1}}return!0}var VE=e=>e.type==="select-multiple",d8=e=>ex(e)||eu(e),Fp=e=>nf(e)&&e.isConnected,BE=e=>{for(const t in e)if(ui(e[t]))return!0;return!1};function of(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const r in e)Array.isArray(e[r])||Xt(e[r])&&!BE(e[r])?(t[r]=Array.isArray(e[r])?[]:{},of(e[r],t[r])):bn(e[r])||(t[r]=!0);return t}function WE(e,t,n){const r=Array.isArray(e);if(Xt(e)||r)for(const s in e)Array.isArray(e[s])||Xt(e[s])&&!BE(e[s])?$t(t)||sf(n[s])?n[s]=Array.isArray(e[s])?of(e[s],[]):{...of(e[s])}:WE(e[s],bn(t)?{}:t[s],n[s]):n[s]=!qi(e[s],t[s]);return n}var Wu=(e,t)=>WE(e,t,of(t)),HE=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$t(e)?e:t?e===""?NaN:e&&+e:n&&Hr(e)?new Date(e):r?r(e):e;function zp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Jv(t)?t.files:ex(t)?UE(e.refs).value:VE(t)?[...t.selectedOptions].map(({value:n})=>n):eu(t)?$E(e.refs).value:HE($t(t.value)?e.ref.value:t.value,e)}var f8=(e,t,n,r)=>{const s={};for(const i of e){const o=de(t,i);o&&pt(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},fl=e=>$t(e)?e:rf(e)?e.source:Xt(e)?rf(e.value)?e.value.source:e.value:e,h8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function o1(e,t,n){const r=de(e,n);if(r||Xv(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=de(t,i),a=de(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var p8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,m8=(e,t)=>!Eh(de(e,t)).length&&Kt(e,t);const g8={mode:wr.onSubmit,reValidateMode:wr.onChange,shouldFocusError:!0};function y8(e={}){let t={...g8,...e},n={submitCount:0,isDirty:!1,isLoading:ui(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Xt(t.defaultValues)||Xt(t.values)?Nn(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Nn(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Lp(),array:Lp(),state:Lp()},h=Jw(t.mode),y=Jw(t.reValidateMode),x=t.criteriaMode===wr.all,g=k=>R=>{clearTimeout(u),u=setTimeout(k,R)},w=async k=>{if(d.isValid||k){const R=t.resolver?Fn((await P()).errors):await D(r,!0);R!==n.isValid&&f.state.next({isValid:R})}},m=(k,R)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(R?pt(n.validatingFields,M,R):Kt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Fn(n.validatingFields)}))},p=(k,R=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(o.action=!0,Y&&Array.isArray(de(r,k))){const Q=M(de(r,k),K.argA,K.argB);L&&pt(r,k,Q)}if(Y&&Array.isArray(de(n.errors,k))){const Q=M(de(n.errors,k),K.argA,K.argB);L&&pt(n.errors,k,Q),m8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(de(n.touchedFields,k))){const Q=M(de(n.touchedFields,k),K.argA,K.argB);L&&pt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=Wu(s,i)),f.state.next({name:k,isDirty:N(k,R),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else pt(i,k,R)},b=(k,R)=>{pt(n.errors,k,R),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,R,M,K)=>{const L=de(r,k);if(L){const Y=de(i,k,$t(M)?de(s,k):M);$t(Y)||K&&K.defaultChecked||R?pt(i,k,R?Y:zp(L._f)):U(k,Y),o.mount&&w()}},j=(k,R,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},me=!!(de(r,k)&&de(r,k)._f&&de(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ye=me||qi(de(s,k),R);Q=!!(!me&&de(n.dirtyFields,k)),Ye||me?Kt(n.dirtyFields,k):pt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ye}if(M){const Ye=de(n.touchedFields,k);Ye||(pt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ye!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,R,M,K)=>{const L=de(n.errors,k),Y=d.isValid&&Br(R)&&n.isValid!==R;if(e.delayError&&M?(c=g(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?pt(n.errors,k,M):Kt(n.errors,k)),(M?!qi(L,M):L)||!Fn(K)||Y){const Q={...K,...Y&&Br(R)?{isValid:R}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},P=async k=>{m(k,!0);const R=await t.resolver(i,t.context,f8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(k),R},A=async k=>{const{errors:R}=await P(k);if(k)for(const M of k){const K=de(R,M);K?pt(n.errors,M,K):Kt(n.errors,M)}else n.errors=R;return R},D=async(k,R,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);m([K],!0);const me=await i1(L,i,x,t.shouldUseNativeValidation&&!R,te);if(m([K]),me[Y.name]&&(M.valid=!1,R))break;!R&&(de(me,Y.name)?te?l8(n.errors,me,Y.name):pt(n.errors,Y.name,me[Y.name]):Kt(n.errors,Y.name))}Q&&await D(Q,R,M)}}return M.valid},G=()=>{for(const k of a.unMount){const R=de(r,k);R&&(R._f.refs?R._f.refs.every(M=>!Fp(M)):!Fp(R._f.ref))&&De(k)}a.unMount=new Set},N=(k,R)=>(k&&R&&pt(i,k,R),!qi($(),s)),F=(k,R,M)=>FE(k,a,{...o.mount?i:$t(R)?s:Hr(k)?{[k]:R}:R},M,R),S=k=>Eh(de(o.mount?i:s,k,e.shouldUnregister?de(s,k,[]):[])),U=(k,R,M={})=>{const K=de(r,k);let L=R;if(K){const Y=K._f;Y&&(!Y.disabled&&pt(i,k,HE(R,Y)),L=nf(Y.ref)&&bn(R)?"":R,VE(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?eu(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):Jv(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...i}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,R,M)=>{for(const K in R){const L=R[K],Y=`${k}.${K}`,Q=de(r,Y);(a.array.has(k)||!sf(L)||Q&&!Q._f)&&!na(L)?J(Y,L,M):U(Y,L,M)}},z=(k,R,M={})=>{const K=de(r,k),L=a.array.has(k),Y=Nn(R);pt(i,k,Y),L?(f.array.next({name:k,values:{...i}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:Wu(s,i),isDirty:N(k,Y)})):K&&!K._f&&!bn(Y)?J(k,Y,M):U(k,Y,M),e1(k,a)&&f.state.next({...n}),f.values.next({name:o.mount?k:void 0,values:{...i}})},W=async k=>{o.mount=!0;const R=k.target;let M=R.name,K=!0;const L=de(r,M),Y=()=>R.type?zp(L._f):PE(k),Q=te=>{K=Number.isNaN(te)||te===de(i,M,te)};if(L){let te,me;const Ye=Y(),$e=k.type===tf.BLUR||k.type===tf.FOCUS_OUT,Et=!h8(L._f)&&!t.resolver&&!de(n.errors,M)&&!L._f.deps||p8($e,de(n.touchedFields,M),n.isSubmitted,y,h),Jn=e1(M,a,$e);pt(i,M,Ye),$e?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ye,$e,!1),rs=!Fn(Yt)||Jn;if(!$e&&f.values.next({name:M,type:k.type,values:{...i}}),Et)return d.isValid&&w(),rs&&f.state.next({name:M,...Jn?{}:Yt});if(!$e&&Jn&&f.state.next({...n}),t.resolver){const{errors:lt}=await P([M]);if(Q(Ye),K){const ss=o1(n.errors,r,M),is=o1(lt,r,ss.name||M);te=is.error,M=is.name,me=Fn(lt)}}else m([M],!0),te=(await i1(L,i,x,t.shouldUseNativeValidation))[M],m([M]),Q(Ye),K&&(te?me=!1:d.isValid&&(me=await D(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,me,te,Yt))}},I=(k,R)=>{if(de(n.errors,R)&&k.focus)return k.focus(),1},X=async(k,R={})=>{let M,K;const L=Ul(k);if(t.resolver){const Y=await A($t(k)?k:L);M=Fn(Y),K=k?!L.some(Q=>de(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=de(r,Y);return await D(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await D(r);return f.state.next({...!Hr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),R.shouldFocus&&!K&&Vl(r,I,k?L:a.mount),K},$=k=>{const R={...o.mount?i:s};return $t(k)?R:Hr(k)?de(R,k):k.map(M=>de(R,M))},B=(k,R)=>({invalid:!!de((R||n).errors,k),isDirty:!!de((R||n).dirtyFields,k),error:de((R||n).errors,k),isValidating:!!de(n.validatingFields,k),isTouched:!!de((R||n).touchedFields,k)}),he=k=>{k&&Ul(k).forEach(R=>Kt(n.errors,R)),f.state.next({errors:k?n.errors:{}})},re=(k,R,M)=>{const K=(de(r,k,{_f:{}})._f||{}).ref,L=de(n.errors,k)||{},{ref:Y,message:Q,type:te,...me}=L;pt(n.errors,k,{...me,...R,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},ie=(k,R)=>ui(k)?f.values.subscribe({next:M=>k(F(void 0,R),M)}):F(k,R,!0),De=(k,R={})=>{for(const M of k?Ul(k):a.mount)a.mount.delete(M),a.array.delete(M),R.keepValue||(Kt(r,M),Kt(i,M)),!R.keepError&&Kt(n.errors,M),!R.keepDirty&&Kt(n.dirtyFields,M),!R.keepTouched&&Kt(n.touchedFields,M),!R.keepIsValidating&&Kt(n.validatingFields,M),!t.shouldUnregister&&!R.keepDefaultValue&&Kt(s,M);f.values.next({values:{...i}}),f.state.next({...n,...R.keepDirty?{isDirty:N()}:{}}),!R.keepIsValid&&w()},pe=({disabled:k,name:R,field:M,fields:K,value:L})=>{if(Br(k)&&o.mount||k){const Y=k?void 0:$t(L)?zp(M?M._f:de(K,R)._f):L;pt(i,R,Y),j(R,Y,!1,!1,!0)}},_e=(k,R={})=>{let M=de(r,k);const K=Br(R.disabled);return pt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...R}}),a.mount.add(k),M?pe({field:M,disabled:R.disabled,name:k,value:R.value}):C(k,!0,R.value),{...K?{disabled:R.disabled}:{},...t.progressive?{required:!!R.required,min:fl(R.min),max:fl(R.max),minLength:fl(R.minLength),maxLength:fl(R.maxLength),pattern:fl(R.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){_e(k,R),M=de(r,k);const Y=$t(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=d8(Y),te=M._f.refs||[];if(Q?te.find(me=>me===Y):Y===M._f.ref)return;pt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(Fp),Y,...Array.isArray(de(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=de(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||R.shouldUnregister)&&!(AE(a.array,k)&&o.action)&&a.unMount.add(k)}}},Te=()=>t.shouldFocusError&&Vl(r,I,a.mount),Fe=k=>{Br(k)&&(f.state.next({disabled:k}),Vl(r,(R,M)=>{const K=de(r,M);K&&(R.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Ie=(k,R)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Nn(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await P();n.errors=Y,L=Q}else await D(r);if(Kt(n.errors,"root"),Fn(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else R&&await R({...n.errors},M),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Fn(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Pe=(k,R={})=>{de(r,k)&&($t(R.defaultValue)?z(k,Nn(de(s,k))):(z(k,R.defaultValue),pt(s,k,Nn(R.defaultValue))),R.keepTouched||Kt(n.touchedFields,k),R.keepDirty||(Kt(n.dirtyFields,k),n.isDirty=R.defaultValue?N(k,Nn(de(s,k))):N()),R.keepError||(Kt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},rt=(k,R={})=>{const M=k?Nn(k):s,K=Nn(M),L=Fn(k),Y=L?s:K;if(R.keepDefaultValues||(s=M),!R.keepValues){if(R.keepDirtyValues)for(const Q of a.mount)de(n.dirtyFields,Q)?pt(Y,Q,de(i,Q)):z(Q,de(Y,Q));else{if(qv&&$t(k))for(const Q of a.mount){const te=de(r,Q);if(te&&te._f){const me=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(nf(me)){const Ye=me.closest("form");if(Ye){Ye.reset();break}}}}r={}}i=e.shouldUnregister?R.keepDefaultValues?Nn(s):{}:Nn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:R.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!R.keepIsValid||!!R.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:R.keepSubmitCount?n.submitCount:0,isDirty:L?!1:R.keepDirty?n.isDirty:!!(R.keepDefaultValues&&!qi(k,s)),isSubmitted:R.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:R.keepDirtyValues?R.keepDefaultValues&&i?Wu(s,i):n.dirtyFields:R.keepDefaultValues&&k?Wu(s,k):R.keepDirty?n.dirtyFields:{},touchedFields:R.keepTouched?n.touchedFields:{},errors:R.keepErrors?n.errors:{},isSubmitSuccessful:R.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,R)=>rt(ui(k)?k(i):k,R);return{control:{register:_e,unregister:De,getFieldState:B,handleSubmit:Ie,setError:re,_executeSchema:P,_getWatch:F,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:p,_updateDisabledField:pe,_getFieldArray:S,_reset:rt,_resetDefaultValues:()=>ui(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(k){o=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:_e,handleSubmit:Ie,watch:ie,setValue:z,getValues:$,reset:E,resetField:Pe,clearErrors:he,unregister:De,setError:re,setFocus:(k,R={})=>{const M=de(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),R.shouldSelect&&L.select())}},getFieldState:B}}function pn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:ui(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ui(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...y8(e),formState:r});const i=t.current.control;return i._options=e,Qv({subject:i._subjects.state,next:o=>{ME(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),We.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),We.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),We.useEffect(()=>{e.values&&!qi(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),We.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),We.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),We.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=IE(r,i),t.current}const a1=(e,t,n)=>{if(e&&"reportValidity"in e){const r=de(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},YE=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?a1(r.ref,n,e):r.refs&&r.refs.forEach(s=>a1(s,n,e))}},v8=(e,t)=>{t.shouldUseNativeValidation&&YE(e,t);const n={};for(const r in e){const s=de(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(x8(t.names||Object.keys(e),r)){const o=Object.assign({},de(n,r));pt(o,"root",i),pt(n,r,o)}else pt(n,r,i)}return n},x8=(e,t)=>e.some(n=>n.startsWith(t+"."));var w8=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[o].types,u=c&&c[r.code];n[o]=zE(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},mn=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&YE({},i),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:v8(w8(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},ot;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ot||(ot={}));var ug;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ug||(ug={}));const Ce=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ri=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ae=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),b8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Kn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;cn.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Kn.create=e=>new Kn(e);const Ra=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ae.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let KE=Ra;function _8(e){KE=e}function af(){return KE}const lf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},S8=[];function ye(e,t){const n=af(),r=lf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ra?void 0:Ra].filter(s=>!!s)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return He;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),ra=e=>({status:"dirty",value:e}),Sn=e=>({status:"valid",value:e}),dg=e=>e.status==="aborted",fg=e=>e.status==="dirty",vc=e=>e.status==="valid",xc=e=>typeof Promise<"u"&&e instanceof Promise;function cf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function GE(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var _l,Sl;class Qr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l1=(e,t)=>{if(vc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var c,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Je{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ri(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ri(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:ri(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(xc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ri(t)},i=this._parseSync({data:t,path:s.path,parent:s});return l1(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ri(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(xc(s)?s:Promise.resolve(s));return l1(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:ae.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Pr({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Zr.create(this,this._def)}nullable(){return Ti.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return Aa.create(this,this._def)}or(t){return Sc.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Pr({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Tc({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new tx({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Rc({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tu.create(this,t)}readonly(){return Pc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const k8=/^c[^\s-]{8,}$/i,C8=/^[0-9a-z]+$/,j8=/^[0-9A-HJKMNP-TV-Z]{26}$/,E8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,N8=/^[a-z0-9_-]{21}$/i,T8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,R8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $p;const A8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,O8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,D8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ZE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",I8=new RegExp(`^${ZE}$`);function qE(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function M8(e){return new RegExp(`^${qE(e)}$`)}function XE(e){let t=`${ZE}T${qE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function L8(e,t){return!!((t==="v4"||!t)&&A8.test(e)||(t==="v6"||!t)&&O8.test(e))}class _r extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.string,received:i.parsedType}),He}const r=new hn;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:n,code:ae.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new _r({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};function F8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class ji extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.number,received:i.parsedType}),He}let r;const s=new hn;for(const i of this._def.checks)i.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?F8(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_finite,message:i.message}),s.dirty()):ot.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new ji({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new ji({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ji({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class Ei extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ce.bigint){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.bigint,received:i.parsedType}),He}let r;const s=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ot.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Ei({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ei({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Ei({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};class wc extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.boolean,received:r.parsedType}),He}return Sn(t.data)}}wc.create=e=>new wc({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class ho extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.date,received:i.parsedType}),He}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_date}),He}const r=new hn;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ot.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ho({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew ho({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ge(e)});class uf extends Je{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.symbol,received:r.parsedType}),He}return Sn(t.data)}}uf.create=e=>new uf({typeName:Ve.ZodSymbol,...Ge(e)});class bc extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.undefined,received:r.parsedType}),He}return Sn(t.data)}}bc.create=e=>new bc({typeName:Ve.ZodUndefined,...Ge(e)});class _c extends Je{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.null,received:r.parsedType}),He}return Sn(t.data)}}_c.create=e=>new _c({typeName:Ve.ZodNull,...Ge(e)});class Pa extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Sn(t.data)}}Pa.create=e=>new Pa({typeName:Ve.ZodAny,...Ge(e)});class no extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Sn(t.data)}}no.create=e=>new no({typeName:Ve.ZodUnknown,...Ge(e)});class As extends Je{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ae.invalid_type,expected:Ce.never,received:n.parsedType}),He}}As.create=e=>new As({typeName:Ve.ZodNever,...Ge(e)});class df extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.void,received:r.parsedType}),He}return Sn(t.data)}}df.create=e=>new df({typeName:Ve.ZodVoid,...Ge(e)});class Cr extends Je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return ye(n,{code:ae.invalid_type,expected:Ce.array,received:n.parsedType}),He;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(ye(n,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new Qr(n,o,n.path,a)))).then(o=>hn.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new Qr(n,o,n.path,a)));return hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function zo(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Zr.create(zo(r))}return new At({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:zo(e.element)}):e instanceof Zr?Zr.create(zo(e.unwrap())):e instanceof Ti?Ti.create(zo(e.unwrap())):e instanceof Jr?Jr.create(e.items.map(t=>zo(t))):e}class At extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ae.invalid_type,expected:Ce.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof As&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const c=[];for(const u of o){const d=i[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Qr(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof As){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ye(s,{code:ae.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Qr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>hn.mergeObjectSync(r,u)):hn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const c=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Oe.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Zr;)i=i._def.innerType;n[r]=i}}),new At({...this._def,shape:()=>n})}keyof(){return QE(ot.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});class Sc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Kn(a.ctx.common.issues));return ye(n,{code:ae.invalid_union,unionErrors:o}),He}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(c=>new Kn(c));return ye(n,{code:ae.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}Sc.create=(e,t)=>new Sc({options:e,typeName:Ve.ZodUnion,...Ge(t)});const us=e=>e instanceof jc?us(e.schema):e instanceof Pr?us(e.innerType()):e instanceof Ec?[e.value]:e instanceof Ni?e.options:e instanceof Nc?ot.objectValues(e.enum):e instanceof Tc?us(e._def.innerType):e instanceof bc?[void 0]:e instanceof _c?[null]:e instanceof Zr?[void 0,...us(e.unwrap())]:e instanceof Ti?[null,...us(e.unwrap())]:e instanceof tx||e instanceof Pc?us(e.unwrap()):e instanceof Rc?us(e._def.innerType):[];class Th extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ye(n,{code:ae.invalid_type,expected:Ce.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=us(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Th({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ge(r)})}}function hg(e,t){const n=ri(e),r=ri(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const s=ot.objectKeys(t),i=ot.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const c=hg(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(dg(i)||dg(o))return He;const a=hg(i.value,o.value);return a.valid?((fg(i)||fg(o))&&n.dirty(),{status:n.value,value:a.data}):(ye(r,{code:ae.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}kc.create=(e,t,n)=>new kc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Jr extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return ye(r,{code:ae.invalid_type,expected:Ce.array,received:r.parsedType}),He;if(r.data.lengththis._def.items.length&&(ye(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Qr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>hn.mergeArray(n,o)):hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jr({...this._def,rest:t})}}Jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class Cc extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return ye(r,{code:ae.invalid_type,expected:Ce.object,received:r.parsedType}),He;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new Qr(r,a,r.path,a)),value:o._parse(new Qr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?hn.mergeObjectAsync(n,s):hn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Je?new Cc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ge(r)}):new Cc({keyType:_r.create(),valueType:t,typeName:Ve.ZodRecord,...Ge(n)})}}class ff extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return ye(r,{code:ae.invalid_type,expected:Ce.map,received:r.parsedType}),He;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new Qr(r,a,r.path,[u,"key"])),value:i._parse(new Qr(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}ff.create=(e,t,n)=>new ff({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class po extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return ye(r,{code:ae.invalid_type,expected:Ce.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(ye(r,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>i._parse(new Qr(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new po({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new po({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}po.create=(e,t)=>new po({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class xa extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return ye(n,{code:ae.invalid_type,expected:Ce.function,received:n.parsedType}),He;function r(a,c){return lf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,af(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_arguments,argumentsError:c}})}function s(a,c){return lf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,af(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Aa){const a=this;return Sn(async function(...c){const u=new Kn([]),d=await a._def.args.parseAsync(c,i).catch(y=>{throw u.addIssue(r(c,y)),u}),f=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(f,i).catch(y=>{throw u.addIssue(s(f,y)),u})})}else{const a=this;return Sn(function(...c){const u=a._def.args.safeParse(c,i);if(!u.success)throw new Kn([r(c,u.error)]);const d=Reflect.apply(o,this,u.data),f=a._def.returns.safeParse(d,i);if(!f.success)throw new Kn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xa({...this._def,args:Jr.create(t).rest(no.create())})}returns(t){return new xa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xa({args:t||Jr.create([]).rest(no.create()),returns:n||no.create(),typeName:Ve.ZodFunction,...Ge(r)})}}class jc extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jc.create=(e,t)=>new jc({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class Ec extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ec.create=(e,t)=>new Ec({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function QE(e,t){return new Ni({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class Ni extends Je{constructor(){super(...arguments),_l.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:ot.joinValues(r),received:n.parsedType,code:ae.invalid_type}),He}if(cf(this,_l)||GE(this,_l,new Set(this._def.values)),!cf(this,_l).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ae.invalid_enum_value,options:r}),He}return Sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ni.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ni.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_l=new WeakMap;Ni.create=QE;class Nc extends Je{constructor(){super(...arguments),Sl.set(this,void 0)}_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const s=ot.objectValues(n);return ye(r,{expected:ot.joinValues(s),received:r.parsedType,code:ae.invalid_type}),He}if(cf(this,Sl)||GE(this,Sl,new Set(ot.getValidEnumValues(this._def.values))),!cf(this,Sl).has(t.data)){const s=ot.objectValues(n);return ye(r,{received:r.data,code:ae.invalid_enum_value,options:s}),He}return Sn(t.data)}get enum(){return this._def.values}}Sl=new WeakMap;Nc.create=(e,t)=>new Nc({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class Aa extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ye(n,{code:ae.invalid_type,expected:Ce.promise,received:n.parsedType}),He;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ve.ZodPromise,...Ge(t)});class Pr extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ye(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?ra(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?ra(a.value):a}}if(s.type==="refinement"){const o=a=>{const c=s.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vc(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>vc(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);ot.assertNever(s)}}Pr.create=(e,t,n)=>new Pr({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)});Pr.createWithPreprocess=(e,t,n)=>new Pr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Zr extends Je{_parse(t){return this._getType(t)===Ce.undefined?Sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zr.create=(e,t)=>new Zr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class Ti extends Je{_parse(t){return this._getType(t)===Ce.null?Sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ti.create=(e,t)=>new Ti({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class Tc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Tc.create=(e,t)=>new Tc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class Rc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xc(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Rc.create=(e,t)=>new Rc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class hf extends Je{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}hf.create=e=>new hf({typeName:Ve.ZodNaN,...Ge(e)});const z8=Symbol("zod_brand");class tx extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tu extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?He:i.status==="dirty"?(n.dirty(),ra(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new tu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Pc extends Je{_parse(t){const n=this._def.innerType._parse(t),r=s=>(vc(s)&&(s.value=Object.freeze(s.value)),s);return xc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Pc.create=(e,t)=>new Pc({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});function JE(e,t={},n){return e?Pa.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):Pa.create()}const $8={object:At.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const U8=(e,t={message:`Input not instance of ${e.name}`})=>JE(n=>n instanceof e,t),eN=_r.create,tN=ji.create,V8=hf.create,B8=Ei.create,nN=wc.create,W8=ho.create,H8=uf.create,Y8=bc.create,K8=_c.create,G8=Pa.create,Z8=no.create,q8=As.create,X8=df.create,Q8=Cr.create,J8=At.create,eU=At.strictCreate,tU=Sc.create,nU=Th.create,rU=kc.create,sU=Jr.create,iU=Cc.create,oU=ff.create,aU=po.create,lU=xa.create,cU=jc.create,uU=Ec.create,dU=Ni.create,fU=Nc.create,hU=Aa.create,c1=Pr.create,pU=Zr.create,mU=Ti.create,gU=Pr.createWithPreprocess,yU=tu.create,vU=()=>eN().optional(),xU=()=>tN().optional(),wU=()=>nN().optional(),bU={string:e=>_r.create({...e,coerce:!0}),number:e=>ji.create({...e,coerce:!0}),boolean:e=>wc.create({...e,coerce:!0}),bigint:e=>Ei.create({...e,coerce:!0}),date:e=>ho.create({...e,coerce:!0})},_U=He;var ce=Object.freeze({__proto__:null,defaultErrorMap:Ra,setErrorMap:_8,getErrorMap:af,makeIssue:lf,EMPTY_PATH:S8,addIssueToContext:ye,ParseStatus:hn,INVALID:He,DIRTY:ra,OK:Sn,isAborted:dg,isDirty:fg,isValid:vc,isAsync:xc,get util(){return ot},get objectUtil(){return ug},ZodParsedType:Ce,getParsedType:ri,ZodType:Je,datetimeRegex:XE,ZodString:_r,ZodNumber:ji,ZodBigInt:Ei,ZodBoolean:wc,ZodDate:ho,ZodSymbol:uf,ZodUndefined:bc,ZodNull:_c,ZodAny:Pa,ZodUnknown:no,ZodNever:As,ZodVoid:df,ZodArray:Cr,ZodObject:At,ZodUnion:Sc,ZodDiscriminatedUnion:Th,ZodIntersection:kc,ZodTuple:Jr,ZodRecord:Cc,ZodMap:ff,ZodSet:po,ZodFunction:xa,ZodLazy:jc,ZodLiteral:Ec,ZodEnum:Ni,ZodNativeEnum:Nc,ZodPromise:Aa,ZodEffects:Pr,ZodTransformer:Pr,ZodOptional:Zr,ZodNullable:Ti,ZodDefault:Tc,ZodCatch:Rc,ZodNaN:hf,BRAND:z8,ZodBranded:tx,ZodPipeline:tu,ZodReadonly:Pc,custom:JE,Schema:Je,ZodSchema:Je,late:$8,get ZodFirstPartyTypeKind(){return Ve},coerce:bU,any:G8,array:Q8,bigint:B8,boolean:nN,date:W8,discriminatedUnion:nU,effect:c1,enum:dU,function:lU,instanceof:U8,intersection:rU,lazy:cU,literal:uU,map:oU,nan:V8,nativeEnum:fU,never:q8,null:K8,nullable:mU,number:tN,object:J8,oboolean:wU,onumber:xU,optional:pU,ostring:vU,pipeline:yU,preprocess:gU,promise:hU,record:iU,set:aU,strictObject:eU,string:eN,symbol:H8,transformer:c1,tuple:sU,undefined:Y8,union:tU,unknown:Z8,void:X8,NEVER:_U,ZodIssueCode:ae,quotelessJson:b8,ZodError:Kn}),SU="Label",rN=v.forwardRef((e,t)=>l.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));rN.displayName=SU;var sN=rN;const kU=Fc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ri=v.forwardRef(({className:e,...t},n)=>l.jsx(sN,{ref:n,className:se(kU(),e),...t}));Ri.displayName=sN.displayName;const gn=r8,iN=v.createContext({}),Se=({...e})=>l.jsx(iN.Provider,{value:{name:e.name},children:l.jsx(a8,{...e})}),Rh=()=>{const e=v.useContext(iN),t=v.useContext(oN),{getFieldState:n,formState:r}=Nh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},oN=v.createContext({}),ve=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return l.jsx(oN.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:se("space-y-2",e),...t})})});ve.displayName="FormItem";const xe=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Rh();return l.jsx(Ri,{ref:n,className:se(r&&"text-destructive",e),htmlFor:s,...t})});xe.displayName="FormLabel";const we=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Rh();return l.jsx(Ns,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});we.displayName="FormControl";const CU=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Rh();return l.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})});CU.displayName="FormDescription";const ge=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=Rh(),{t:o}=it(),a=s?o(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:i,className:se("text-sm font-medium text-destructive",e),...n,children:a}):null});ge.displayName="FormMessage";function pg(e,[t,n]){return Math.min(n,Math.max(t,e))}var jU=[" ","Enter","ArrowUp","ArrowDown"],EU=[" ","Enter"],nu="Select",[Ph,Ah,NU]=zc(nu),[Za,FH]=on(nu,[NU,Ba]),Oh=Ba(),[TU,Ii]=Za(nu),[RU,PU]=Za(nu),aN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:y}=e,x=Oh(t),[g,w]=v.useState(null),[m,p]=v.useState(null),[b,_]=v.useState(!1),C=xo(u),[j=!1,T]=Zn({prop:r,defaultProp:s,onChange:i}),[P,A]=Zn({prop:o,defaultProp:a,onChange:c}),D=v.useRef(null),G=g?!!g.closest("form"):!0,[N,F]=v.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(zy,{...x,children:l.jsxs(TU,{required:y,scope:t,trigger:g,onTriggerChange:w,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Wn(),value:P,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:D,disabled:h,children:[l.jsx(Ph.Provider,{scope:t,children:l.jsx(RU,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{F(J=>new Set(J).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{F(J=>{const z=new Set(J);return z.delete(U),z})},[]),children:n})}),G?l.jsxs(ON,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:U=>A(U.target.value),disabled:h,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};aN.displayName=nu;var lN="SelectTrigger",cN=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Oh(n),o=Ii(lN,n),a=o.disabled||r,c=Ke(t,o.onTriggerChange),u=Ah(n),[d,f,h]=DN(x=>{const g=u().filter(p=>!p.disabled),w=g.find(p=>p.value===o.value),m=IN(g,x,w);m!==void 0&&o.onValueChange(m.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return l.jsx($y,{asChild:!0,...i,children:l.jsx(Re.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":AN(o.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&jU.includes(x.key)&&(y(),x.preventDefault())})})})});cN.displayName=lN;var uN="SelectValue",dN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,c=Ii(uN,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=Ke(t,c.onValueNodeChange);return en(()=>{u(d)},[u,d]),l.jsx(Re.span,{...a,ref:f,style:{pointerEvents:"none"},children:AN(c.value)?l.jsx(l.Fragment,{children:o}):i})});dN.displayName=uN;var AU="SelectIcon",fN=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});fN.displayName=AU;var OU="SelectPortal",hN=e=>l.jsx(Uc,{asChild:!0,...e});hN.displayName=OU;var mo="SelectContent",pN=v.forwardRef((e,t)=>{const n=Ii(mo,e.__scopeSelect),[r,s]=v.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Is.createPortal(l.jsx(mN,{scope:e.__scopeSelect,children:l.jsx(Ph.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),i):null}return l.jsx(gN,{...e,ref:t})});pN.displayName=mo;var hs=10,[mN,Mi]=Za(mo),DU="SelectContentImpl",gN=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w,...m}=e,p=Ii(mo,n),[b,_]=v.useState(null),[C,j]=v.useState(null),T=Ke(t,pe=>_(pe)),[P,A]=v.useState(null),[D,G]=v.useState(null),N=Ah(n),[F,S]=v.useState(!1),U=v.useRef(!1);v.useEffect(()=>{if(b)return Hy(b)},[b]),Ty();const J=v.useCallback(pe=>{const[_e,...Te]=N().map(Pe=>Pe.ref.current),[Fe]=Te.slice(-1),Ie=document.activeElement;for(const Pe of pe)if(Pe===Ie||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===_e&&C&&(C.scrollTop=0),Pe===Fe&&C&&(C.scrollTop=C.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==Ie))return},[N,C]),z=v.useCallback(()=>J([P,b]),[J,P,b]);v.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:W,triggerPointerDownPosRef:I}=p;v.useEffect(()=>{if(b){let pe={x:0,y:0};const _e=Fe=>{var Ie,Pe;pe={x:Math.abs(Math.round(Fe.pageX)-(((Ie=I.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Pe=I.current)==null?void 0:Pe.y)??0))}},Te=Fe=>{pe.x<=10&&pe.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",_e),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",Te,{capture:!0})}}},[b,W,I]),v.useEffect(()=>{const pe=()=>W(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[W]);const[X,$]=DN(pe=>{const _e=N().filter(Ie=>!Ie.disabled),Te=_e.find(Ie=>Ie.ref.current===document.activeElement),Fe=IN(_e,pe,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&(A(pe),Fe&&(U.current=!0))},[p.value]),he=v.useCallback(()=>b==null?void 0:b.focus(),[b]),re=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&G(pe)},[p.value]),ie=r==="popper"?mg:yN,De=ie===mg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w}:{};return l.jsx(mN,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:P,onItemLeave:he,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:F,searchRef:X,children:l.jsx(Xf,{as:Ns,allowPinchZoom:!0,children:l.jsx(Yf,{asChild:!0,trapped:p.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ue(s,pe=>{var _e;(_e=p.trigger)==null||_e.focus({preventScroll:!0}),pe.preventDefault()}),children:l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:l.jsx(ie,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:pe=>pe.preventDefault(),...m,...De,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ue(m.onKeyDown,pe=>{const _e=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!_e&&pe.key.length===1&&$(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Fe=N().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ie=pe.target,Pe=Fe.indexOf(Ie);Fe=Fe.slice(Pe+1)}setTimeout(()=>J(Fe)),pe.preventDefault()}})})})})})})});gN.displayName=DU;var IU="SelectItemAlignedPosition",yN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Ii(mo,n),o=Mi(mo,n),[a,c]=v.useState(null),[u,d]=v.useState(null),f=Ke(t,T=>d(T)),h=Ah(n),y=v.useRef(!1),x=v.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:m,focusSelectedItem:p}=o,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&w&&m){const T=i.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),D=m.getBoundingClientRect();if(i.dir!=="rtl"){const Ie=D.left-P.left,Pe=A.left-Ie,rt=T.left-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=pg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.left=O+"px"}else{const Ie=P.right-D.right,Pe=window.innerWidth-A.right-Ie,rt=window.innerWidth-T.right-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=pg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.right=O+"px"}const G=h(),N=window.innerHeight-hs*2,F=g.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),z=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+F+W+z,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(g),B=parseInt($.paddingTop,10),he=parseInt($.paddingBottom,10),re=T.top+T.height/2-hs,ie=N-re,De=w.offsetHeight/2,pe=w.offsetTop+De,_e=U+J+pe,Te=I-_e;if(_e<=re){const Ie=w===G[G.length-1].ref.current;a.style.bottom="0px";const Pe=u.clientHeight-g.offsetTop-g.offsetHeight,rt=Math.max(ie,De+(Ie?he:0)+Pe+z),E=_e+rt;a.style.height=E+"px"}else{const Ie=w===G[0].ref.current;a.style.top="0px";const rt=Math.max(re,U+g.offsetTop+(Ie?B:0)+De)+Te;a.style.height=rt+"px",g.scrollTop=_e-re+g.offsetTop}a.style.margin=`${hs}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[h,i.trigger,i.valueNode,a,u,g,w,m,i.dir,r]);en(()=>b(),[b]);const[_,C]=v.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=v.useCallback(T=>{T&&x.current===!0&&(b(),p==null||p(),x.current=!1)},[b,p]);return l.jsx(LU,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});yN.displayName=IU;var MU="SelectPopperPosition",mg=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=hs,...i}=e,o=Oh(n);return l.jsx(Uy,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mg.displayName=MU;var[LU,nx]=Za(mo,{}),gg="SelectViewport",vN=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=Mi(gg,n),o=nx(gg,n),a=Ke(t,i.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Ph.Slot,{scope:n,children:l.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const y=Math.abs(c.current-d.scrollTop);if(y>0){const x=window.innerHeight-hs*2,g=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),m=Math.max(g,w);if(m0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});vN.displayName=gg;var xN="SelectGroup",[FU,zU]=Za(xN),wN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Wn();return l.jsx(FU,{scope:n,id:s,children:l.jsx(Re.div,{role:"group","aria-labelledby":s,...r,ref:t})})});wN.displayName=xN;var bN="SelectLabel",_N=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=zU(bN,n);return l.jsx(Re.div,{id:s.id,...r,ref:t})});_N.displayName=bN;var pf="SelectItem",[$U,SN]=Za(pf),kN=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=Ii(pf,n),c=Mi(pf,n),u=a.value===r,[d,f]=v.useState(i??""),[h,y]=v.useState(!1),x=Ke(t,m=>{var p;return(p=c.itemRefCallback)==null?void 0:p.call(c,m,r,s)}),g=Wn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx($U,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:v.useCallback(m=>{f(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:l.jsx(Ph.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Re.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:x,onFocus:ue(o.onFocus,()=>y(!0)),onBlur:ue(o.onBlur,()=>y(!1)),onPointerUp:ue(o.onPointerUp,w),onPointerMove:ue(o.onPointerMove,m=>{var p;s?(p=c.onItemLeave)==null||p.call(c):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(o.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=c.onItemLeave)==null||p.call(c))}),onKeyDown:ue(o.onKeyDown,m=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(EU.includes(m.key)&&w(),m.key===" "&&m.preventDefault())})})})})});kN.displayName=pf;var kl="SelectItemText",CN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Ii(kl,n),a=Mi(kl,n),c=SN(kl,n),u=PU(kl,n),[d,f]=v.useState(null),h=Ke(t,m=>f(m),c.onItemTextChange,m=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,m,c.value,c.disabled)}),y=d==null?void 0:d.textContent,x=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return en(()=>(g(x),()=>w(x)),[g,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Re.span,{id:c.textId,...i,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Is.createPortal(i.children,o.valueNode):null]})});CN.displayName=kl;var jN="SelectItemIndicator",EN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return SN(jN,n).isSelected?l.jsx(Re.span,{"aria-hidden":!0,...r,ref:t}):null});EN.displayName=jN;var yg="SelectScrollUpButton",NN=v.forwardRef((e,t)=>{const n=Mi(yg,e.__scopeSelect),r=nx(yg,e.__scopeSelect),[s,i]=v.useState(!1),o=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(RN,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});NN.displayName=yg;var vg="SelectScrollDownButton",TN=v.forwardRef((e,t)=>{const n=Mi(vg,e.__scopeSelect),r=nx(vg,e.__scopeSelect),[s,i]=v.useState(!1),o=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(RN,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});TN.displayName=vg;var RN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=Mi("SelectScrollButton",n),o=v.useRef(null),a=Ah(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),UU="SelectSeparator",PN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Re.div,{"aria-hidden":!0,...r,ref:t})});PN.displayName=UU;var xg="SelectArrow",VU=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Oh(n),i=Ii(xg,n),o=Mi(xg,n);return i.open&&o.position==="popper"?l.jsx(Vy,{...s,...r,ref:t}):null});VU.displayName=xg;function AN(e){return e===""||e===void 0}var ON=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=v.useRef(null),i=Ke(t,s),o=Wv(n);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[o,n]),l.jsx(Qc,{asChild:!0,children:l.jsx("select",{...r,ref:i,defaultValue:n})})});ON.displayName="BubbleSelect";function DN(e){const t=It(e),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(o=>{const a=n.current+o;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function IN(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=BU(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function BU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var WU=aN,MN=cN,HU=dN,YU=fN,KU=hN,LN=pN,GU=vN,ZU=wN,FN=_N,zN=kN,qU=CN,XU=EN,$N=NN,UN=TN,VN=PN;const Ui=WU,Cl=ZU,Vi=HU,si=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(MN,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(YU,{asChild:!0,children:l.jsx(Sy,{className:"h-4 w-4 opacity-50"})})]}));si.displayName=MN.displayName;const BN=v.forwardRef(({className:e,...t},n)=>l.jsx($N,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(AO,{className:"h-4 w-4"})}));BN.displayName=$N.displayName;const WN=v.forwardRef(({className:e,...t},n)=>l.jsx(UN,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Sy,{className:"h-4 w-4"})}));WN.displayName=UN.displayName;const ii=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(KU,{children:l.jsxs(LN,{ref:s,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(BN,{}),l.jsx(GU,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(WN,{})]})}));ii.displayName=LN.displayName;const sa=v.forwardRef(({className:e,...t},n)=>l.jsx(FN,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sa.displayName=FN.displayName;const yr=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(zN,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(XU,{children:l.jsx(aS,{className:"h-4 w-4"})})}),l.jsx(qU,{children:t})]}));yr.displayName=zN.displayName;const QU=v.forwardRef(({className:e,...t},n)=>l.jsx(VN,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));QU.displayName=VN.displayName;const wg=new Map([["aliyun-cdn",["aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-oss",["aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["tencent.cdn","/imgs/providers/tencent.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["qiniu-cdn",["qiniu.cdn","/imgs/providers/qiniu.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),JU=Array.from(wg.keys()),Dh=ov,Ih=av,eV=lv,HN=v.forwardRef(({className:e,...t},n)=>l.jsx(Wc,{ref:n,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));HN.displayName=Wc.displayName;const ru=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(eV,{children:[l.jsx(HN,{}),l.jsxs(Hc,{ref:r,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(th,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(ky,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ru.displayName=Hc.displayName;const su=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});su.displayName="DialogHeader";const YN=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});YN.displayName="DialogFooter";const iu=v.forwardRef(({className:e,...t},n)=>l.jsx(Yc,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));iu.displayName=Yc.displayName;const tV=v.forwardRef(({className:e,...t},n)=>l.jsx(Kc,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));tV.displayName=Kc.displayName;function nV(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var rx="ScrollArea",[KN,zH]=on(rx),[rV,fr]=KN(rx),GN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,c]=v.useState(null),[u,d]=v.useState(null),[f,h]=v.useState(null),[y,x]=v.useState(null),[g,w]=v.useState(null),[m,p]=v.useState(0),[b,_]=v.useState(0),[C,j]=v.useState(!1),[T,P]=v.useState(!1),A=Ke(t,G=>c(G)),D=xo(s);return l.jsx(rV,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:p,onCornerHeightChange:_,children:l.jsx(Re.div,{dir:D,...o,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});GN.displayName=rx;var ZN="ScrollAreaViewport",qN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=e,o=fr(ZN,n),a=v.useRef(null),c=Ke(t,a,o.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),l.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});qN.displayName=ZN;var ns="ScrollAreaScrollbar",sx=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return v.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?l.jsx(sV,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(iV,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(XN,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx(ix,{...r,ref:t}):null});sx.displayName=ns;var sV=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),[i,o]=v.useState(!1);return v.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(an,{present:n||i,children:l.jsx(XN,{"data-state":i?"visible":"hidden",...r,ref:t})})}),iV=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Lh(()=>c("SCROLL_END"),100),[a,c]=nV("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),v.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const y=u[d];f!==y&&(c("SCROLL"),o()),f=y};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,i,c,o]),l.jsx(an,{present:n||a!=="hidden",children:l.jsx(ix,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),XN=v.forwardRef((e,t)=>{const n=fr(ns,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=v.useState(!1),a=e.orientation==="horizontal",c=Lh(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,s=fr(ns,e.__scopeScrollArea),i=v.useRef(null),o=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=n2(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,y){return dV(h,o.current,a,y)}return n==="horizontal"?l.jsx(oV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollLeft,y=u1(h,a,s.dir);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(aV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollTop,y=u1(h,a);i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),oV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=fr(ns,e.__scopeScrollArea),[o,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,i.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(JN,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),s2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:gf(o.paddingLeft),paddingEnd:gf(o.paddingRight)}})}})}),aV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=fr(ns,e.__scopeScrollArea),[o,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,i.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(JN,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),s2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:gf(o.paddingTop),paddingEnd:gf(o.paddingBottom)}})}})}),[lV,QN]=KN(ns),JN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,y=fr(ns,n),[x,g]=v.useState(null),w=Ke(t,A=>g(A)),m=v.useRef(null),p=v.useRef(""),b=y.viewport,_=r.content-r.viewport,C=It(d),j=It(c),T=Lh(f,10);function P(A){if(m.current){const D=A.clientX-m.current.left,G=A.clientY-m.current.top;u({x:D,y:G})}}return v.useEffect(()=>{const A=D=>{const G=D.target;(x==null?void 0:x.contains(G))&&C(D,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),v.useEffect(j,[r,j]),Oa(x,T),Oa(y.content,T),l.jsx(lV,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:It(i),onThumbPointerUp:It(o),onThumbPositionChange:j,onThumbPointerDown:It(a),children:l.jsx(Re.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),m.current=x.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),P(A))}),onPointerMove:ue(e.onPointerMove,P),onPointerUp:ue(e.onPointerUp,A=>{const D=A.target;D.hasPointerCapture(A.pointerId)&&D.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=p.current,y.viewport&&(y.viewport.style.scrollBehavior=""),m.current=null})})})}),mf="ScrollAreaThumb",e2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=QN(mf,e.__scopeScrollArea);return l.jsx(an,{present:n||s.hasThumb,children:l.jsx(cV,{ref:t,...r})})}),cV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=fr(mf,n),o=QN(mf,n),{onThumbPositionChange:a}=o,c=Ke(t,f=>o.onThumbChange(f)),u=v.useRef(),d=Lh(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const f=i.viewport;if(f){const h=()=>{if(d(),!u.current){const y=fV(f,a);u.current=y,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,d,a]),l.jsx(Re.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const y=f.target.getBoundingClientRect(),x=f.clientX-y.left,g=f.clientY-y.top;o.onThumbPointerDown({x,y:g})}),onPointerUp:ue(e.onPointerUp,o.onThumbPointerUp)})});e2.displayName=mf;var ox="ScrollAreaCorner",t2=v.forwardRef((e,t)=>{const n=fr(ox,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(uV,{...e,ref:t}):null});t2.displayName=ox;var uV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=fr(ox,n),[i,o]=v.useState(0),[a,c]=v.useState(0),u=!!(i&&a);return Oa(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Oa(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?l.jsx(Re.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gf(e){return e?parseInt(e,10):0}function n2(e,t){const n=e/t;return isNaN(n)?0:n}function Mh(e){const t=n2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function dV(e,t,n,r="ltr"){const s=Mh(n),i=s/2,o=t||i,a=s-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return r2([c,u],f)(e)}function u1(e,t,n="ltr"){const r=Mh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=pg(e,c);return r2([0,o],[0,a])(u)}function r2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function s2(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function Lh(e,t){const n=It(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Oa(e,t){const n=It(t);en(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var i2=GN,hV=qN,pV=t2;const Fh=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(i2,{ref:r,className:se("relative overflow-hidden",e),...n,children:[l.jsx(hV,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(o2,{}),l.jsx(pV,{})]}));Fh.displayName=i2.displayName;const o2=v.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(sx,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(e2,{className:"relative flex-1 rounded-full bg-border"})}));o2.displayName=sx.displayName;const Ne=v.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ne.displayName="Input";const wi=new Map([["tencent",["tencent","/imgs/providers/tencent.svg"]],["aliyun",["aliyun","/imgs/providers/aliyun.svg"]],["cloudflare",["cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["go.daddy","/imgs/providers/godaddy.svg"]],["qiniu",["qiniu","/imgs/providers/qiniu.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),d1=e=>wi.get(e),Bs=ce.union([ce.literal("aliyun"),ce.literal("tencent"),ce.literal("ssh"),ce.literal("webhook"),ce.literal("cloudflare"),ce.literal("qiniu"),ce.literal("namesilo"),ce.literal("godaddy"),ce.literal("local")],{message:"access.not.empty"}),Ws=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":case"local":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},mV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,secretId:ce.string().min(1,"access.form.secret.id.not.empty").max(64,i("zod.rule.string.max",{max:64})),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},gV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,accessKeyId:ce.string().min(1,"access.form.access.key.id.not.empty").max(64,i("zod.rule.string.max",{max:64})),accessSecretId:ce.string().min(1,"access.form.access.key.secret.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}console.log(f),r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},go=v.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));go.displayName="Textarea";const ax=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=In(),[r,s]=v.useState(!1),{t:i}=it(),o=ce.object({name:ce.string().min(1,"access.group.name.not.empty").max(64,i("zod.rule.string.max",{max:64}))}),a=pn({resolver:mn(o),defaultValues:{name:""}}),c=async u=>{try{await x6({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,y])=>{a.setError(h,{type:"manual",message:y.message})})}};return l.jsxs(Dh,{onOpenChange:s,open:r,children:[l.jsx(Ih,{asChild:!0,className:se(e),children:t}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:i("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(Se,{control:a.control,name:"name",render:({field:u})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.group.name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.group.name.not.empty"),...u,type:"text"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})]})]})},yV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:i,config:{accessGroups:o}}=In(),a=v.useRef(null),[c,u]=v.useState(""),{t:d}=it(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,y=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,d("zod.rule.string.max",{max:64})),configType:Bs,host:ce.string().refine(_=>y.test(_)||h.test(_),{message:"zod.rule.ssh.host"}),group:ce.string().optional(),port:ce.string().min(1,"access.form.ssh.port.not.empty").max(5,d("zod.rule.string.max",{max:5})),username:ce.string().min(1,"username.not.empty").max(64,d("zod.rule.string.max",{max:64})),password:ce.string().min(0,"password.not.empty").max(64,d("zod.rule.string.max",{max:64})),key:ce.string().min(0,"access.form.ssh.key.not.empty").max(20480,d("zod.rule.string.max",{max:20480})),keyFile:ce.any().optional(),preCommand:ce.string().min(0).max(2048,d("zod.rule.string.max",{max:2048})).optional(),command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048}))});let g={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",preCommand:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(g=e.config);const w=pn({resolver:mn(x),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"ssh",group:e==null?void 0:e.group,host:g.host,port:g.port,username:g.username,password:g.password,key:g.key,keyFile:g.keyFile,certPath:g.certPath,keyPath:g.keyPath,command:g.command,preCommand:g.preCommand}}),m=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:Ws(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,command:_.command,preCommand:_.preCommand,certPath:_.certPath,keyPath:_.keyPath}};try{j.id=t=="copy"?"":j.id;const T=await Us(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Zw({id:f,"access-":j.id}),C&&await Zw({id:C,"access+":j.id})),i()}catch(T){Object.entries(T.response.data).forEach(([A,D])=>{w.setError(A,{type:"manual",message:D.message})});return}},p=async _=>{var P;const C=(P=_.target.files)==null?void 0:P[0];if(!C)return;const j=C;u(j.name);const T=await H$(j);w.setValue("key",T)},b=()=>{var _;console.log(a.current),(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(m)(_)},className:"space-y-3",children:[l.jsx(Se,{control:w.control,name:"name",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.name.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"group",render:({field:_})=>l.jsxs(ve,{children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.form.ssh.group.label")}),l.jsx(ax,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),d("add")]})})]}),l.jsx(we,{children:l.jsxs(Ui,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:d("access.group.not.empty")})}),l.jsxs(ii,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),o.map(C=>l.jsx(yr,{value:C.id?C.id:"",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"id",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Se,{control:w.control,name:"host",render:({field:_})=>l.jsxs(ve,{className:"grow",children:[l.jsx(xe,{children:d("access.form.ssh.host")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.host.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"port",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.port")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.port.not.empty"),..._,type:"number"})}),l.jsx(ge,{})]})})]}),l.jsx(Se,{control:w.control,name:"username",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("username.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"password",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("password.not.empty"),..._,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"key",render:({field:_})=>l.jsxs(ve,{hidden:!0,children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsxs("div",{children:[l.jsx(Ue,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.form.ssh.key.file.not.empty")}),l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:p})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"certPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.cert.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"preCommand",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.pre.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:d("access.form.ssh.pre.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"command",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:d("access.form.ssh.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:d("save")})})]})})})})},vV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,url:ce.string().url("zod.rule.url")});let a={url:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"url",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.webhook.url")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.webhook.url.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},xV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,dnsApiToken:ce.string().min(1,"access.form.cloud.dns.api.token.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.cloud.dns.api.token")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.cloud.dns.api.token.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},wV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,accessKey:ce.string().min(1,"access.form.access.key.not.empty").max(64),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},bV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,apiKey:ce.string().min(1,"access.form.namesilo.api.key.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.namesilo.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.namesilo.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},_V=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,apiKey:ce.string().min(1,"access.form.go.daddy.api.key.not.empty").max(64,i("zod.rule.string.max",{max:64})),apiSecret:ce.string().min(1,"access.form.go.daddy.api.secret.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.go.daddy.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.go.daddy.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.go.daddy.api.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.go.daddy.api.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},SV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:i}=In(),{t:o}=it(),a=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Bs,command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,o("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,o("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,o("zod.rule.string.max",{max:2048}))});let c={command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(c=e.config);const u=pn({resolver:mn(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local",certPath:c.certPath,keyPath:c.keyPath,command:c.command}}),d=async f=>{const h={id:f.id,name:f.name,configType:f.configType,usage:Ws(f.configType),config:{command:f.command,certPath:f.certPath,keyPath:f.keyPath}};try{h.id=t=="copy"?"":h.id;const y=await Us(h);n(),h.id=y.id,h.created=y.created,h.updated=y.updated,f.id&&t=="edit"?s(h):r(h),i()}catch(y){Object.entries(y.response.data).forEach(([g,w])=>{u.setError(g,{type:"manual",message:w.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...u,children:l.jsxs("form",{onSubmit:f=>{f.stopPropagation(),u.handleSubmit(d)(f)},className:"space-y-3",children:[l.jsx(Se,{control:u.control,name:"name",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"id",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"configType",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"certPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.ssh.cert.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"keyPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.ssh.key.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"command",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("access.form.ssh.command.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})};function ia({trigger:e,op:t,data:n,className:r}){const[s,i]=v.useState(!1),{t:o}=it(),a=Array.from(wi.keys()),[c,u]=v.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"tencent":d=l.jsx(mV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"aliyun":d=l.jsx(gV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"ssh":d=l.jsx(yV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"webhook":d=l.jsx(vV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"cloudflare":d=l.jsx(xV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"qiniu":d=l.jsx(wV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"namesilo":d=l.jsx(bV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"godaddy":d=l.jsx(_V,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"local":d=l.jsx(SV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(Dh,{onOpenChange:i,open:s,children:[l.jsx(Ih,{asChild:!0,className:se(r),children:e}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:t=="add"?o("access.add"):t=="edit"?o("access.edit"):o("access.copy")})}),l.jsx(Fh,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Ri,{children:o("access.type")}),l.jsxs(Ui,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(si,{className:"mt-3",children:l.jsx(Vi,{placeholder:o("access.type.not.empty")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("access.type")}),a.map(h=>{var y,x;return l.jsx(yr,{value:h,children:l.jsxs("div",{className:se("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(y=wi.get(h))==null?void 0:y[1],className:"h-6 w-6"}),l.jsx("div",{children:o(((x=wi.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})}const kV=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=In(),[s,i]=v.useState(!1),{t:o}=it(),a=ce.object({email:ce.string().email("email.valid.message")}),c=pn({resolver:mn(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"email.already.exist"});return}const f=[...n.content.emails,d.email];try{const h=await Ga({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),i(!1)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsxs(Dh,{onOpenChange:i,open:s,children:[l.jsx(Ih,{asChild:!0,className:se(e),children:t}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:o("email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"email",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("email.not.empty.message"),...d,type:"email"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})]})]})},a2={domain:"domain",ip:"IP"},CV=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,i]=v.useState([]),{t:o}=it();v.useMemo(()=>{e&&i(e.split(";"))},[e]),v.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const a=d=>{s.includes(d)||i([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,i(h)},u=d=>{const f=[...s];f.splice(d,1),i(f)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:se(t),children:[l.jsxs(xe,{className:"flex justify-between items-center",children:[l.jsx("div",{children:o(a2[r])}),l.jsx(Ss,{when:s.length>0,children:l.jsx(Up,{op:"add",onValueChange:d=>{a(d)},valueType:r,value:"",trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(Fl,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:o("add")})]})})})]}),l.jsx(we,{children:l.jsx(Ss,{when:s.length>0,fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:"暂未添加域名"}),l.jsx(Up,{value:"",trigger:o("add"),onValueChange:a,valueType:r})]}),children:l.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2",children:s.map((d,f)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{children:d}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Up,{op:"edit",valueType:r,trigger:l.jsx(WO,{size:16,className:"cursor-pointer text-gray-600"}),value:d,onValueChange:h=>{c(f,h)}}),l.jsx(KO,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},Up=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[i,o]=v.useState(""),[a,c]=v.useState(!1),[u,d]=v.useState(""),{t:f}=it();v.useEffect(()=>{o(t)},[t]);const h=ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("domain.not.empty.verify.message")}),y=ce.string().ip({message:f("ip.not.empty.verify.message")}),x={domain:h,ip:y},g=v.useCallback(()=>{const m=x[s].safeParse(i);if(!m.success){d(JSON.parse(m.error.message)[0].message);return}o(""),c(!1),d(""),n(i)},[i]);return l.jsxs(Dh,{open:a,onOpenChange:w=>{c(w)},children:[l.jsx(Ih,{className:"text-primary",children:e}),l.jsxs(ru,{children:[l.jsx(su,{children:l.jsx(iu,{children:f(a2[s])})}),l.jsx(Ne,{value:i,onChange:w=>{o(w.target.value)}}),l.jsx(Ss,{when:u.length>0,children:l.jsx("div",{className:"text-red-500 text-sm",children:u})}),l.jsx(YN,{children:l.jsx(Ue,{onClick:()=>{g()},children:f(r==="add"?"add":"confirm")})})]})]})},jV=()=>{const{config:{accesses:e,emails:t,accessGroups:n}}=In(),[r,s]=v.useState(),i=Ar(),{t:o}=it(),[a,c]=v.useState("base"),[u,d]=v.useState(r?r.targetType:"");v.useEffect(()=>{const p=new URLSearchParams(i.search).get("id");p&&(async()=>{const _=await q$(p);s(_),d(_.targetType)})()},[i.search]);const f=ce.object({id:ce.string().optional(),domain:ce.string().min(1,{message:"domain.not.empty.verify.message"}),email:ce.string().email("email.valid.message").optional(),access:ce.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.management.edit.dns.access.not.empty.message"}),targetAccess:ce.string().optional(),targetType:ce.string().regex(/^[a-zA-Z0-9-]+$/,{message:"domain.management.edit.target.type.not.empty.message"}),variables:ce.string().optional(),group:ce.string().optional(),nameservers:ce.string().optional()}),h=pn({resolver:mn(f),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});v.useEffect(()=>{r&&h.reset({id:r.id,domain:r.domain,email:r.email,access:r.access,targetAccess:r.targetAccess,targetType:r.targetType,variables:r.variables,group:r.group,nameservers:r.nameservers})},[r,h]);const y=e.filter(m=>{if(m.usage=="apply")return!1;if(u=="")return!0;const p=u.split("-");return m.configType===p[0]}),{toast:x}=Ir(),g=Dn(),w=async m=>{const p=m.group=="emptyId"?"":m.group,b=m.targetAccess==="emptyId"?"":m.targetAccess;if(p==""&&b==""){h.setError("group",{type:"manual",message:"domain.management.edit.target.access.verify.msg"}),h.setError("targetAccess",{type:"manual",message:"domain.management.edit.target.access.verify.msg"});return}const _={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,group:p,targetAccess:b,targetType:m.targetType,variables:m.variables,nameservers:m.nameservers};try{await cg(_);let C=o("domain.management.edit.succeed.tips");_.id==""&&(C=o("domain.management.add.succeed.tips")),x({title:o("succeed"),description:C}),g("/domains")}catch(C){Object.entries(C.response.data).forEach(([T,P])=>{h.setError(T,{type:"manual",message:P.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Zv,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:r!=null&&r.id?o("domain.edit"):o("domain.add")}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[l.jsx("div",{className:se("cursor-pointer text-right",a==="base"?"text-primary":""),onClick:()=>{c("base")},children:o("basic.setting")}),l.jsx("div",{className:se("cursor-pointer text-right",a==="advance"?"text-primary":""),onClick:()=>{c("advance")},children:o("advanced.setting")})]}),l.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:l.jsx(gn,{...h,children:l.jsxs("form",{onSubmit:h.handleSubmit(w),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:h.control,name:"domain",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(l.Fragment,{children:l.jsx(CV,{value:m.value,valueType:"domain",onValueChange:p=>{h.setValue("domain",p)}})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"email",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("email")+o("domain.management.edit.email.description")}),l.jsx(kV,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]})})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,onValueChange:p=>{h.setValue("email",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.email.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("email.list")}),t.content.emails.map(p=>l.jsx(yr,{value:p,children:l.jsx("div",{children:p})},p))]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"access",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.management.edit.dns.access.label")}),l.jsx(ia,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,onValueChange:p=>{h.setValue("access",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.access.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("domain.management.edit.access.label")}),e.filter(p=>p.usage!="deploy").map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wi.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetType",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(xe,{children:o("domain.management.edit.target.type")}),l.jsx(we,{children:l.jsxs(Ui,{...m,onValueChange:p=>{d(p),h.setValue("targetType",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.target.type.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("domain.management.edit.target.type")}),JU.map(p=>{var b,_;return l.jsx(yr,{value:p,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wg.get(p))==null?void 0:b[1]}),l.jsx("div",{children:o(((_=wg.get(p))==null?void 0:_[0])||"")})]})},p)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetAccess",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:o("domain.management.edit.target.access")}),l.jsx(ia,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,onValueChange:p=>{h.setValue("targetAccess",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.target.access.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsxs(sa,{children:[o("domain.management.edit.target.access.content.label")," ",h.getValues().targetAccess]}),l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),y.map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wi.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"group",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance"||u!="ssh",children:[l.jsx(xe,{className:"w-full flex justify-between",children:l.jsx("div",{children:o("domain.management.edit.group.label")})}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,defaultValue:"emptyId",onValueChange:p=>{h.setValue("group",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.group.not.empty.message")})}),l.jsxs(ii,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),n.filter(p=>{var b;return p.expand&&((b=p.expand)==null?void 0:b.access.length)>0}).map(p=>l.jsx(yr,{value:p.id?p.id:"",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"variables",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:o("variables")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("domain.management.edit.variables.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"nameservers",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:o("dns")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("domain.management.edit.dns.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})]})]})})},l2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));l2.displayName="Card";const c2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...t}));c2.displayName="CardHeader";const u2=v.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...t}));u2.displayName="CardTitle";const d2=v.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:se("text-sm text-muted-foreground",e),...t}));d2.displayName="CardDescription";const f2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("p-6 pt-0",e),...t}));f2.displayName="CardContent";const h2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("flex items-center p-6 pt-0",e),...t}));h2.displayName="CardFooter";const Os=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",EV=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=In(),{toast:n}=Ir(),r=Dn(),{t:s}=it(),i=async a=>{try{await v6(a),t()}catch(c){n({title:s("delete.failed"),description:Os(c),variant:"destructive"});return}},o=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(Ss,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(iw,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domain.empty")}),l.jsx(ax,{trigger:l.jsx(Ue,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(Fh,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(l2,{className:"w-full md:w-[350px]",children:[l.jsxs(c2,{children:[l.jsx(u2,{children:a.name}),l.jsx(d2,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(f2,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:d1(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:d1(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(iw,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.empty")})]})})}),l.jsx(h2,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(Ss,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.all")})})}),l.jsx(Ss,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",onClick:o,children:s("access.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"destructive",size:"sm",children:s("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx(_h,{children:s("access.group.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{className:"dark:text-gray-200",children:s("cancel")}),l.jsx(Sh,{onClick:()=>{i(a.id?a.id:"")},children:s("confirm")})]})]})]})})]})})]}))})})]})};var lx="Tabs",[NV,$H]=on(lx,[Wa]),p2=Wa(),[TV,cx]=NV(lx),m2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=xo(a),[f,h]=Zn({prop:r,onChange:s,defaultProp:i});return l.jsx(TV,{scope:n,baseId:Wn(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:l.jsx(Re.div,{dir:d,"data-orientation":o,...u,ref:t})})});m2.displayName=lx;var g2="TabsList",y2=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=cx(g2,n),o=p2(n);return l.jsx(By,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(Re.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});y2.displayName=g2;var v2="TabsTrigger",x2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=cx(v2,n),a=p2(n),c=_2(o.baseId,r),u=S2(o.baseId,r),d=r===o.value;return l.jsx(Wy,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(r)})})})});x2.displayName=v2;var w2="TabsContent",b2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=cx(w2,n),c=_2(a.baseId,r),u=S2(a.baseId,r),d=r===a.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(an,{present:s||d,children:({present:h})=>l.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});b2.displayName=w2;function _2(e,t){return`${e}-trigger-${t}`}function S2(e,t){return`${e}-content-${t}`}var RV=m2,k2=y2,C2=x2,j2=b2;const E2=RV,ux=v.forwardRef(({className:e,...t},n)=>l.jsx(k2,{ref:n,className:se("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ux.displayName=k2.displayName;const Xi=v.forwardRef(({className:e,...t},n)=>l.jsx(C2,{ref:n,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Xi.displayName=C2.displayName;const yf=v.forwardRef(({className:e,...t},n)=>l.jsx(j2,{ref:n,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));yf.displayName=j2.displayName;const PV={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class vf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||PV,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[a,c]=o;for(let u=0;u{let[a,c]=o;for(let u=0;u{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},f1=e=>e==null?"":""+e,AV=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},OV=/###/g,h1=e=>e&&e.indexOf("###")>-1?e.replace(OV,"."):e,p1=e=>!e||typeof e=="string",Bl=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s{const{obj:r,k:s}=Bl(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=Bl(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Bl(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},DV=(e,t,n,r)=>{const{obj:s,k:i}=Bl(e,t,Object);s[i]=s[i]||[],s[i].push(n)},xf=(e,t)=>{const{obj:n,k:r}=Bl(e,t);if(n)return n[r]},IV=(e,t,n)=>{const r=xf(e,n);return r!==void 0?r:xf(t,n)},N2=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):N2(e[r],t[r],n):e[r]=t[r]);return e},Mo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var MV={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const LV=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>MV[t]):e;class FV{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const zV=[" ",",","?","!",";"],$V=new FV(20),UV=(e,t,n)=>{t=t||"",n=n||"";const r=zV.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=$V.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},bg=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let i=0;i-1&&ce&&e.indexOf("_")>0?e.replace("_","-"):e;class g1 extends zh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&i?a.push(...r.split(i)):a.push(r)));const c=xf(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||typeof r!="string"?c:bg(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),m1(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=xf(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?N2(c,r,i):c={...c,...r},m1(this.data,a,c),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var T2={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,s))}),t}};const y1={};class bf extends zh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),AV(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!UV(t,r,s);if(o&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(s)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let h=f&&f.res;const y=f&&f.usedKey||o,x=f&&f.exactUsedKey||o,g=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(g)<0&&!(typeof m=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(i){const _=Array.isArray(h),C=_?[]:{},j=_?x:y;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const P=`${j}${i}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:a}),C[T]===P&&(C[T]=h[T])}h=C}}else if(p&&typeof m=="string"&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=bf.hasDefaultValue(n),P=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=o);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,o,S?G:h),i){const W=this.resolve(o,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W{const $=T&&X!==h?X:F;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{z([W],o+X,n[`defaultValue${X}`]||G)})}):z(U,o,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${o}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),y=h&&h.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",y=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!y1[`${g[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(y1[`${g[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(r))return;o=m;const p=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,d,m,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(m,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(p.push(d+_),n.ordinal&&_.indexOf(j)===0&&p.push(d+_.replace(j,this.options.pluralSeparator)),y&&p.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;p.push(T),h&&(p.push(T+_),n.ordinal&&_.indexOf(j)===0&&p.push(T+_.replace(j,this.options.pluralSeparator)),y&&p.push(T+C))}}let b;for(;b=p.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(m,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Vp=e=>e.charAt(0).toUpperCase()+e.slice(1);class v1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yr.create("languageUtils")}getScriptPartFromCode(t){if(t=wf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=wf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Vp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Vp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Vp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let VV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],BV={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const WV=["v1","v2","v3"],HV=["v4"],x1={zero:0,one:1,two:2,few:3,many:4,other:5},YV=()=>{const e={};return VV.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:BV[t.fc]}})}),e};class KV{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yr.create("pluralResolver"),(!this.options.compatibilityJSON||HV.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=YV(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=wf(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const o=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[i]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>x1[s]-x1[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!WV.includes(this.options.compatibilityJSON)}}const w1=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=IV(e,t,n);return!i&&s&&typeof n=="string"&&(i=bg(e,n,r),i===void 0&&(i=bg(t,n,r))),i},Bp=e=>e.replace(/\$/g,"$$$$");class GV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:y,nestingSuffix:x,nestingSuffixEscaped:g,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:p}=t.interpolation;this.escape=n!==void 0?n:LV,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Mo(i):o||"{{",this.suffix=a?Mo(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Mo(h):y||Mo("$t("),this.nestingSuffix=x?Mo(x):g||Mo(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=p!==void 0?p:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=y=>{if(y.indexOf(this.formatSeparator)<0){const m=w1(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...s,...n,interpolationkey:y}):m}const x=y.split(this.formatSeparator),g=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(w1(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:g})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>Bp(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Bp(this.escape(y)):Bp(y)}].forEach(y=>{for(a=0;i=y.regex.exec(t);){const x=i[1].trim();if(o=u(x),o===void 0)if(typeof d=="function"){const w=d(t,i,s);o=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(f){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=f1(o));const g=y.safeValue(o);if(t=t.replace(i[0],g),f?(y.regex.lastIndex+=o.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,o);const y=h.match(/'/g),x=h.match(/"/g);(y&&y.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=f1(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),u&&(i=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const ZV=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Lo=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(wf(r),s),t[o]=a),a(n)}};class qV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("formatter"),this.options=t,this.formats={number:Lo((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Lo((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Lo((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Lo((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Lo((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Lo(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,c)=>{const{formatName:u,formatOptions:d}=ZV(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},y=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,y,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const XV=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QV extends zh{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Yr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,d=!1,o[h]===void 0&&(o[h]=!0),i[h]===void 0&&(i[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{DV(c.loaded,[i],o),XV(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const b1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),_1=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Hu=()=>{},JV=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ac extends zh{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=_1(t),this.services={},this.logger=Yr,this.modules={external:[]},JV(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=b1();this.options={...s,...this.options,..._1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Yr.init(i(this.modules.logger),this.options):Yr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=qV);const f=new v1(this.options);this.store=new g1(this.options.resources,this.options);const h=this.services;h.logger=Yr,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new KV(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=i(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new GV(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new QV(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(y){for(var x=arguments.length,g=new Array(x>1?x-1:0),w=1;w1?x-1:0),w=1;w{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Hu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=hl(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hu;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=hl();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Hu),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&T2.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=hl();this.emit("languageChanging",t);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{o(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const i=function(o,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f`${c.keyPrefix}${h}${x}`):y=c.keyPrefix?`${c.keyPrefix}${h}${o}`:o,s.t(y,c)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=hl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hl();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new v1(b1());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ac(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hu;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new Ac(s);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new g1(this.store.data,s),i.services.resourceStore=i.store),i.translator=new bf(i.services,s),i.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d{const{config:e,deleteAccess:t}=In(),{accesses:n}=e,r=10,s=Math.ceil(n.length/r),i=Dn(),o=Ar(),a=new URLSearchParams(o.search),c=a.get("page"),u=c?Number(c):1,d=a.get("tab"),f=a.get("accessGroupId"),h=(u-1)*r,y=h+r,x=async w=>{const m=await y6(w);t(m.id)},g=w=>{a.set("tab",w),i({search:a.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:Pt("access.management")}),d!="access_group"?l.jsx(ia,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add"}):l.jsx(ax,{trigger:l.jsx(Ue,{children:Pt("access.group.add")})})]}),l.jsxs(E2,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[l.jsxs(ux,{className:"space-x-5 px-3",children:[l.jsx(Xi,{value:"access",onClick:()=>{g("access")},children:Pt("access.management")}),l.jsx(Xi,{value:"access_group",onClick:()=>{g("access_group")},children:Pt("access.group.management")})]}),l.jsx(yf,{value:"access",children:n.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(LO,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:Pt("access.empty")}),l.jsx(ia,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:Pt("name")}),l.jsx("div",{className:"w-48",children:Pt("access.type")}),l.jsx("div",{className:"w-60",children:Pt("create.time")}),l.jsx("div",{className:"w-60",children:Pt("update.time")}),l.jsx("div",{className:"grow",children:Pt("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:Pt("access.list")}),n.filter(w=>f?w.group==f:!0).slice(h,y).map(w=>{var m,p;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:w.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(m=wi.get(w.configType))==null?void 0:m[1],className:"w-6"}),l.jsx("div",{children:Pt(((p=wi.get(w.configType))==null?void 0:p[0])||"")})]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("created.in")," ",w.created&&Ta(w.created)]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("updated.in")," ",w.updated&&Ta(w.updated)]}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(ia,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("edit")}),op:"edit",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(ia,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("copy")}),op:"copy",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"link",size:"sm",children:Pt("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:Pt("access.group.delete")}),l.jsx(_h,{children:Pt("access.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{className:"dark:text-gray-200",children:Pt("cancel")}),l.jsx(Sh,{onClick:()=>{x(w)},children:Pt("confirm")})]})]})]})]})]},w.id)}),l.jsx(Aj,{totalPages:s,currentPage:u,onPageChange:w=>{a.set("page",w.toString()),i({search:a.toString()})}})]})}),l.jsx(yf,{value:"access_group",children:l.jsx(EV,{})})]})]})},tB=Fc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),dx=v.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:se(tB({variant:t}),e),...n}));dx.displayName="Alert";const fx=v.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:se("mb-1 font-medium leading-none tracking-tight",e),...t}));fx.displayName="AlertTitle";const hx=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("text-sm [&_p]:leading-relaxed",e),...t}));hx.displayName="AlertDescription";const R2=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await st().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},nB=()=>{const e=Dn(),[t,n]=v.useState(),[r]=kO(),{t:s}=it(),i=r.get("domain");return v.useEffect(()=>{(async()=>{const a={};i&&(a.domain=i);const c=await R2(a);n(c.items)})()},[i]),l.jsxs(Fh,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("deployment.log.name")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:s("domain")}),l.jsx("div",{className:"w-24",children:s("deployment.log.status")}),l.jsx("div",{className:"w-56",children:s("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:s("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:s("deployment.log.name")}),t==null?void 0:t.map(o=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=o.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Uv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Lv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:s("deployment.log.detail.button.text")})}),l.jsxs(nh,{className:"sm:max-w-5xl",children:[l.jsx(dv,{children:l.jsxs(fv,{children:[(c=o.expand.domain)==null?void 0:c.domain,"-",o.id,s("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},o.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(dx,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(fx,{children:s("no.data")}),l.jsxs(hx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(cS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},rB=ce.object({username:ce.string().email({message:"login.username.no.empty.message"}),password:ce.string().min(10,{message:"login.password.length.message"})}),sB=()=>{const{t:e}=it(),t=pn({resolver:mn(rB),defaultValues:{username:"",password:""}}),n=async s=>{try{await st().admins.authWithPassword(s.username,s.password),r("/")}catch(i){const o=Os(i);t.setError("username",{message:o}),t.setError("password",{message:o})}},r=Dn();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(gn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:t.control,name:"username",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"email",...s})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:t.control,name:"password",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"password",...s,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("login.submit")})})]})})]})},iB=()=>st().authStore.isValid&&st().authStore.isAdmin?l.jsx(iS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(_y,{}),l.jsx(vj,{})]}),oB=ce.object({oldPassword:ce.string().min(10,{message:"setting.password.length.message"}),newPassword:ce.string().min(10,{message:"setting.password.length.message"}),confirmPassword:ce.string().min(10,{message:"setting.password.length.message"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"setting.password.not.match",path:["confirmPassword"]}),aB=()=>{const{toast:e}=Ir(),t=Dn(),{t:n}=it(),r=pn({resolver:mn(oB),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async i=>{var o,a;try{await st().admins.authWithPassword((o=st().authStore.model)==null?void 0:o.email,i.oldPassword)}catch(c){const u=Os(c);r.setError("oldPassword",{message:u})}try{await st().admins.update((a=st().authStore.model)==null?void 0:a.id,{password:i.newPassword,passwordConfirm:i.confirmPassword}),st().authStore.clear(),e({title:n("setting.password.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=Os(c);e({title:n("setting.password.change.failed"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:r.control,name:"oldPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.current.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.password.current.password"),...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"newPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.new.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"newPassword",...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"confirmPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.confirm.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"confirmPassword",...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:n("setting.submit")})})]})})})})},lB=()=>{const e=Ar(),[t,n]=v.useState("account"),r=Dn(),{t:s}=it();return v.useEffect(()=>{const o=e.pathname.split("/")[2];n(o)},[e]),l.jsxs("div",{children:[l.jsx(Zv,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("setting")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(E2,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(ux,{className:"mx-auto",children:[l.jsxs(Xi,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(GO,{size:14}),l.jsx("div",{className:"ml-1",children:s("account")})]}),l.jsxs(Xi,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(MO,{size:14}),l.jsx("div",{className:"ml-1",children:s("password")})]}),l.jsxs(Xi,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx($O,{size:14}),l.jsx("div",{className:"ml-1",children:s("setting.notify.menu")})]}),l.jsxs(Xi,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx(BO,{size:14}),l.jsx("div",{className:"ml-1",children:s("ca")})]})]}),l.jsx(yf,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(_y,{})})})]})})]})},cB=()=>{const[e,t]=v.useState(),[n,r]=v.useState(),s=Dn(),{t:i}=it();return v.useEffect(()=>{(async()=>{const a=await Z$();t(a)})()},[]),v.useEffect(()=>{(async()=>{const c=await R2({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:i("dashboard")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(HO,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(xn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(RO,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.near.expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(xn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(zO,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(xn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(NO,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.not.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(xn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:i("deployment.log.name")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(dx,{className:"max-w-[40em] mt-10",children:[l.jsx(fx,{children:i("no.data")}),l.jsxs(hx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(cS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",i("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{s("/edit")},children:i("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:i("domain")}),l.jsx("div",{className:"w-24",children:i("deployment.log.status")}),l.jsx("div",{className:"w-56",children:i("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:i("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:i("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:i("deployment.log.name")}),n==null?void 0:n.map(o=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=o.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Uv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Lv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:i("deployment.log.detail.button.text")})}),l.jsxs(nh,{className:"sm:max-w-5xl",children:[l.jsx(dv,{children:l.jsxs(fv,{children:[(c=o.expand.domain)==null?void 0:c.domain,"-",o.id,i("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},o.id)})]})]})]})},uB=ce.object({email:ce.string().email("setting.account.email.valid.message")}),dB=()=>{var a;const{toast:e}=Ir(),t=Dn(),{t:n}=it(),[r,s]=v.useState(!1),i=pn({resolver:mn(uB),defaultValues:{email:(a=st().authStore.model)==null?void 0:a.email}}),o=async c=>{var u;try{await st().admins.update((u=st().authStore.model)==null?void 0:u.id,{email:c.email}),st().authStore.clear(),e({title:n("setting.account.email.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=Os(d);e({title:n("setting.account.email.change.failed"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...i,children:l.jsxs("form",{onSubmit:i.handleSubmit(o),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:i.control,name:"email",render:({field:c})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),i.setValue("email",u.target.value)}})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(Ue,{type:"submit",children:n("setting.submit")}):l.jsx(Ue,{type:"submit",disabled:!0,variant:"secondary",children:n("setting.submit")})})]})})})})},fB=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},P2=v.createContext({}),px=()=>v.useContext(P2),hB=({children:e})=>{const[t,n]=v.useReducer(fB,{});v.useEffect(()=>{(async()=>{const o=await Mv("notifyChannels");n({type:"SET_CHANNELS",payload:o})})()},[]);const r=v.useCallback(i=>{n({type:"SET_CHANNEL",payload:i})},[]),s=v.useCallback(i=>{n({type:"SET_CHANNELS",payload:i})},[]);return l.jsx(P2.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},pB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(Ne,{placeholder:n("access.form.ding.access.token.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})},mB={title:"您有{COUNT}张证书即将过期",content:"有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!"},gB=()=>{const[e,t]=v.useState(""),[n,r]=v.useState([mB]),{toast:s}=Ir(),{t:i}=it();v.useEffect(()=>{(async()=>{const d=await Mv("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const o=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await Ga({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:i("save.succeed"),description:i("setting.notify.template.save.succeed")})};return l.jsxs("div",{children:[l.jsx(Ne,{value:n[0].title,onChange:u=>{o(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:i("setting.notify.template.variables.tips.title")}),l.jsx(go,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:i("setting.notify.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:c,children:i("save")})})]})},yB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"telegram",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(Ne,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})};function vB(e){try{return new URL(e),!0}catch{return!1}}const xB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{if(r.data.url=r.data.url.trim(),!vB(r.data.url)){i({title:n("save.failed"),description:n("setting.notify.config.save.failed.url.not.valid"),variant:"destructive"});return}const a=await Ga({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})};var mx="Collapsible",[wB,A2]=on(mx),[bB,gx]=wB(mx),O2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=e,[c=!1,u]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(bB,{scope:n,disabled:i,contentId:Wn(),open:c,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Re.div,{"data-state":vx(c),"data-disabled":i?"":void 0,...a,ref:t})})});O2.displayName=mx;var D2="CollapsibleTrigger",I2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=gx(D2,n);return l.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":vx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});I2.displayName=D2;var yx="CollapsibleContent",M2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gx(yx,e.__scopeCollapsible);return l.jsx(an,{present:n||s.open,children:({present:i})=>l.jsx(_B,{...r,ref:t,present:i})})});M2.displayName=yx;var _B=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=e,o=gx(yx,n),[a,c]=v.useState(r),u=v.useRef(null),d=Ke(t,u),f=v.useRef(0),h=f.current,y=v.useRef(0),x=y.current,g=o.open||a,w=v.useRef(g),m=v.useRef();return v.useEffect(()=>{const p=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(p)},[]),en(()=>{const p=u.current;if(p){m.current=m.current||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const b=p.getBoundingClientRect();f.current=b.height,y.current=b.width,w.current||(p.style.transitionDuration=m.current.transitionDuration,p.style.animationName=m.current.animationName),c(r)}},[o.open,r]),l.jsx(Re.div,{"data-state":vx(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...i,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&s})});function vx(e){return e?"open":"closed"}var SB=O2,kB=I2,CB=M2,Hs="Accordion",jB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[xx,EB,NB]=zc(Hs),[$h,UH]=on(Hs,[NB,A2]),wx=A2(),L2=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,i=r;return l.jsx(xx.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(AB,{...i,ref:t}):l.jsx(PB,{...s,ref:t})})});L2.displayName=Hs;var[F2,TB]=$h(Hs),[z2,RB]=$h(Hs,{collapsible:!1}),PB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[a,c]=Zn({prop:n,defaultProp:r,onChange:s});return l.jsx(F2,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>i&&c(""),[i,c]),children:l.jsx(z2,{scope:e.__scopeAccordion,collapsible:i,children:l.jsx($2,{...o,ref:t})})})}),AB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=e,[o=[],a]=Zn({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(F2,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(z2,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx($2,{...i,ref:t})})})}),[OB,Uh]=$h(Hs),$2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=e,a=We.useRef(null),c=Ke(a,t),u=EB(n),f=xo(s)==="ltr",h=ue(e.onKeyDown,y=>{var P;if(!jB.includes(y.key))return;const x=y.target,g=u().filter(A=>{var D;return!((D=A.ref.current)!=null&&D.disabled)}),w=g.findIndex(A=>A.ref.current===x),m=g.length;if(w===-1)return;y.preventDefault();let p=w;const b=0,_=m-1,C=()=>{p=w+1,p>_&&(p=b)},j=()=>{p=w-1,p{const{__scopeAccordion:n,value:r,...s}=e,i=Uh(_f,n),o=TB(_f,n),a=wx(n),c=Wn(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return l.jsx(DB,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(SB,{"data-orientation":i.orientation,"data-state":K2(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(r):o.onItemClose(r)}})})});U2.displayName=_f;var V2="AccordionHeader",B2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(V2,n);return l.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":K2(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});B2.displayName=V2;var _g="AccordionTrigger",W2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(_g,n),o=RB(_g,n),a=wx(n);return l.jsx(xx.ItemSlot,{scope:n,children:l.jsx(kB,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:t})})});W2.displayName=_g;var H2="AccordionContent",Y2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(H2,n),o=wx(n);return l.jsx(CB,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Y2.displayName=H2;function K2(e){return e?"open":"closed"}var IB=L2,MB=U2,LB=B2,G2=W2,Z2=Y2;const S1=IB,jl=v.forwardRef(({className:e,...t},n)=>l.jsx(MB,{ref:n,className:se("border-b",e),...t}));jl.displayName="AccordionItem";const El=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(LB,{className:"flex",children:l.jsxs(G2,{ref:r,className:se("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(Sy,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));El.displayName=G2.displayName;const Nl=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(Z2,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:se("pb-4 pt-0",e),children:t})}));Nl.displayName=Z2.displayName;const FB=()=>{const{t:e}=it();return l.jsx(l.Fragment,{children:l.jsxs(hB,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(S1,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs(jl,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("template")}),l.jsx(Nl,{children:l.jsx(gB,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(S1,{type:"single",className:"dark:text-stone-200",children:[l.jsxs(jl,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("ding.talk")}),l.jsx(Nl,{children:l.jsx(pB,{})})]}),l.jsxs(jl,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("telegram")}),l.jsx(Nl,{children:l.jsx(yB,{})})]}),l.jsxs(jl,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("webhook")}),l.jsx(Nl,{children:l.jsx(xB,{})})]})]})})]})})};var _x="Radio",[zB,q2]=on(_x),[$B,UB]=zB(_x),X2=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...u}=e,[d,f]=v.useState(null),h=Ke(t,g=>f(g)),y=v.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs($B,{scope:n,checked:s,disabled:o,children:[l.jsx(Re.button,{type:"button",role:"radio","aria-checked":s,"data-state":eT(s),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:h,onClick:ue(e.onClick,g=>{s||c==null||c(),x&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),x&&l.jsx(VB,{control:d,bubbles:!y.current,name:r,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});X2.displayName=_x;var Q2="RadioIndicator",J2=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,i=UB(Q2,n);return l.jsx(an,{present:r||i.checked,children:l.jsx(Re.span,{"data-state":eT(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})})});J2.displayName=Q2;var VB=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,i=v.useRef(null),o=Wv(n),a=My(t);return v.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[o,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function eT(e){return e?"checked":"unchecked"}var BB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sx="RadioGroup",[WB,VH]=on(Sx,[Wa,q2]),tT=Wa(),nT=q2(),[HB,YB]=WB(Sx),rT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,y=tT(n),x=xo(u),[g,w]=Zn({prop:i,defaultProp:s,onChange:f});return l.jsx(HB,{scope:n,name:r,required:o,disabled:a,value:g,onValueChange:w,children:l.jsx(By,{asChild:!0,...y,orientation:c,dir:x,loop:d,children:l.jsx(Re.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});rT.displayName=Sx;var sT="RadioGroupItem",iT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,i=YB(sT,n),o=i.disabled||r,a=tT(n),c=nT(n),u=v.useRef(null),d=Ke(t,u),f=i.value===s.value,h=v.useRef(!1);return v.useEffect(()=>{const y=g=>{BB.includes(g.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",x)}},[]),l.jsx(Wy,{asChild:!0,...a,focusable:!o,active:f,children:l.jsx(X2,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:d,onCheck:()=>i.onValueChange(s.value),onKeyDown:ue(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ue(s.onFocus,()=>{var y;h.current&&((y=u.current)==null||y.click())})})})});iT.displayName=sT;var KB="RadioGroupIndicator",oT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=nT(n);return l.jsx(J2,{...s,...r,ref:t})});oT.displayName=KB;var aT=rT,lT=iT,GB=oT;const cT=v.forwardRef(({className:e,...t},n)=>l.jsx(aT,{className:se("grid gap-2",e),...t,ref:n}));cT.displayName=aT.displayName;const Sg=v.forwardRef(({className:e,...t},n)=>l.jsx(lT,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(GB,{className:"flex items-center justify-center",children:l.jsx(lS,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Sg.displayName=lT.displayName;const ZB=()=>{const{t:e}=it(),t=ce.object({provider:ce.enum(["letsencrypt","zerossl"],{message:e("setting.ca.not.empty")}),eabKid:ce.string().optional(),eabHmacKey:ce.string().optional()}),n=pn({resolver:mn(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=v.useState("letsencrypt"),[i,o]=v.useState(),{toast:a}=Ir();v.useEffect(()=>{(async()=>{const f=await Mv("ssl-provider");if(f){o(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:i==null?void 0:i.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await Ga(f),a({title:e("update.succeed"),description:e("update.succeed")})}catch(h){const y=Os(h);a({title:e("update.failed"),description:y,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("ca")}),l.jsx(we,{children:l.jsxs(cT,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Sg,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Ri,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Sg,{value:"zerossl",id:"zerossl"}),l.jsx(Ri,{htmlFor:"zerossl",children:l.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(Se,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_KID"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_kid.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_HMAC_KEY"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_hmac_key.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("setting.submit")})})]})})})})},qB=cO([{path:"/",element:l.jsx(A6,{}),children:[{path:"/",element:l.jsx(cB,{})},{path:"/domains",element:l.jsx(e8,{})},{path:"/edit",element:l.jsx(jV,{})},{path:"/access",element:l.jsx(eB,{})},{path:"/history",element:l.jsx(nB,{})},{path:"/setting",element:l.jsx(lB,{}),children:[{path:"/setting/password",element:l.jsx(aB,{})},{path:"/setting/account",element:l.jsx(dB,{})},{path:"/setting/notify",element:l.jsx(FB,{})},{path:"/setting/ssl-provider",element:l.jsx(ZB,{})}]}]},{path:"/login",element:l.jsx(iB,{}),children:[{path:"/login",element:l.jsx(sB,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),{slice:XB,forEach:QB}=[];function JB(e){return QB.call(XB.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const k1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,eW=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let i=`${e}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!k1.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!k1.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},C1={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=eW(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}};let pl=null;const j1=()=>{if(pl!==null)return pl;try{pl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{pl=!1}return pl};var rW={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&j1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&j1()&&window.localStorage.setItem(n,e)}};let ml=null;const E1=()=>{if(ml!==null)return ml;try{ml=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ml=!1}return ml};var sW={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&E1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&E1()&&window.sessionStorage.setItem(n,e)}},iW={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let i=0;i0?t:void 0}},oW={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},aW={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},lW={name:"subdomain",lookup(e){var s,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function cW(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class uT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=JB(n,this.options||{},cW()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(tW),this.addDetector(nW),this.addDetector(rW),this.addDetector(sW),this.addDetector(iW),this.addDetector(oW),this.addDetector(aW),this.addDetector(lW)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}uT.type="languageDetector";const uW="证书颁发机构",dW="用户名",fW="密码",hW="邮箱",pW="退出登录",mW="设置",gW="账户",yW="模版",vW="保存",xW="状态",wW="操作",bW="启用",_W="禁用",SW="部署",kW="下载",CW="取消",jW="确认",EW="编辑",NW="复制",TW="成功",RW="新增",PW="文档",AW="变量",OW="域名服务器",DW="名称",IW="Telegram",MW="Webhook",LW="腾讯云",FW="阿里云",zW="七牛云",$W="Cloudflare",UW="Namesilo",VW="SSH 部署",BW="控制面板",WW="域名",HW={ca:uW,username:dW,"username.not.empty":"请输入用户名",password:fW,"password.not.empty":"请输入密码",email:hW,logout:pW,setting:mW,account:gW,template:yW,save:vW,"no.data":"暂无数据",status:xW,operation:wW,enable:bW,disable:_W,deploy:SW,download:kW,delete:"删除",cancel:CW,confirm:jW,edit:EW,copy:NW,succeed:TW,add:RW,document:PW,variables:AW,dns:OW,name:DW,"create.time":"创建时间","update.time":"更新时间","created.in":"创建于","updated.in":"更新于","basic.setting":"基础设置","advanced.setting":"高级设置","operation.succeed":"操作成功","save.succeed":"保存成功","save.failed":"保存失败","update.succeed":"修改成功","update.failed":"修改失败","delete.failed":"删除失败","ding.talk":"钉钉",telegram:IW,webhook:MW,"local.deployment":"本地部署",tencent:LW,"tencent.cdn":"腾讯云-CDN",aliyun:FW,"aliyun.cdn":"阿里云-CDN","aliyun.oss":"阿里云-OSS","aliyun.dcdn":"阿里云-DCDN",qiniu:zW,"qiniu.cdn":"七牛云-CDN",cloudflare:$W,namesilo:UW,"go.daddy":"GoDaddy",ssh:VW,"zod.rule.string.max":"请输入不超过 {{max}} 个字符","zod.rule.url":"请输入有效的 url 地址","zod.rule.ssh.host":"请输入正确的域名或IP","login.submit":"登录","login.username.no.empty.message":"请输入正确的邮箱地址","login.password.length.message":"密码至少10个字符","menu.auth.management":"授权管理","theme.light":"浅色","theme.dark":"暗黑","theme.system":"系统",dashboard:BW,"dashboard.all":"所有","dashboard.near.expired":"即将过期","dashboard.enabled":"启用中","dashboard.not.enabled":"未启用","dashboard.unit":"个","deployment.log.name":"部署历史","deployment.log.empty":"你暂未创建任何部署,请先添加域名进行部署吧!","deployment.log.status":"状态","deployment.log.stage":"阶段","deployment.log.last.execution.time":"最近执行时间","deployment.log.detail.button.text":"日志","deployment.log.detail":"部署详情","pagination.next":"下一页","pagination.prev":"上一页",domain:WW,"domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.not.empty.verify.message":"请输入域名","domain.management.name":"域名列表","domain.management.start.deploy.succeed.tips":"已发起部署,请稍后查看部署日志。","domain.management.execution.failed":"执行失败","domain.management.execution.failed.tips":"执行失败,请在 <1>部署历史 查看详情。","domain.management.empty":"请添加域名开始部署证书吧。","domain.management.expiry.date":"有效期限","domain.management.expiry.date1":"有效期 {{date}} 天","domain.management.expiry.date2":"{{date}} 到期","domain.management.last.execution.time":"最近执行时间","domain.management.last.execution.status":"最近执行状态","domain.management.last.execution.stage":"最近执行阶段","domain.management.enable":"是否启用","domain.management.start.deploying":"立即部署","domain.management.forced.deployment":"强行部署","domain.management.delete.confirm":"确定要删除域名吗?","domain.management.edit.title":"编辑域名","domain.management.edit.dns.access.label":"DNS 服务商授权配置","domain.management.edit.dns.access.not.empty.message":"请选择DNS服务商授权配置","domain.management.edit.access.label":"服务商授权配置","domain.management.edit.access.not.empty.message":"请选择授权配置","domain.management.edit.target.type":"部署服务类型","domain.management.edit.target.type.not.empty.message":"请选择部署服务类型","domain.management.edit.succeed.tips":"域名编辑成功","domain.management.edit.target.access":"部署服务商授权配置","domain.management.edit.target.access.content.label":"服务商授权配置","domain.management.edit.target.access.not.empty.message":"请选择授权配置","domain.management.edit.target.access.verify.msg":"部署授权和部署授权组至少选一个","domain.management.edit.group.label":"部署配置组(用于将一个域名证书部署到多个 ssh 主机)","domain.management.edit.group.not.empty.message":"请选择分组","domain.management.edit.email.not.empty.message":"请选择邮箱","domain.management.edit.email.description":"(申请证书需要提供邮箱)","domain.management.edit.variables.placeholder":`可在SSH部署中使用,形如: +\0`,re+=i($,2),re+=j.magic,re+=i(b,2),re+=i(_,2),re+=i(X.crc32,4),re+=i(X.compressedSize,4),re+=i(X.uncompressedSize,4),re+=i(P.length,2),re+=i(U.length,2),{fileRecord:f.LOCAL_FILE_HEADER+re+P+U,dirRecord:f.CENTRAL_FILE_HEADER+i(he,2)+re+i(G.length,2)+"\0\0\0\0"+i(B,4)+i(w,4)+P+U+G}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),d=n("../crc32"),f=n("../signature");function h(y,x,g,w){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=x,this.zipPlatform=g,this.encodeFileName=w,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(h,c),h.prototype.push=function(y){var x=y.meta.percent||0,g=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,c.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:g?(x+100*(g-w-1))/g:100}}))},h.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var x=this.streamFiles&&!y.file.dir;if(x){var g=o(y,x,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(y){this.accumulate=!1;var x=this.streamFiles&&!y.file.dir,g=o(y,x,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),x)this.push({data:function(w){return f.DATA_DESCRIPTOR+i(w.crc32,4)+i(w.compressedSize,4)+i(w.uncompressedSize,4)}(y),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var y=this.bytesWritten,x=0;x=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(n,r,s){var i=n("./Uint8ArrayReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var i=n("./DataReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var i=n("./ArrayReader");function o(a){i.call(this,a)}n("../utils").inherits(o,i),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var i=n("../utils"),o=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var h=i.getTypeOf(f);return i.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new u(f):o.uint8array?new d(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,s){var i=n("./GenericWorker"),o=n("../utils");function a(c){i.call(this,"ConvertWorker to "+c),this.destType=c}o.inherits(a,i),a.prototype.processChunk=function(c){this.push({data:o.transformTo(this.destType,c.data),meta:c.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var i=n("./GenericWorker"),o=n("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,i),a.prototype.processChunk=function(c){this.streamInfo.crc32=o(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var i=n("../utils"),o=n("./GenericWorker");function a(c){o.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(a,o),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}o.prototype.processChunk.call(this,c)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var i=n("../utils"),o=n("./GenericWorker");function a(c){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){u.dataIsReady=!0,u.data=d,u.max=d&&d.length||0,u.type=i.getTypeOf(d),u.isPaused||u._tickAndRepeat()},function(d){u.error(d)})}i.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var c=0;c "+o:o}},r.exports=i},{}],29:[function(n,r,s){var i=n("../utils"),o=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),d=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(x,g){return new d.Promise(function(w,m){var p=[],b=x._internalType,_=x._outputType,C=x._mimeType;x.on("data",function(j,T){p.push(j),g&&g(T)}).on("error",function(j){p=[],m(j)}).on("end",function(){try{var j=function(T,P,A){switch(T){case"blob":return i.newBlob(i.transformTo("arraybuffer",P),A);case"base64":return c.encode(P);default:return i.transformTo(T,P)}}(_,function(T,P){var A,D=0,G=null,N=0;for(A=0;A"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),s.blob=o.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var i=n("./utils"),o=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),d=0;d<256;d++)u[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;u[254]=u[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function h(){c.call(this,"utf-8 encode")}s.utf8encode=function(y){return o.nodebuffer?a.newBufferFrom(y,"utf-8"):function(x){var g,w,m,p,b,_=x.length,C=0;for(p=0;p<_;p++)(64512&(w=x.charCodeAt(p)))==55296&&p+1<_&&(64512&(m=x.charCodeAt(p+1)))==56320&&(w=65536+(w-55296<<10)+(m-56320),p++),C+=w<128?1:w<2048?2:w<65536?3:4;for(g=o.uint8array?new Uint8Array(C):new Array(C),p=b=0;b>>6:(w<65536?g[b++]=224|w>>>12:(g[b++]=240|w>>>18,g[b++]=128|w>>>12&63),g[b++]=128|w>>>6&63),g[b++]=128|63&w);return g}(y)},s.utf8decode=function(y){return o.nodebuffer?i.transformTo("nodebuffer",y).toString("utf-8"):function(x){var g,w,m,p,b=x.length,_=new Array(2*b);for(g=w=0;g>10&1023,_[w++]=56320|1023&m)}return _.length!==w&&(_.subarray?_=_.subarray(0,w):_.length=w),i.applyFromCharCode(_)}(y=i.transformTo(o.uint8array?"uint8array":"array",y))},i.inherits(f,c),f.prototype.processChunk=function(y){var x=i.transformTo(o.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=x;(x=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),x.set(g,this.leftOver.length)}else x=this.leftOver.concat(x);this.leftOver=null}var w=function(p,b){var _;for((b=b||p.length)>p.length&&(b=p.length),_=b-1;0<=_&&(192&p[_])==128;)_--;return _<0||_===0?b:_+u[p[_]]>b?_:b}(x),m=x;w!==x.length&&(o.uint8array?(m=x.subarray(0,w),this.leftOver=x.subarray(w,x.length)):(m=x.slice(0,w),this.leftOver=x.slice(w,x.length))),this.push({data:s.utf8decode(m),meta:y.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,i.inherits(h,c),h.prototype.processChunk=function(y){this.push({data:s.utf8encode(y.data),meta:y.meta})},s.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var i=n("./support"),o=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(g){return g}function d(g,w){for(var m=0;m>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var x,g,w,m=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4>>6:(y<65536?h[w++]=224|y>>>12:(h[w++]=240|y>>>18,h[w++]=128|y>>>12&63),h[w++]=128|y>>>6&63),h[w++]=128|63&y);return h},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var h=new i.Buf8(f.length),y=0,x=h.length;y>10&1023,p[x++]=56320|1023&g)}return d(p,x)},s.utf8border=function(f,h){var y;for((h=h||f.length)>f.length&&(h=f.length),y=h-1;0<=y&&(192&f[y])==128;)y--;return y<0||y===0?h:y+c[f[y]]>h?y:h}},{"./common":41}],43:[function(n,r,s){r.exports=function(i,o,a,c){for(var u=65535&i|0,d=i>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3>>1:o>>>1;a[c]=o}return a}();r.exports=function(o,a,c,u){var d=i,f=u+c;o^=-1;for(var h=u;h>>8^d[255&(o^a[h])];return-1^o}},{}],46:[function(n,r,s){var i,o=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),d=n("./messages"),f=0,h=4,y=0,x=-2,g=-1,w=4,m=2,p=8,b=9,_=286,C=30,j=19,T=2*_+1,P=15,A=3,D=258,G=D+A+1,N=42,F=113,S=1,U=2,J=3,z=4;function W(E,ee){return E.msg=d[ee],ee}function I(E){return(E<<1)-(4E.avail_out&&(Z=E.avail_out),Z!==0&&(o.arraySet(E.output,ee.pending_buf,ee.pending_out,Z,E.next_out),E.next_out+=Z,ee.pending_out+=Z,E.total_out+=Z,E.avail_out-=Z,ee.pending-=Z,ee.pending===0&&(ee.pending_out=0))}function B(E,ee){a._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,ee),E.block_start=E.strstart,$(E.strm)}function he(E,ee){E.pending_buf[E.pending++]=ee}function re(E,ee){E.pending_buf[E.pending++]=ee>>>8&255,E.pending_buf[E.pending++]=255&ee}function ie(E,ee){var Z,O,k=E.max_chain_length,R=E.strstart,M=E.prev_length,K=E.nice_match,L=E.strstart>E.w_size-G?E.strstart-(E.w_size-G):0,Y=E.window,Q=E.w_mask,te=E.prev,me=E.strstart+D,Ye=Y[R+M-1],$e=Y[R+M];E.prev_length>=E.good_match&&(k>>=2),K>E.lookahead&&(K=E.lookahead);do if(Y[(Z=ee)+M]===$e&&Y[Z+M-1]===Ye&&Y[Z]===Y[R]&&Y[++Z]===Y[R+1]){R+=2,Z++;do;while(Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&Y[++R]===Y[++Z]&&RL&&--k!=0);return M<=E.lookahead?M:E.lookahead}function De(E){var ee,Z,O,k,R,M,K,L,Y,Q,te=E.w_size;do{if(k=E.window_size-E.lookahead-E.strstart,E.strstart>=te+(te-G)){for(o.arraySet(E.window,E.window,te,te,0),E.match_start-=te,E.strstart-=te,E.block_start-=te,ee=Z=E.hash_size;O=E.head[--ee],E.head[ee]=te<=O?O-te:0,--Z;);for(ee=Z=te;O=E.prev[--ee],E.prev[ee]=te<=O?O-te:0,--Z;);k+=te}if(E.strm.avail_in===0)break;if(M=E.strm,K=E.window,L=E.strstart+E.lookahead,Y=k,Q=void 0,Q=M.avail_in,Y=A)for(R=E.strstart-E.insert,E.ins_h=E.window[R],E.ins_h=(E.ins_h<=A&&(E.ins_h=(E.ins_h<=A)if(O=a._tr_tally(E,E.strstart-E.match_start,E.match_length-A),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=A){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<=A&&(E.ins_h=(E.ins_h<=A&&E.match_length<=E.prev_length){for(k=E.strstart+E.lookahead-A,O=a._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-A),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=k&&(E.ins_h=(E.ins_h<E.pending_buf_size-5&&(Z=E.pending_buf_size-5);;){if(E.lookahead<=1){if(De(E),E.lookahead===0&&ee===f)return S;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var O=E.block_start+Z;if((E.strstart===0||E.strstart>=O)&&(E.lookahead=E.strstart-O,E.strstart=O,B(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-G&&(B(E,!1),E.strm.avail_out===0))return S}return E.insert=0,ee===h?(B(E,!0),E.strm.avail_out===0?J:z):(E.strstart>E.block_start&&(B(E,!1),E.strm.avail_out),S)}),new Te(4,4,8,4,pe),new Te(4,5,16,8,pe),new Te(4,6,32,32,pe),new Te(4,4,16,16,_e),new Te(8,16,32,32,_e),new Te(8,16,128,128,_e),new Te(8,32,128,256,_e),new Te(32,128,258,1024,_e),new Te(32,258,258,4096,_e)],s.deflateInit=function(E,ee){return rt(E,ee,p,15,8,0)},s.deflateInit2=rt,s.deflateReset=Pe,s.deflateResetKeep=Ie,s.deflateSetHeader=function(E,ee){return E&&E.state?E.state.wrap!==2?x:(E.state.gzhead=ee,y):x},s.deflate=function(E,ee){var Z,O,k,R;if(!E||!E.state||5>8&255),he(O,O.gzhead.time>>16&255),he(O,O.gzhead.time>>24&255),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,255&O.gzhead.os),O.gzhead.extra&&O.gzhead.extra.length&&(he(O,255&O.gzhead.extra.length),he(O,O.gzhead.extra.length>>8&255)),O.gzhead.hcrc&&(E.adler=u(E.adler,O.pending_buf,O.pending,0)),O.gzindex=0,O.status=69):(he(O,0),he(O,0),he(O,0),he(O,0),he(O,0),he(O,O.level===9?2:2<=O.strategy||O.level<2?4:0),he(O,3),O.status=F);else{var M=p+(O.w_bits-8<<4)<<8;M|=(2<=O.strategy||O.level<2?0:O.level<6?1:O.level===6?2:3)<<6,O.strstart!==0&&(M|=32),M+=31-M%31,O.status=F,re(O,M),O.strstart!==0&&(re(O,E.adler>>>16),re(O,65535&E.adler)),E.adler=1}if(O.status===69)if(O.gzhead.extra){for(k=O.pending;O.gzindex<(65535&O.gzhead.extra.length)&&(O.pending!==O.pending_buf_size||(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending!==O.pending_buf_size));)he(O,255&O.gzhead.extra[O.gzindex]),O.gzindex++;O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),O.gzindex===O.gzhead.extra.length&&(O.gzindex=0,O.status=73)}else O.status=73;if(O.status===73)if(O.gzhead.name){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindexk&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.gzindex=0,O.status=91)}else O.status=91;if(O.status===91)if(O.gzhead.comment){k=O.pending;do{if(O.pending===O.pending_buf_size&&(O.gzhead.hcrc&&O.pending>k&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),$(E),k=O.pending,O.pending===O.pending_buf_size)){R=1;break}R=O.gzindexk&&(E.adler=u(E.adler,O.pending_buf,O.pending-k,k)),R===0&&(O.status=103)}else O.status=103;if(O.status===103&&(O.gzhead.hcrc?(O.pending+2>O.pending_buf_size&&$(E),O.pending+2<=O.pending_buf_size&&(he(O,255&E.adler),he(O,E.adler>>8&255),E.adler=0,O.status=F)):O.status=F),O.pending!==0){if($(E),E.avail_out===0)return O.last_flush=-1,y}else if(E.avail_in===0&&I(ee)<=I(Z)&&ee!==h)return W(E,-5);if(O.status===666&&E.avail_in!==0)return W(E,-5);if(E.avail_in!==0||O.lookahead!==0||ee!==f&&O.status!==666){var K=O.strategy===2?function(L,Y){for(var Q;;){if(L.lookahead===0&&(De(L),L.lookahead===0)){if(Y===f)return S;break}if(L.match_length=0,Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++,Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):O.strategy===3?function(L,Y){for(var Q,te,me,Ye,$e=L.window;;){if(L.lookahead<=D){if(De(L),L.lookahead<=D&&Y===f)return S;if(L.lookahead===0)break}if(L.match_length=0,L.lookahead>=A&&0L.lookahead&&(L.match_length=L.lookahead)}if(L.match_length>=A?(Q=a._tr_tally(L,1,L.match_length-A),L.lookahead-=L.match_length,L.strstart+=L.match_length,L.match_length=0):(Q=a._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++),Q&&(B(L,!1),L.strm.avail_out===0))return S}return L.insert=0,Y===h?(B(L,!0),L.strm.avail_out===0?J:z):L.last_lit&&(B(L,!1),L.strm.avail_out===0)?S:U}(O,ee):i[O.level].func(O,ee);if(K!==J&&K!==z||(O.status=666),K===S||K===J)return E.avail_out===0&&(O.last_flush=-1),y;if(K===U&&(ee===1?a._tr_align(O):ee!==5&&(a._tr_stored_block(O,0,0,!1),ee===3&&(X(O.head),O.lookahead===0&&(O.strstart=0,O.block_start=0,O.insert=0))),$(E),E.avail_out===0))return O.last_flush=-1,y}return ee!==h?y:O.wrap<=0?1:(O.wrap===2?(he(O,255&E.adler),he(O,E.adler>>8&255),he(O,E.adler>>16&255),he(O,E.adler>>24&255),he(O,255&E.total_in),he(O,E.total_in>>8&255),he(O,E.total_in>>16&255),he(O,E.total_in>>24&255)):(re(O,E.adler>>>16),re(O,65535&E.adler)),$(E),0=Z.w_size&&(R===0&&(X(Z.head),Z.strstart=0,Z.block_start=0,Z.insert=0),Y=new o.Buf8(Z.w_size),o.arraySet(Y,ee,Q-Z.w_size,Z.w_size,0),ee=Y,Q=Z.w_size),M=E.avail_in,K=E.next_in,L=E.input,E.avail_in=Q,E.next_in=0,E.input=ee,De(Z);Z.lookahead>=A;){for(O=Z.strstart,k=Z.lookahead-(A-1);Z.ins_h=(Z.ins_h<>>=A=P>>>24,b-=A,(A=P>>>16&255)===0)U[d++]=65535&P;else{if(!(16&A)){if(!(64&A)){P=_[(65535&P)+(p&(1<>>=A,b-=A),b<15&&(p+=S[c++]<>>=A=P>>>24,b-=A,!(16&(A=P>>>16&255))){if(!(64&A)){P=C[(65535&P)+(p&(1<>>=A,b-=A,(A=d-f)>3,p&=(1<<(b-=D<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function p(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(N){var F;return N&&N.state?(F=N.state,N.total_in=N.total_out=F.total=0,N.msg="",F.wrap&&(N.adler=1&F.wrap),F.mode=x,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(g),F.distcode=F.distdyn=new i.Buf32(w),F.sane=1,F.back=-1,h):y}function _(N){var F;return N&&N.state?((F=N.state).wsize=0,F.whave=0,F.wnext=0,b(N)):y}function C(N,F){var S,U;return N&&N.state?(U=N.state,F<0?(S=0,F=-F):(S=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15=z.wsize?(i.arraySet(z.window,F,S-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(U<(J=z.wsize-z.wnext)&&(J=U),i.arraySet(z.window,F,S-U,J,z.wnext),(U-=J)?(i.arraySet(z.window,F,S-U,U,0),z.wnext=U,z.whave=z.wsize):(z.wnext+=J,z.wnext===z.wsize&&(z.wnext=0),z.whave>>8&255,S.check=a(S.check,R,2,0),B=$=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&$)<<8)+($>>8))%31){N.msg="incorrect header check",S.mode=30;break}if((15&$)!=8){N.msg="unknown compression method",S.mode=30;break}if(B-=4,E=8+(15&($>>>=4)),S.wbits===0)S.wbits=E;else if(E>S.wbits){N.msg="invalid window size",S.mode=30;break}S.dmax=1<>8&1),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=3;case 3:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<>>8&255,R[2]=$>>>16&255,R[3]=$>>>24&255,S.check=a(S.check,R,4,0)),B=$=0,S.mode=4;case 4:for(;B<16;){if(I===0)break e;I--,$+=U[z++]<>8),512&S.flags&&(R[0]=255&$,R[1]=$>>>8&255,S.check=a(S.check,R,2,0)),B=$=0,S.mode=5;case 5:if(1024&S.flags){for(;B<16;){if(I===0)break e;I--,$+=U[z++]<>>8&255,S.check=a(S.check,R,2,0)),B=$=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&(I<(ie=S.length)&&(ie=I),ie&&(S.head&&(E=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),i.arraySet(S.head.extra,U,z,ie,E)),512&S.flags&&(S.check=a(S.check,U,ie,z)),I-=ie,z+=ie,S.length-=ie),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(I===0)break e;for(ie=0;E=U[z+ie++],S.head&&E&&S.length<65536&&(S.head.name+=String.fromCharCode(E)),E&&ie>9&1,S.head.done=!0),N.adler=S.check=0,S.mode=12;break;case 10:for(;B<32;){if(I===0)break e;I--,$+=U[z++]<>>=7&B,B-=7&B,S.mode=27;break}for(;B<3;){if(I===0)break e;I--,$+=U[z++]<>>=1)){case 0:S.mode=14;break;case 1:if(D(S),S.mode=20,F!==6)break;$>>>=2,B-=2;break e;case 2:S.mode=17;break;case 3:N.msg="invalid block type",S.mode=30}$>>>=2,B-=2;break;case 14:for($>>>=7&B,B-=7&B;B<32;){if(I===0)break e;I--,$+=U[z++]<>>16^65535)){N.msg="invalid stored block lengths",S.mode=30;break}if(S.length=65535&$,B=$=0,S.mode=15,F===6)break e;case 15:S.mode=16;case 16:if(ie=S.length){if(I>>=5,B-=5,S.ndist=1+(31&$),$>>>=5,B-=5,S.ncode=4+(15&$),$>>>=4,B-=4,286>>=3,B-=3}for(;S.have<19;)S.lens[M[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,Z={bits:S.lenbits},ee=u(0,S.lens,0,19,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid code lengths set",S.mode=30;break}S.have=0,S.mode=19;case 19:for(;S.have>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=_e,B-=_e,S.lens[S.have++]=Fe;else{if(Fe===16){for(O=_e+2;B>>=_e,B-=_e,S.have===0){N.msg="invalid bit length repeat",S.mode=30;break}E=S.lens[S.have-1],ie=3+(3&$),$>>>=2,B-=2}else if(Fe===17){for(O=_e+3;B>>=_e)),$>>>=3,B-=3}else{for(O=_e+7;B>>=_e)),$>>>=7,B-=7}if(S.have+ie>S.nlen+S.ndist){N.msg="invalid bit length repeat",S.mode=30;break}for(;ie--;)S.lens[S.have++]=E}}if(S.mode===30)break;if(S.lens[256]===0){N.msg="invalid code -- missing end-of-block",S.mode=30;break}if(S.lenbits=9,Z={bits:S.lenbits},ee=u(d,S.lens,0,S.nlen,S.lencode,0,S.work,Z),S.lenbits=Z.bits,ee){N.msg="invalid literal/lengths set",S.mode=30;break}if(S.distbits=6,S.distcode=S.distdyn,Z={bits:S.distbits},ee=u(f,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,Z),S.distbits=Z.bits,ee){N.msg="invalid distances set",S.mode=30;break}if(S.mode=20,F===6)break e;case 20:S.mode=21;case 21:if(6<=I&&258<=X){N.next_out=W,N.avail_out=X,N.next_in=z,N.avail_in=I,S.hold=$,S.bits=B,c(N,re),W=N.next_out,J=N.output,X=N.avail_out,z=N.next_in,U=N.input,I=N.avail_in,$=S.hold,B=S.bits,S.mode===12&&(S.back=-1);break}for(S.back=0;Te=(k=S.lencode[$&(1<>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,S.length=Fe,Te===0){S.mode=26;break}if(32&Te){S.back=-1,S.mode=12;break}if(64&Te){N.msg="invalid literal/length code",S.mode=30;break}S.extra=15&Te,S.mode=22;case 22:if(S.extra){for(O=S.extra;B>>=S.extra,B-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;Te=(k=S.distcode[$&(1<>>16&255,Fe=65535&k,!((_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>Ie)])>>>16&255,Fe=65535&k,!(Ie+(_e=k>>>24)<=B);){if(I===0)break e;I--,$+=U[z++]<>>=Ie,B-=Ie,S.back+=Ie}if($>>>=_e,B-=_e,S.back+=_e,64&Te){N.msg="invalid distance code",S.mode=30;break}S.offset=Fe,S.extra=15&Te,S.mode=24;case 24:if(S.extra){for(O=S.extra;B>>=S.extra,B-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){N.msg="invalid distance too far back",S.mode=30;break}S.mode=25;case 25:if(X===0)break e;if(ie=re-X,S.offset>ie){if((ie=S.offset-ie)>S.whave&&S.sane){N.msg="invalid distance too far back",S.mode=30;break}De=ie>S.wnext?(ie-=S.wnext,S.wsize-ie):S.wnext-ie,ie>S.length&&(ie=S.length),pe=S.window}else pe=J,De=W-S.offset,ie=S.length;for(XT?(A=De[pe+w[F]],B[he+w[F]]):(A=96,0),p=1<>W)+(b-=p)]=P<<24|A<<16|D|0,b!==0;);for(p=1<>=1;if(p!==0?($&=p-1,$+=p):$=0,F++,--re[N]==0){if(N===U)break;N=f[h+w[F]]}if(J>>7)]}function he(k,R){k.pending_buf[k.pending++]=255&R,k.pending_buf[k.pending++]=R>>>8&255}function re(k,R,M){k.bi_valid>m-M?(k.bi_buf|=R<>m-k.bi_valid,k.bi_valid+=M-m):(k.bi_buf|=R<>>=1,M<<=1,0<--R;);return M>>>1}function pe(k,R,M){var K,L,Y=new Array(w+1),Q=0;for(K=1;K<=w;K++)Y[K]=Q=Q+M[K-1]<<1;for(L=0;L<=R;L++){var te=k[2*L+1];te!==0&&(k[2*L]=De(Y[te]++,te))}}function _e(k){var R;for(R=0;R>1;1<=M;M--)Ie(k,Y,M);for(L=me;M=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ie(k,Y,1),K=k.heap[1],k.heap[--k.heap_max]=M,k.heap[--k.heap_max]=K,Y[2*L]=Y[2*M]+Y[2*K],k.depth[L]=(k.depth[M]>=k.depth[K]?k.depth[M]:k.depth[K])+1,Y[2*M+1]=Y[2*K+1]=L,k.heap[1]=L++,Ie(k,Y,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],function($e,Et){var Jn,Yt,rs,lt,ss,is,er=Et.dyn_tree,ou=Et.max_code,au=Et.stat_desc.static_tree,ko=Et.stat_desc.has_stree,lu=Et.stat_desc.extra_bits,Co=Et.stat_desc.extra_base,Mr=Et.stat_desc.max_length,Ys=0;for(lt=0;lt<=w;lt++)$e.bl_count[lt]=0;for(er[2*$e.heap[$e.heap_max]+1]=0,Jn=$e.heap_max+1;Jn>=7;L>>=1)if(1&Ye&&te.dyn_ltree[2*me]!==0)return o;if(te.dyn_ltree[18]!==0||te.dyn_ltree[20]!==0||te.dyn_ltree[26]!==0)return a;for(me=32;me>>3,(Y=k.static_len+3+7>>>3)<=L&&(L=Y)):L=Y=M+5,M+4<=L&&R!==-1?O(k,R,M,K):k.strategy===4||Y===L?(re(k,2+(K?1:0),3),Pe(k,G,N)):(re(k,4+(K?1:0),3),function(te,me,Ye,$e){var Et;for(re(te,me-257,5),re(te,Ye-1,5),re(te,$e-4,4),Et=0;Et<$e;Et++)re(te,te.bl_tree[2*D[Et]+1],3);ee(te,te.dyn_ltree,me-1),ee(te,te.dyn_dtree,Ye-1)}(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Q+1),Pe(k,k.dyn_ltree,k.dyn_dtree)),_e(k),K&&Te(k)},s._tr_tally=function(k,R,M){return k.pending_buf[k.d_buf+2*k.last_lit]=R>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&R,k.pending_buf[k.l_buf+k.last_lit]=255&M,k.last_lit++,R===0?k.dyn_ltree[2*M]++:(k.matches++,R--,k.dyn_ltree[2*(S[M]+f+1)]++,k.dyn_dtree[2*B(R)]++),k.last_lit===k.lit_bufsize-1},s._tr_align=function(k){re(k,2,3),ie(k,b,G),function(R){R.bi_valid===16?(he(R,R.bi_buf),R.bi_buf=0,R.bi_valid=0):8<=R.bi_valid&&(R.pending_buf[R.pending++]=255&R.bi_buf,R.bi_buf>>=8,R.bi_valid-=8)}(k)}},{"../utils/common":41}],53:[function(n,r,s){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,s){(function(i){(function(o,a){if(!o.setImmediate){var c,u,d,f,h=1,y={},x=!1,g=o.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(o);w=w&&w.setTimeout?w:o,c={}.toString.call(o.process)==="[object process]"?function(_){process.nextTick(function(){p(_)})}:function(){if(o.postMessage&&!o.importScripts){var _=!0,C=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=C,_}}()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",b,!1):o.attachEvent("onmessage",b),function(_){o.postMessage(f+_,"*")}):o.MessageChannel?((d=new MessageChannel).port1.onmessage=function(_){p(_.data)},function(_){d.port2.postMessage(_)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(_){var C=g.createElement("script");C.onreadystatechange=function(){p(_),C.onreadystatechange=null,u.removeChild(C),C=null},u.appendChild(C)}):function(_){setTimeout(p,0,_)},w.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),j=0;j"u"?i===void 0?this:i:self)}).call(this,typeof hu<"u"?hu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(NE);var B$=NE.exports;const W$=Sf(B$);function H$(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{r.result?t(r.result.toString()):n("No content found")},r.onerror=()=>n(r.error),r.readAsText(e)})}const Y$=async(e,t)=>{const n=new W$;t.forEach(i=>{n.file(i.name,i.content)});const r=await n.generateAsync({type:"blob"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,s.click()},Ta=e=>{const t=new Date(e);return new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"Asia/Shanghai"}).format(t)},K$=e=>Ta(e).split(" ")[0];function TE(e){const t=new Date;t.setUTCDate(t.getUTCDate()+e);const n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0"),i=String(t.getUTCHours()).padStart(2,"0"),o=String(t.getUTCMinutes()).padStart(2,"0"),a=String(t.getUTCSeconds()).padStart(2,"0");return`${n}-${r}-${s} ${i}:${o}:${a}`}const G$=async e=>{let t=1;e.page&&(t=e.page);let n=2;e.perPage&&(n=e.perPage);const r=st();let s="";return e.state==="enabled"?s="enabled=true":e.state==="disabled"?s="enabled=false":e.state==="expired"&&(s=r.filter("expiredAt<{:expiredAt}",{expiredAt:TE(15)})),r.collection("domains").getList(t,n,{sort:"-created",expand:"lastDeployment",filter:s})},Z$=async()=>{const e=st(),t=await e.collection("domains").getList(1,1,{}),n=await e.collection("domains").getList(1,1,{filter:e.filter("expiredAt<{:expiredAt}",{expiredAt:TE(15)})}),r=await e.collection("domains").getList(1,1,{filter:"enabled=true"}),s=await e.collection("domains").getList(1,1,{filter:"enabled=false"});return{total:t.totalItems,expired:n.totalItems,enabled:r.totalItems,disabled:s.totalItems}},q$=async e=>await st().collection("domains").getOne(e),cg=async e=>e.id?await st().collection("domains").update(e.id,e):await st().collection("domains").create(e),X$=async e=>await st().collection("domains").delete(e),Q$=(e,t)=>st().collection("domains").subscribe(e,n=>{n.action==="update"&&t(n.record)},{expand:"lastDeployment"}),J$=e=>{st().collection("domains").unsubscribe(e)},e8=()=>{const e=Ir(),t=Dn(),{t:n}=it(),r=Ar(),s=new URLSearchParams(r.search),i=s.get("page"),o=s.get("state"),[a,c]=v.useState(0),u=()=>{t("/edit")},d=_=>{s.set("page",_.toString()),t(`?${s.toString()}`)},f=_=>{t(`/edit?id=${_}`)},h=_=>{t(`/history?domain=${_}`)},y=async _=>{try{await X$(_),g(x.filter(C=>C.id!==_))}catch(C){console.error("Error deleting domain:",C)}},[x,g]=v.useState([]);v.useEffect(()=>{(async()=>{const C=await G$({page:i?Number(i):1,perPage:10,state:o||""});g(C.items),c(C.totalPages)})()},[i,o]);const w=async _=>{const C=x.filter(A=>A.id===_),j=C[0].enabled,T=C[0];T.enabled=!j,await cg(T);const P=x.map(A=>A.id===_?{...A,checked:!j}:A);g(P)},m=async _=>{try{J$(_.id),Q$(_.id,C=>{console.log(C);const j=x.map(T=>T.id===C.id?{...C}:T);g(j)}),_.rightnow=!0,await cg(_),e.toast({title:n("operation.succeed"),description:n("domain.management.start.deploy.succeed.tips")})}catch{e.toast({title:n("domain.management.execution.failed"),description:l.jsxs(mD,{i18nKey:"domain.management.execution.failed.tips",children:["text1",l.jsx(xn,{to:`/history?domain=${_.id}`,className:"underline text-blue-500",children:"text2"}),"text3"]}),variant:"destructive"})}},p=async _=>{await m({..._,deployed:!1})},b=async _=>{const C=`${_.id}-${_.domain}.zip`,j=[{name:`${_.domain}.pem`,content:_.certificate?_.certificate:""},{name:`${_.domain}.key`,content:_.privateKey?_.privateKey:""}];await Y$(C,j)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Zv,{}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:n("domain.management.name")}),l.jsx(Ue,{onClick:u,children:n("domain.add")})]}),x.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-36",children:n("domain")}),l.jsx("div",{className:"w-40",children:n("domain.management.expiry.date")}),l.jsx("div",{className:"w-32",children:n("domain.management.last.execution.status")}),l.jsx("div",{className:"w-64",children:n("domain.management.last.execution.stage")}),l.jsx("div",{className:"w-40 sm:ml-2",children:n("domain.management.last.execution.time")}),l.jsx("div",{className:"w-24",children:n("domain.management.enable")}),l.jsx("div",{className:"grow",children:n("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:n("domain")}),x.map(_=>{var C,j,T,P;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-36 w-full pt-1 sm:pt-0 flex items-center truncate",children:_.domain.split(";").map(A=>l.jsxs(l.Fragment,{children:[A,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-40 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx("div",{children:_.expiredAt?l.jsxs(l.Fragment,{children:[l.jsx("div",{children:n("domain.management.expiry.date1",{date:90})}),l.jsx("div",{children:n("domain.management.expiry.date2",{date:K$(_.expiredAt)})})]}):"---"})}),l.jsx("div",{className:"sm:w-32 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((C=_.expand)!=null&&C.lastDeployment)?l.jsx(l.Fragment,{children:l.jsx(Uv,{deployment:_.expand.lastDeployment})}):"---"}),l.jsx("div",{className:"sm:w-64 w-full pt-1 sm:pt-0 flex items-center",children:_.lastDeployedAt&&((j=_.expand)!=null&&j.lastDeployment)?l.jsx(Lv,{phase:(T=_.expand.lastDeployment)==null?void 0:T.phase,phaseSuccess:(P=_.expand.lastDeployment)==null?void 0:P.phaseSuccess}):"---"}),l.jsx("div",{className:"sm:w-40 pt-1 sm:pt-0 sm:ml-2 flex items-center",children:_.lastDeployedAt?Ta(_.lastDeployedAt):"---"}),l.jsx("div",{className:"sm:w-24 flex items-center",children:l.jsx(zv,{children:l.jsxs(Cj,{children:[l.jsx(jj,{children:l.jsx(Jc,{checked:_.enabled,onCheckedChange:()=>{w(_.id)}})}),l.jsx($v,{children:l.jsx("div",{className:"border rounded-sm px-3 bg-background text-muted-foreground text-xs",children:_.enabled?n("disable"):n("enable")})})]})})}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>h(_.id),children:n("deployment.log.name")}),l.jsxs(Ss,{when:!!_.enabled,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>m(_),children:n("domain.management.start.deploying")})]}),l.jsxs(Ss,{when:!!(_.enabled&&_.deployed),children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>p(_),children:n("domain.management.forced.deployment")})]}),l.jsxs(Ss,{when:!!_.expiredAt,children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>b(_),children:n("download")})]}),!_.enabled&&l.jsxs(l.Fragment,{children:[l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:n("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{children:n("domain.delete")}),l.jsx(_h,{children:n("domain.management.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{children:n("cancel")}),l.jsx(Sh,{onClick:()=>{y(_.id)},children:n("confirm")})]})]})]}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(Ue,{variant:"link",className:"p-0",onClick:()=>f(_.id),children:n("edit")})]})]})]},_.id)}),l.jsx(Aj,{totalPages:a,currentPage:i?Number(i):1,onPageChange:_=>{d(_)}})]}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx($m,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:n("domain.management.empty")}),l.jsx(Ue,{onClick:u,className:"mt-3",children:n("domain.add")})]})})]})})};var eu=e=>e.type==="checkbox",na=e=>e instanceof Date,bn=e=>e==null;const RE=e=>typeof e=="object";var Xt=e=>!bn(e)&&!Array.isArray(e)&&RE(e)&&!na(e),PE=e=>Xt(e)&&e.target?eu(e.target)?e.target.checked:e.target.value:e,t8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,AE=(e,t)=>e.has(t8(t)),n8=e=>{const t=e.constructor&&e.constructor.prototype;return Xt(t)&&t.hasOwnProperty("isPrototypeOf")},qv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(qv&&(e instanceof Blob||e instanceof FileList))&&(n||Xt(e)))if(t=n?[]:{},!n&&!n8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Nn(e[r]));else return e;return t}var Eh=e=>Array.isArray(e)?e.filter(Boolean):[],$t=e=>e===void 0,de=(e,t,n)=>{if(!t||!Xt(e))return n;const r=Eh(t.split(/[,[\].]+?/)).reduce((s,i)=>bn(s)?s:s[i],e);return $t(r)||r===e?$t(e[t])?n:e[t]:r},Br=e=>typeof e=="boolean",Xv=e=>/^\w*$/.test(e),OE=e=>Eh(e.replace(/["|']|\]/g,"").split(/\.|\[/)),pt=(e,t,n)=>{let r=-1;const s=Xv(t)?[t]:OE(t),i=s.length,o=i-1;for(;++rWe.useContext(DE),r8=e=>{const{children:t,...n}=e;return We.createElement(DE.Provider,{value:n},t)};var IE=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==wr.all&&(t._proxyFormState[o]=!r||wr.all),n&&(n[o]=!0),e[o]}});return s},Fn=e=>Xt(e)&&!Object.keys(e).length,ME=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Fn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||wr.all))},Ul=e=>Array.isArray(e)?e:[e],LE=(e,t,n)=>!e||!t||e===t||Ul(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Qv(e){const t=We.useRef(e);t.current=e,We.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function s8(e){const t=Nh(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=We.useState(n._formState),c=We.useRef(!0),u=We.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=We.useRef(s);return d.current=s,Qv({disabled:r,next:f=>c.current&&LE(d.current,f.name,i)&&ME(f,u.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),We.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),IE(o,n,u.current,!1)}var Hr=e=>typeof e=="string",FE=(e,t,n,r,s)=>Hr(e)?(r&&t.watch.add(e),de(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),de(n,i))):(r&&(t.watchAll=!0),n);function i8(e){const t=Nh(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=We.useRef(r);a.current=r,Qv({disabled:i,subject:n._subjects.values,next:d=>{LE(a.current,d.name,o)&&u(Nn(FE(a.current,n._names,d.values||n._formValues,!1,s)))}});const[c,u]=We.useState(n._getWatch(r,s));return We.useEffect(()=>n._removeUnmounted()),c}function o8(e){const t=Nh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=AE(s._names.array,n),a=i8({control:s,name:n,defaultValue:de(s._formValues,n,de(s._defaultValues,n,e.defaultValue)),exact:!0}),c=s8({control:s,name:n}),u=We.useRef(s.register(n,{...e.rules,value:a,...Br(e.disabled)?{disabled:e.disabled}:{}}));return We.useEffect(()=>{const d=s._options.shouldUnregister||i,f=(h,y)=>{const x=de(s._fields,h);x&&x._f&&(x._f.mount=y)};if(f(n,!0),d){const h=Nn(de(s._options.defaultValues,n));pt(s._defaultValues,n,h),$t(de(s._formValues,n))&&pt(s._formValues,n,h)}return()=>{(o?d&&!s._state.action:d)?s.unregister(n):f(n,!1)}},[n,s,o,i]),We.useEffect(()=>{de(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:de(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Br(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:We.useCallback(d=>u.current.onChange({target:{value:PE(d),name:n},type:tf.CHANGE}),[n]),onBlur:We.useCallback(()=>u.current.onBlur({target:{value:de(s._formValues,n),name:n},type:tf.BLUR}),[n,s]),ref:d=>{const f=de(s._fields,n);f&&d&&(f._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:h=>d.setCustomValidity(h),reportValidity:()=>d.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!de(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!de(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!de(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!de(c.validatingFields,n)},error:{enumerable:!0,get:()=>de(c.errors,n)}})}}const a8=e=>e.render(o8(e));var zE=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Jw=e=>({isOnSubmit:!e||e===wr.onSubmit,isOnBlur:e===wr.onBlur,isOnChange:e===wr.onChange,isOnAll:e===wr.all,isOnTouch:e===wr.onTouched}),e1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Vl=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=de(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)break;if(o.ref&&t(o.ref,o.name)&&!r)break;Vl(a,t)}else Xt(a)&&Vl(a,t)}}};var l8=(e,t,n)=>{const r=Ul(de(e,n));return pt(r,"root",t[n]),pt(e,n,r),e},Jv=e=>e.type==="file",ui=e=>typeof e=="function",nf=e=>{if(!qv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pd=e=>Hr(e),ex=e=>e.type==="radio",rf=e=>e instanceof RegExp;const t1={value:!1,isValid:!1},n1={value:!0,isValid:!0};var $E=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!$t(e[0].attributes.value)?$t(e[0].value)||e[0].value===""?n1:{value:e[0].value,isValid:!0}:n1:t1}return t1};const r1={isValid:!1,value:null};var UE=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,r1):r1;function s1(e,t,n="validate"){if(pd(e)||Array.isArray(e)&&e.every(pd)||Br(e)&&!e)return{type:n,message:pd(e)?e:"",ref:t}}var Io=e=>Xt(e)&&!rf(e)?e:{value:e,message:""},i1=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:c,minLength:u,min:d,max:f,pattern:h,validate:y,name:x,valueAsNumber:g,mount:w,disabled:m}=e._f,p=de(t,x);if(!w||m)return{};const b=o?o[0]:i,_=N=>{r&&b.reportValidity&&(b.setCustomValidity(Br(N)?"":N||""),b.reportValidity())},C={},j=ex(i),T=eu(i),P=j||T,A=(g||Jv(i))&&$t(i.value)&&$t(p)||nf(i)&&i.value===""||p===""||Array.isArray(p)&&!p.length,D=zE.bind(null,x,n,C),G=(N,F,S,U=cs.maxLength,J=cs.minLength)=>{const z=N?F:S;C[x]={type:N?U:J,message:z,ref:i,...D(N?U:J,z)}};if(s?!Array.isArray(p)||!p.length:a&&(!P&&(A||bn(p))||Br(p)&&!p||T&&!$E(o).isValid||j&&!UE(o).isValid)){const{value:N,message:F}=pd(a)?{value:!!a,message:a}:Io(a);if(N&&(C[x]={type:cs.required,message:F,ref:b,...D(cs.required,F)},!n))return _(F),C}if(!A&&(!bn(d)||!bn(f))){let N,F;const S=Io(f),U=Io(d);if(!bn(p)&&!isNaN(p)){const J=i.valueAsNumber||p&&+p;bn(S.value)||(N=J>S.value),bn(U.value)||(F=Jnew Date(new Date().toDateString()+" "+X),W=i.type=="time",I=i.type=="week";Hr(S.value)&&p&&(N=W?z(p)>z(S.value):I?p>S.value:J>new Date(S.value)),Hr(U.value)&&p&&(F=W?z(p)+N.value,U=!bn(F.value)&&p.length<+F.value;if((S||U)&&(G(S,N.message,F.message),!n))return _(C[x].message),C}if(h&&!A&&Hr(p)){const{value:N,message:F}=Io(h);if(rf(N)&&!p.match(N)&&(C[x]={type:cs.pattern,message:F,ref:i,...D(cs.pattern,F)},!n))return _(F),C}if(y){if(ui(y)){const N=await y(p,t),F=s1(N,b);if(F&&(C[x]={...F,...D(cs.validate,F.message)},!n))return _(F.message),C}else if(Xt(y)){let N={};for(const F in y){if(!Fn(N)&&!n)break;const S=s1(await y[F](p,t),b,F);S&&(N={...S,...D(F,S.message)},_(S.message),n&&(C[x]=N))}if(!Fn(N)&&(C[x]={ref:b,...N},!n))return C}}return _(!0),C};function c8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},sf=e=>bn(e)||!RE(e);function qi(e,t){if(sf(e)||sf(t))return e===t;if(na(e)&&na(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(na(i)&&na(o)||Xt(i)&&Xt(o)||Array.isArray(i)&&Array.isArray(o)?!qi(i,o):i!==o)return!1}}return!0}var VE=e=>e.type==="select-multiple",d8=e=>ex(e)||eu(e),Fp=e=>nf(e)&&e.isConnected,BE=e=>{for(const t in e)if(ui(e[t]))return!0;return!1};function of(e,t={}){const n=Array.isArray(e);if(Xt(e)||n)for(const r in e)Array.isArray(e[r])||Xt(e[r])&&!BE(e[r])?(t[r]=Array.isArray(e[r])?[]:{},of(e[r],t[r])):bn(e[r])||(t[r]=!0);return t}function WE(e,t,n){const r=Array.isArray(e);if(Xt(e)||r)for(const s in e)Array.isArray(e[s])||Xt(e[s])&&!BE(e[s])?$t(t)||sf(n[s])?n[s]=Array.isArray(e[s])?of(e[s],[]):{...of(e[s])}:WE(e[s],bn(t)?{}:t[s],n[s]):n[s]=!qi(e[s],t[s]);return n}var Wu=(e,t)=>WE(e,t,of(t)),HE=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>$t(e)?e:t?e===""?NaN:e&&+e:n&&Hr(e)?new Date(e):r?r(e):e;function zp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Jv(t)?t.files:ex(t)?UE(e.refs).value:VE(t)?[...t.selectedOptions].map(({value:n})=>n):eu(t)?$E(e.refs).value:HE($t(t.value)?e.ref.value:t.value,e)}var f8=(e,t,n,r)=>{const s={};for(const i of e){const o=de(t,i);o&&pt(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},fl=e=>$t(e)?e:rf(e)?e.source:Xt(e)?rf(e.value)?e.value.source:e.value:e,h8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function o1(e,t,n){const r=de(e,n);if(r||Xv(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=de(t,i),a=de(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var p8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,m8=(e,t)=>!Eh(de(e,t)).length&&Kt(e,t);const g8={mode:wr.onSubmit,reValidateMode:wr.onChange,shouldFocusError:!0};function y8(e={}){let t={...g8,...e},n={submitCount:0,isDirty:!1,isLoading:ui(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Xt(t.defaultValues)||Xt(t.values)?Nn(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Nn(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Lp(),array:Lp(),state:Lp()},h=Jw(t.mode),y=Jw(t.reValidateMode),x=t.criteriaMode===wr.all,g=k=>R=>{clearTimeout(u),u=setTimeout(k,R)},w=async k=>{if(d.isValid||k){const R=t.resolver?Fn((await P()).errors):await D(r,!0);R!==n.isValid&&f.state.next({isValid:R})}},m=(k,R)=>{(d.isValidating||d.validatingFields)&&((k||Array.from(a.mount)).forEach(M=>{M&&(R?pt(n.validatingFields,M,R):Kt(n.validatingFields,M))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Fn(n.validatingFields)}))},p=(k,R=[],M,K,L=!0,Y=!0)=>{if(K&&M){if(o.action=!0,Y&&Array.isArray(de(r,k))){const Q=M(de(r,k),K.argA,K.argB);L&&pt(r,k,Q)}if(Y&&Array.isArray(de(n.errors,k))){const Q=M(de(n.errors,k),K.argA,K.argB);L&&pt(n.errors,k,Q),m8(n.errors,k)}if(d.touchedFields&&Y&&Array.isArray(de(n.touchedFields,k))){const Q=M(de(n.touchedFields,k),K.argA,K.argB);L&&pt(n.touchedFields,k,Q)}d.dirtyFields&&(n.dirtyFields=Wu(s,i)),f.state.next({name:k,isDirty:N(k,R),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else pt(i,k,R)},b=(k,R)=>{pt(n.errors,k,R),f.state.next({errors:n.errors})},_=k=>{n.errors=k,f.state.next({errors:n.errors,isValid:!1})},C=(k,R,M,K)=>{const L=de(r,k);if(L){const Y=de(i,k,$t(M)?de(s,k):M);$t(Y)||K&&K.defaultChecked||R?pt(i,k,R?Y:zp(L._f)):U(k,Y),o.mount&&w()}},j=(k,R,M,K,L)=>{let Y=!1,Q=!1;const te={name:k},me=!!(de(r,k)&&de(r,k)._f&&de(r,k)._f.disabled);if(!M||K){d.isDirty&&(Q=n.isDirty,n.isDirty=te.isDirty=N(),Y=Q!==te.isDirty);const Ye=me||qi(de(s,k),R);Q=!!(!me&&de(n.dirtyFields,k)),Ye||me?Kt(n.dirtyFields,k):pt(n.dirtyFields,k,!0),te.dirtyFields=n.dirtyFields,Y=Y||d.dirtyFields&&Q!==!Ye}if(M){const Ye=de(n.touchedFields,k);Ye||(pt(n.touchedFields,k,M),te.touchedFields=n.touchedFields,Y=Y||d.touchedFields&&Ye!==M)}return Y&&L&&f.state.next(te),Y?te:{}},T=(k,R,M,K)=>{const L=de(n.errors,k),Y=d.isValid&&Br(R)&&n.isValid!==R;if(e.delayError&&M?(c=g(()=>b(k,M)),c(e.delayError)):(clearTimeout(u),c=null,M?pt(n.errors,k,M):Kt(n.errors,k)),(M?!qi(L,M):L)||!Fn(K)||Y){const Q={...K,...Y&&Br(R)?{isValid:R}:{},errors:n.errors,name:k};n={...n,...Q},f.state.next(Q)}},P=async k=>{m(k,!0);const R=await t.resolver(i,t.context,f8(k||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(k),R},A=async k=>{const{errors:R}=await P(k);if(k)for(const M of k){const K=de(R,M);K?pt(n.errors,M,K):Kt(n.errors,M)}else n.errors=R;return R},D=async(k,R,M={valid:!0})=>{for(const K in k){const L=k[K];if(L){const{_f:Y,...Q}=L;if(Y){const te=a.array.has(Y.name);m([K],!0);const me=await i1(L,i,x,t.shouldUseNativeValidation&&!R,te);if(m([K]),me[Y.name]&&(M.valid=!1,R))break;!R&&(de(me,Y.name)?te?l8(n.errors,me,Y.name):pt(n.errors,Y.name,me[Y.name]):Kt(n.errors,Y.name))}Q&&await D(Q,R,M)}}return M.valid},G=()=>{for(const k of a.unMount){const R=de(r,k);R&&(R._f.refs?R._f.refs.every(M=>!Fp(M)):!Fp(R._f.ref))&&De(k)}a.unMount=new Set},N=(k,R)=>(k&&R&&pt(i,k,R),!qi($(),s)),F=(k,R,M)=>FE(k,a,{...o.mount?i:$t(R)?s:Hr(k)?{[k]:R}:R},M,R),S=k=>Eh(de(o.mount?i:s,k,e.shouldUnregister?de(s,k,[]):[])),U=(k,R,M={})=>{const K=de(r,k);let L=R;if(K){const Y=K._f;Y&&(!Y.disabled&&pt(i,k,HE(R,Y)),L=nf(Y.ref)&&bn(R)?"":R,VE(Y.ref)?[...Y.ref.options].forEach(Q=>Q.selected=L.includes(Q.value)):Y.refs?eu(Y.ref)?Y.refs.length>1?Y.refs.forEach(Q=>(!Q.defaultChecked||!Q.disabled)&&(Q.checked=Array.isArray(L)?!!L.find(te=>te===Q.value):L===Q.value)):Y.refs[0]&&(Y.refs[0].checked=!!L):Y.refs.forEach(Q=>Q.checked=Q.value===L):Jv(Y.ref)?Y.ref.value="":(Y.ref.value=L,Y.ref.type||f.values.next({name:k,values:{...i}})))}(M.shouldDirty||M.shouldTouch)&&j(k,L,M.shouldTouch,M.shouldDirty,!0),M.shouldValidate&&X(k)},J=(k,R,M)=>{for(const K in R){const L=R[K],Y=`${k}.${K}`,Q=de(r,Y);(a.array.has(k)||!sf(L)||Q&&!Q._f)&&!na(L)?J(Y,L,M):U(Y,L,M)}},z=(k,R,M={})=>{const K=de(r,k),L=a.array.has(k),Y=Nn(R);pt(i,k,Y),L?(f.array.next({name:k,values:{...i}}),(d.isDirty||d.dirtyFields)&&M.shouldDirty&&f.state.next({name:k,dirtyFields:Wu(s,i),isDirty:N(k,Y)})):K&&!K._f&&!bn(Y)?J(k,Y,M):U(k,Y,M),e1(k,a)&&f.state.next({...n}),f.values.next({name:o.mount?k:void 0,values:{...i}})},W=async k=>{o.mount=!0;const R=k.target;let M=R.name,K=!0;const L=de(r,M),Y=()=>R.type?zp(L._f):PE(k),Q=te=>{K=Number.isNaN(te)||te===de(i,M,te)};if(L){let te,me;const Ye=Y(),$e=k.type===tf.BLUR||k.type===tf.FOCUS_OUT,Et=!h8(L._f)&&!t.resolver&&!de(n.errors,M)&&!L._f.deps||p8($e,de(n.touchedFields,M),n.isSubmitted,y,h),Jn=e1(M,a,$e);pt(i,M,Ye),$e?(L._f.onBlur&&L._f.onBlur(k),c&&c(0)):L._f.onChange&&L._f.onChange(k);const Yt=j(M,Ye,$e,!1),rs=!Fn(Yt)||Jn;if(!$e&&f.values.next({name:M,type:k.type,values:{...i}}),Et)return d.isValid&&w(),rs&&f.state.next({name:M,...Jn?{}:Yt});if(!$e&&Jn&&f.state.next({...n}),t.resolver){const{errors:lt}=await P([M]);if(Q(Ye),K){const ss=o1(n.errors,r,M),is=o1(lt,r,ss.name||M);te=is.error,M=is.name,me=Fn(lt)}}else m([M],!0),te=(await i1(L,i,x,t.shouldUseNativeValidation))[M],m([M]),Q(Ye),K&&(te?me=!1:d.isValid&&(me=await D(r,!0)));K&&(L._f.deps&&X(L._f.deps),T(M,me,te,Yt))}},I=(k,R)=>{if(de(n.errors,R)&&k.focus)return k.focus(),1},X=async(k,R={})=>{let M,K;const L=Ul(k);if(t.resolver){const Y=await A($t(k)?k:L);M=Fn(Y),K=k?!L.some(Q=>de(Y,Q)):M}else k?(K=(await Promise.all(L.map(async Y=>{const Q=de(r,Y);return await D(Q&&Q._f?{[Y]:Q}:Q)}))).every(Boolean),!(!K&&!n.isValid)&&w()):K=M=await D(r);return f.state.next({...!Hr(k)||d.isValid&&M!==n.isValid?{}:{name:k},...t.resolver||!k?{isValid:M}:{},errors:n.errors}),R.shouldFocus&&!K&&Vl(r,I,k?L:a.mount),K},$=k=>{const R={...o.mount?i:s};return $t(k)?R:Hr(k)?de(R,k):k.map(M=>de(R,M))},B=(k,R)=>({invalid:!!de((R||n).errors,k),isDirty:!!de((R||n).dirtyFields,k),error:de((R||n).errors,k),isValidating:!!de(n.validatingFields,k),isTouched:!!de((R||n).touchedFields,k)}),he=k=>{k&&Ul(k).forEach(R=>Kt(n.errors,R)),f.state.next({errors:k?n.errors:{}})},re=(k,R,M)=>{const K=(de(r,k,{_f:{}})._f||{}).ref,L=de(n.errors,k)||{},{ref:Y,message:Q,type:te,...me}=L;pt(n.errors,k,{...me,...R,ref:K}),f.state.next({name:k,errors:n.errors,isValid:!1}),M&&M.shouldFocus&&K&&K.focus&&K.focus()},ie=(k,R)=>ui(k)?f.values.subscribe({next:M=>k(F(void 0,R),M)}):F(k,R,!0),De=(k,R={})=>{for(const M of k?Ul(k):a.mount)a.mount.delete(M),a.array.delete(M),R.keepValue||(Kt(r,M),Kt(i,M)),!R.keepError&&Kt(n.errors,M),!R.keepDirty&&Kt(n.dirtyFields,M),!R.keepTouched&&Kt(n.touchedFields,M),!R.keepIsValidating&&Kt(n.validatingFields,M),!t.shouldUnregister&&!R.keepDefaultValue&&Kt(s,M);f.values.next({values:{...i}}),f.state.next({...n,...R.keepDirty?{isDirty:N()}:{}}),!R.keepIsValid&&w()},pe=({disabled:k,name:R,field:M,fields:K,value:L})=>{if(Br(k)&&o.mount||k){const Y=k?void 0:$t(L)?zp(M?M._f:de(K,R)._f):L;pt(i,R,Y),j(R,Y,!1,!1,!0)}},_e=(k,R={})=>{let M=de(r,k);const K=Br(R.disabled);return pt(r,k,{...M||{},_f:{...M&&M._f?M._f:{ref:{name:k}},name:k,mount:!0,...R}}),a.mount.add(k),M?pe({field:M,disabled:R.disabled,name:k,value:R.value}):C(k,!0,R.value),{...K?{disabled:R.disabled}:{},...t.progressive?{required:!!R.required,min:fl(R.min),max:fl(R.max),minLength:fl(R.minLength),maxLength:fl(R.maxLength),pattern:fl(R.pattern)}:{},name:k,onChange:W,onBlur:W,ref:L=>{if(L){_e(k,R),M=de(r,k);const Y=$t(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Q=d8(Y),te=M._f.refs||[];if(Q?te.find(me=>me===Y):Y===M._f.ref)return;pt(r,k,{_f:{...M._f,...Q?{refs:[...te.filter(Fp),Y,...Array.isArray(de(s,k))?[{}]:[]],ref:{type:Y.type,name:k}}:{ref:Y}}}),C(k,!1,void 0,Y)}else M=de(r,k,{}),M._f&&(M._f.mount=!1),(t.shouldUnregister||R.shouldUnregister)&&!(AE(a.array,k)&&o.action)&&a.unMount.add(k)}}},Te=()=>t.shouldFocusError&&Vl(r,I,a.mount),Fe=k=>{Br(k)&&(f.state.next({disabled:k}),Vl(r,(R,M)=>{const K=de(r,M);K&&(R.disabled=K._f.disabled||k,Array.isArray(K._f.refs)&&K._f.refs.forEach(L=>{L.disabled=K._f.disabled||k}))},0,!1))},Ie=(k,R)=>async M=>{let K;M&&(M.preventDefault&&M.preventDefault(),M.persist&&M.persist());let L=Nn(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:Y,values:Q}=await P();n.errors=Y,L=Q}else await D(r);if(Kt(n.errors,"root"),Fn(n.errors)){f.state.next({errors:{}});try{await k(L,M)}catch(Y){K=Y}}else R&&await R({...n.errors},M),Te(),setTimeout(Te);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Fn(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},Pe=(k,R={})=>{de(r,k)&&($t(R.defaultValue)?z(k,Nn(de(s,k))):(z(k,R.defaultValue),pt(s,k,Nn(R.defaultValue))),R.keepTouched||Kt(n.touchedFields,k),R.keepDirty||(Kt(n.dirtyFields,k),n.isDirty=R.defaultValue?N(k,Nn(de(s,k))):N()),R.keepError||(Kt(n.errors,k),d.isValid&&w()),f.state.next({...n}))},rt=(k,R={})=>{const M=k?Nn(k):s,K=Nn(M),L=Fn(k),Y=L?s:K;if(R.keepDefaultValues||(s=M),!R.keepValues){if(R.keepDirtyValues)for(const Q of a.mount)de(n.dirtyFields,Q)?pt(Y,Q,de(i,Q)):z(Q,de(Y,Q));else{if(qv&&$t(k))for(const Q of a.mount){const te=de(r,Q);if(te&&te._f){const me=Array.isArray(te._f.refs)?te._f.refs[0]:te._f.ref;if(nf(me)){const Ye=me.closest("form");if(Ye){Ye.reset();break}}}}r={}}i=e.shouldUnregister?R.keepDefaultValues?Nn(s):{}:Nn(Y),f.array.next({values:{...Y}}),f.values.next({values:{...Y}})}a={mount:R.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!R.keepIsValid||!!R.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:R.keepSubmitCount?n.submitCount:0,isDirty:L?!1:R.keepDirty?n.isDirty:!!(R.keepDefaultValues&&!qi(k,s)),isSubmitted:R.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:L?{}:R.keepDirtyValues?R.keepDefaultValues&&i?Wu(s,i):n.dirtyFields:R.keepDefaultValues&&k?Wu(s,k):R.keepDirty?n.dirtyFields:{},touchedFields:R.keepTouched?n.touchedFields:{},errors:R.keepErrors?n.errors:{},isSubmitSuccessful:R.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},E=(k,R)=>rt(ui(k)?k(i):k,R);return{control:{register:_e,unregister:De,getFieldState:B,handleSubmit:Ie,setError:re,_executeSchema:P,_getWatch:F,_getDirty:N,_updateValid:w,_removeUnmounted:G,_updateFieldArray:p,_updateDisabledField:pe,_getFieldArray:S,_reset:rt,_resetDefaultValues:()=>ui(t.defaultValues)&&t.defaultValues().then(k=>{E(k,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:k=>{n={...n,...k}},_disableForm:Fe,_subjects:f,_proxyFormState:d,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(k){o=k},get _defaultValues(){return s},get _names(){return a},set _names(k){a=k},get _formState(){return n},set _formState(k){n=k},get _options(){return t},set _options(k){t={...t,...k}}},trigger:X,register:_e,handleSubmit:Ie,watch:ie,setValue:z,getValues:$,reset:E,resetField:Pe,clearErrors:he,unregister:De,setError:re,setFocus:(k,R={})=>{const M=de(r,k),K=M&&M._f;if(K){const L=K.refs?K.refs[0]:K.ref;L.focus&&(L.focus(),R.shouldSelect&&L.select())}},getFieldState:B}}function pn(e={}){const t=We.useRef(),n=We.useRef(),[r,s]=We.useState({isDirty:!1,isValidating:!1,isLoading:ui(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ui(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...y8(e),formState:r});const i=t.current.control;return i._options=e,Qv({subject:i._subjects.state,next:o=>{ME(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),We.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),We.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),We.useEffect(()=>{e.values&&!qi(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),We.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),We.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),We.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=IE(r,i),t.current}const a1=(e,t,n)=>{if(e&&"reportValidity"in e){const r=de(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},YE=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?a1(r.ref,n,e):r.refs&&r.refs.forEach(s=>a1(s,n,e))}},v8=(e,t)=>{t.shouldUseNativeValidation&&YE(e,t);const n={};for(const r in e){const s=de(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(x8(t.names||Object.keys(e),r)){const o=Object.assign({},de(n,r));pt(o,"root",i),pt(n,r,o)}else pt(n,r,i)}return n},x8=(e,t)=>e.some(n=>n.startsWith(t+"."));var w8=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=n[o].types,u=c&&c[r.code];n[o]=zE(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},mn=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(u){return i.shouldUseNativeValidation&&YE({},i),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:v8(w8(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},ot;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ot||(ot={}));var ug;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ug||(ug={}));const Ce=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ri=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ae=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),b8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Kn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;cn.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Kn.create=e=>new Kn(e);const Ra=(e,t)=>{let n;switch(e.code){case ae.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ae.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case ae.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case ae.invalid_union:n="Invalid input";break;case ae.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case ae.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case ae.invalid_arguments:n="Invalid function arguments";break;case ae.invalid_return_type:n="Invalid function return type";break;case ae.invalid_date:n="Invalid date";break;case ae.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ae.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ae.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ae.custom:n="Invalid input";break;case ae.invalid_intersection_types:n="Intersection results could not be merged";break;case ae.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ae.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let KE=Ra;function _8(e){KE=e}function af(){return KE}const lf=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},S8=[];function ye(e,t){const n=af(),r=lf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ra?void 0:Ra].filter(s=>!!s)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return He;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return He;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const He=Object.freeze({status:"aborted"}),ra=e=>({status:"dirty",value:e}),Sn=e=>({status:"valid",value:e}),dg=e=>e.status==="aborted",fg=e=>e.status==="dirty",vc=e=>e.status==="valid",xc=e=>typeof Promise<"u"&&e instanceof Promise;function cf(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function GE(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Oe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Oe||(Oe={}));var _l,Sl;class Qr{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l1=(e,t)=>{if(vc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Kn(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var c,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(c=d??r)!==null&&c!==void 0?c:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class Je{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ri(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ri(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:ri(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(xc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ri(t)},i=this._parseSync({data:t,path:s.path,parent:s});return l1(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ri(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(xc(s)?s:Promise.resolve(s));return l1(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:ae.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Pr({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Zr.create(this,this._def)}nullable(){return Ti.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cr.create(this,this._def)}promise(){return Aa.create(this,this._def)}or(t){return Sc.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Pr({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Tc({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new tx({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Rc({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tu.create(this,t)}readonly(){return Pc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const k8=/^c[^\s-]{8,}$/i,C8=/^[0-9a-z]+$/,j8=/^[0-9A-HJKMNP-TV-Z]{26}$/,E8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,N8=/^[a-z0-9_-]{21}$/i,T8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,R8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $p;const A8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,O8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,D8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ZE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",I8=new RegExp(`^${ZE}$`);function qE(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function M8(e){return new RegExp(`^${qE(e)}$`)}function XE(e){let t=`${ZE}T${qE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function L8(e,t){return!!((t==="v4"||!t)&&A8.test(e)||(t==="v6"||!t)&&O8.test(e))}class _r extends Je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.string,received:i.parsedType}),He}const r=new hn;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.lengthi.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.lengtht.test(s),{validation:n,code:ae.invalid_string,...Oe.errToObj(r)})}_addCheck(t){return new _r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Oe.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Oe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Oe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Oe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Oe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Oe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Oe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Oe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Oe.errToObj(n)})}nonempty(t){return this.min(1,Oe.errToObj(t))}trim(){return new _r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _r({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new _r({checks:[],typeName:Ve.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};function F8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class ji extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.number,received:i.parsedType}),He}let r;const s=new hn;for(const i of this._def.checks)i.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?F8(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_finite,message:i.message}),s.dirty()):ot.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new ji({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new ji({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Oe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ji({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class Ei extends Je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ce.bigint){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.bigint,received:i.parsedType}),He}let r;const s=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.datai.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ae.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ot.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Oe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Oe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Oe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Oe.toString(n))}setLimit(t,n,r,s){return new Ei({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Oe.toString(s)}]})}_addCheck(t){return new Ei({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Oe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Ei({checks:[],typeName:Ve.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ge(e)})};class wc extends Je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.boolean,received:r.parsedType}),He}return Sn(t.data)}}wc.create=e=>new wc({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class ho extends Je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_type,expected:Ce.date,received:i.parsedType}),He}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ae.invalid_date}),He}const r=new hn;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()i.value&&(s=this._getOrReturnCtx(t,s),ye(s,{code:ae.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ot.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ho({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew ho({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Ge(e)});class uf extends Je{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.symbol,received:r.parsedType}),He}return Sn(t.data)}}uf.create=e=>new uf({typeName:Ve.ZodSymbol,...Ge(e)});class bc extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.undefined,received:r.parsedType}),He}return Sn(t.data)}}bc.create=e=>new bc({typeName:Ve.ZodUndefined,...Ge(e)});class _c extends Je{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.null,received:r.parsedType}),He}return Sn(t.data)}}_c.create=e=>new _c({typeName:Ve.ZodNull,...Ge(e)});class Pa extends Je{constructor(){super(...arguments),this._any=!0}_parse(t){return Sn(t.data)}}Pa.create=e=>new Pa({typeName:Ve.ZodAny,...Ge(e)});class no extends Je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Sn(t.data)}}no.create=e=>new no({typeName:Ve.ZodUnknown,...Ge(e)});class As extends Je{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ae.invalid_type,expected:Ce.never,received:n.parsedType}),He}}As.create=e=>new As({typeName:Ve.ZodNever,...Ge(e)});class df extends Je{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.void,received:r.parsedType}),He}return Sn(t.data)}}df.create=e=>new df({typeName:Ve.ZodVoid,...Ge(e)});class Cr extends Je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return ye(n,{code:ae.invalid_type,expected:Ce.array,received:n.parsedType}),He;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.lengths.maxLength.value&&(ye(n,{code:ae.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new Qr(n,o,n.path,a)))).then(o=>hn.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new Qr(n,o,n.path,a)));return hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Cr({...this._def,minLength:{value:t,message:Oe.toString(n)}})}max(t,n){return new Cr({...this._def,maxLength:{value:t,message:Oe.toString(n)}})}length(t,n){return new Cr({...this._def,exactLength:{value:t,message:Oe.toString(n)}})}nonempty(t){return this.min(1,t)}}Cr.create=(e,t)=>new Cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function zo(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Zr.create(zo(r))}return new At({...e._def,shape:()=>t})}else return e instanceof Cr?new Cr({...e._def,type:zo(e.element)}):e instanceof Zr?Zr.create(zo(e.unwrap())):e instanceof Ti?Ti.create(zo(e.unwrap())):e instanceof Jr?Jr.create(e.items.map(t=>zo(t))):e}class At extends Je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const u=this._getOrReturnCtx(t);return ye(u,{code:ae.invalid_type,expected:Ce.object,received:u.parsedType}),He}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof As&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const c=[];for(const u of o){const d=i[u],f=s.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Qr(s,f,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof As){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)c.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(ye(s,{code:ae.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const f=s.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Qr(s,f,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>hn.mergeObjectSync(r,u)):hn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Oe.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const c=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Oe.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return zo(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Zr;)i=i._def.innerType;n[r]=i}}),new At({...this._def,shape:()=>n})}keyof(){return QE(ot.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:As.create(),typeName:Ve.ZodObject,...Ge(t)});class Sc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Kn(a.ctx.common.issues));return ye(n,{code:ae.invalid_union,unionErrors:o}),He}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(c=>new Kn(c));return ye(n,{code:ae.invalid_union,unionErrors:a}),He}}get options(){return this._def.options}}Sc.create=(e,t)=>new Sc({options:e,typeName:Ve.ZodUnion,...Ge(t)});const us=e=>e instanceof jc?us(e.schema):e instanceof Pr?us(e.innerType()):e instanceof Ec?[e.value]:e instanceof Ni?e.options:e instanceof Nc?ot.objectValues(e.enum):e instanceof Tc?us(e._def.innerType):e instanceof bc?[void 0]:e instanceof _c?[null]:e instanceof Zr?[void 0,...us(e.unwrap())]:e instanceof Ti?[null,...us(e.unwrap())]:e instanceof tx||e instanceof Pc?us(e.unwrap()):e instanceof Rc?us(e._def.innerType):[];class Th extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ye(n,{code:ae.invalid_type,expected:Ce.object,received:n.parsedType}),He;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ye(n,{code:ae.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),He)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=us(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Th({typeName:Ve.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ge(r)})}}function hg(e,t){const n=ri(e),r=ri(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const s=ot.objectKeys(t),i=ot.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const c=hg(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i{if(dg(i)||dg(o))return He;const a=hg(i.value,o.value);return a.valid?((fg(i)||fg(o))&&n.dirty(),{status:n.value,value:a.data}):(ye(r,{code:ae.invalid_intersection_types}),He)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}kc.create=(e,t,n)=>new kc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Jr extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return ye(r,{code:ae.invalid_type,expected:Ce.array,received:r.parsedType}),He;if(r.data.lengththis._def.items.length&&(ye(r,{code:ae.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Qr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>hn.mergeArray(n,o)):hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Jr({...this._def,rest:t})}}Jr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class Cc extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return ye(r,{code:ae.invalid_type,expected:Ce.object,received:r.parsedType}),He;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new Qr(r,a,r.path,a)),value:o._parse(new Qr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?hn.mergeObjectAsync(n,s):hn.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Je?new Cc({keyType:t,valueType:n,typeName:Ve.ZodRecord,...Ge(r)}):new Cc({keyType:_r.create(),valueType:t,typeName:Ve.ZodRecord,...Ge(n)})}}class ff extends Je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return ye(r,{code:ae.invalid_type,expected:Ce.map,received:r.parsedType}),He;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,c],u)=>({key:s._parse(new Qr(r,a,r.path,[u,"key"])),value:i._parse(new Qr(r,c,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return He;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}ff.create=(e,t,n)=>new ff({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class po extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return ye(r,{code:ae.invalid_type,expected:Ce.set,received:r.parsedType}),He;const s=this._def;s.minSize!==null&&r.data.sizes.maxSize.value&&(ye(r,{code:ae.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return He;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((c,u)=>i._parse(new Qr(r,c,r.path,u)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,n){return new po({...this._def,minSize:{value:t,message:Oe.toString(n)}})}max(t,n){return new po({...this._def,maxSize:{value:t,message:Oe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}po.create=(e,t)=>new po({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class xa extends Je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return ye(n,{code:ae.invalid_type,expected:Ce.function,received:n.parsedType}),He;function r(a,c){return lf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,af(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_arguments,argumentsError:c}})}function s(a,c){return lf({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,af(),Ra].filter(u=>!!u),issueData:{code:ae.invalid_return_type,returnTypeError:c}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Aa){const a=this;return Sn(async function(...c){const u=new Kn([]),d=await a._def.args.parseAsync(c,i).catch(y=>{throw u.addIssue(r(c,y)),u}),f=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(f,i).catch(y=>{throw u.addIssue(s(f,y)),u})})}else{const a=this;return Sn(function(...c){const u=a._def.args.safeParse(c,i);if(!u.success)throw new Kn([r(c,u.error)]);const d=Reflect.apply(o,this,u.data),f=a._def.returns.safeParse(d,i);if(!f.success)throw new Kn([s(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new xa({...this._def,args:Jr.create(t).rest(no.create())})}returns(t){return new xa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new xa({args:t||Jr.create([]).rest(no.create()),returns:n||no.create(),typeName:Ve.ZodFunction,...Ge(r)})}}class jc extends Je{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jc.create=(e,t)=>new jc({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class Ec extends Je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ae.invalid_literal,expected:this._def.value}),He}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ec.create=(e,t)=>new Ec({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function QE(e,t){return new Ni({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class Ni extends Je{constructor(){super(...arguments),_l.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:ot.joinValues(r),received:n.parsedType,code:ae.invalid_type}),He}if(cf(this,_l)||GE(this,_l,new Set(this._def.values)),!cf(this,_l).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ae.invalid_enum_value,options:r}),He}return Sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ni.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ni.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}_l=new WeakMap;Ni.create=QE;class Nc extends Je{constructor(){super(...arguments),Sl.set(this,void 0)}_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const s=ot.objectValues(n);return ye(r,{expected:ot.joinValues(s),received:r.parsedType,code:ae.invalid_type}),He}if(cf(this,Sl)||GE(this,Sl,new Set(ot.getValidEnumValues(this._def.values))),!cf(this,Sl).has(t.data)){const s=ot.objectValues(n);return ye(r,{received:r.data,code:ae.invalid_enum_value,options:s}),He}return Sn(t.data)}get enum(){return this._def.values}}Sl=new WeakMap;Nc.create=(e,t)=>new Nc({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class Aa extends Je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ye(n,{code:ae.invalid_type,expected:Ce.promise,received:n.parsedType}),He;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Aa.create=(e,t)=>new Aa({type:e,typeName:Ve.ZodPromise,...Ge(t)});class Pr extends Je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ye(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return He;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?He:c.status==="dirty"||n.value==="dirty"?ra(c.value):c});{if(n.value==="aborted")return He;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?He:a.status==="dirty"||n.value==="dirty"?ra(a.value):a}}if(s.type==="refinement"){const o=a=>{const c=s.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?He:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vc(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>vc(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);ot.assertNever(s)}}Pr.create=(e,t,n)=>new Pr({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)});Pr.createWithPreprocess=(e,t,n)=>new Pr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Zr extends Je{_parse(t){return this._getType(t)===Ce.undefined?Sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zr.create=(e,t)=>new Zr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class Ti extends Je{_parse(t){return this._getType(t)===Ce.null?Sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ti.create=(e,t)=>new Ti({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class Tc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Tc.create=(e,t)=>new Tc({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class Rc extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xc(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Kn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Rc.create=(e,t)=>new Rc({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class hf extends Je{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ae.invalid_type,expected:Ce.nan,received:r.parsedType}),He}return{status:"valid",value:t.data}}}hf.create=e=>new hf({typeName:Ve.ZodNaN,...Ge(e)});const z8=Symbol("zod_brand");class tx extends Je{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tu extends Je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?He:i.status==="dirty"?(n.dirty(),ra(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?He:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new tu({in:t,out:n,typeName:Ve.ZodPipeline})}}class Pc extends Je{_parse(t){const n=this._def.innerType._parse(t),r=s=>(vc(s)&&(s.value=Object.freeze(s.value)),s);return xc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Pc.create=(e,t)=>new Pc({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});function JE(e,t={},n){return e?Pa.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:c})}}):Pa.create()}const $8={object:At.lazycreate};var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={}));const U8=(e,t={message:`Input not instance of ${e.name}`})=>JE(n=>n instanceof e,t),eN=_r.create,tN=ji.create,V8=hf.create,B8=Ei.create,nN=wc.create,W8=ho.create,H8=uf.create,Y8=bc.create,K8=_c.create,G8=Pa.create,Z8=no.create,q8=As.create,X8=df.create,Q8=Cr.create,J8=At.create,eU=At.strictCreate,tU=Sc.create,nU=Th.create,rU=kc.create,sU=Jr.create,iU=Cc.create,oU=ff.create,aU=po.create,lU=xa.create,cU=jc.create,uU=Ec.create,dU=Ni.create,fU=Nc.create,hU=Aa.create,c1=Pr.create,pU=Zr.create,mU=Ti.create,gU=Pr.createWithPreprocess,yU=tu.create,vU=()=>eN().optional(),xU=()=>tN().optional(),wU=()=>nN().optional(),bU={string:e=>_r.create({...e,coerce:!0}),number:e=>ji.create({...e,coerce:!0}),boolean:e=>wc.create({...e,coerce:!0}),bigint:e=>Ei.create({...e,coerce:!0}),date:e=>ho.create({...e,coerce:!0})},_U=He;var ce=Object.freeze({__proto__:null,defaultErrorMap:Ra,setErrorMap:_8,getErrorMap:af,makeIssue:lf,EMPTY_PATH:S8,addIssueToContext:ye,ParseStatus:hn,INVALID:He,DIRTY:ra,OK:Sn,isAborted:dg,isDirty:fg,isValid:vc,isAsync:xc,get util(){return ot},get objectUtil(){return ug},ZodParsedType:Ce,getParsedType:ri,ZodType:Je,datetimeRegex:XE,ZodString:_r,ZodNumber:ji,ZodBigInt:Ei,ZodBoolean:wc,ZodDate:ho,ZodSymbol:uf,ZodUndefined:bc,ZodNull:_c,ZodAny:Pa,ZodUnknown:no,ZodNever:As,ZodVoid:df,ZodArray:Cr,ZodObject:At,ZodUnion:Sc,ZodDiscriminatedUnion:Th,ZodIntersection:kc,ZodTuple:Jr,ZodRecord:Cc,ZodMap:ff,ZodSet:po,ZodFunction:xa,ZodLazy:jc,ZodLiteral:Ec,ZodEnum:Ni,ZodNativeEnum:Nc,ZodPromise:Aa,ZodEffects:Pr,ZodTransformer:Pr,ZodOptional:Zr,ZodNullable:Ti,ZodDefault:Tc,ZodCatch:Rc,ZodNaN:hf,BRAND:z8,ZodBranded:tx,ZodPipeline:tu,ZodReadonly:Pc,custom:JE,Schema:Je,ZodSchema:Je,late:$8,get ZodFirstPartyTypeKind(){return Ve},coerce:bU,any:G8,array:Q8,bigint:B8,boolean:nN,date:W8,discriminatedUnion:nU,effect:c1,enum:dU,function:lU,instanceof:U8,intersection:rU,lazy:cU,literal:uU,map:oU,nan:V8,nativeEnum:fU,never:q8,null:K8,nullable:mU,number:tN,object:J8,oboolean:wU,onumber:xU,optional:pU,ostring:vU,pipeline:yU,preprocess:gU,promise:hU,record:iU,set:aU,strictObject:eU,string:eN,symbol:H8,transformer:c1,tuple:sU,undefined:Y8,union:tU,unknown:Z8,void:X8,NEVER:_U,ZodIssueCode:ae,quotelessJson:b8,ZodError:Kn}),SU="Label",rN=v.forwardRef((e,t)=>l.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));rN.displayName=SU;var sN=rN;const kU=Fc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ri=v.forwardRef(({className:e,...t},n)=>l.jsx(sN,{ref:n,className:se(kU(),e),...t}));Ri.displayName=sN.displayName;const gn=r8,iN=v.createContext({}),Se=({...e})=>l.jsx(iN.Provider,{value:{name:e.name},children:l.jsx(a8,{...e})}),Rh=()=>{const e=v.useContext(iN),t=v.useContext(oN),{getFieldState:n,formState:r}=Nh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},oN=v.createContext({}),ve=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return l.jsx(oN.Provider,{value:{id:r},children:l.jsx("div",{ref:n,className:se("space-y-2",e),...t})})});ve.displayName="FormItem";const xe=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Rh();return l.jsx(Ri,{ref:n,className:se(r&&"text-destructive",e),htmlFor:s,...t})});xe.displayName="FormLabel";const we=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Rh();return l.jsx(Ns,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});we.displayName="FormControl";const CU=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Rh();return l.jsx("p",{ref:n,id:r,className:se("text-sm text-muted-foreground",e),...t})});CU.displayName="FormDescription";const ge=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=Rh(),{t:o}=it(),a=s?o(String(s==null?void 0:s.message)):t;return a?l.jsx("p",{ref:r,id:i,className:se("text-sm font-medium text-destructive",e),...n,children:a}):null});ge.displayName="FormMessage";function pg(e,[t,n]){return Math.min(n,Math.max(t,e))}var jU=[" ","Enter","ArrowUp","ArrowDown"],EU=[" ","Enter"],nu="Select",[Ph,Ah,NU]=zc(nu),[Za,FH]=on(nu,[NU,Ba]),Oh=Ba(),[TU,Ii]=Za(nu),[RU,PU]=Za(nu),aN=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:y}=e,x=Oh(t),[g,w]=v.useState(null),[m,p]=v.useState(null),[b,_]=v.useState(!1),C=xo(u),[j=!1,T]=Zn({prop:r,defaultProp:s,onChange:i}),[P,A]=Zn({prop:o,defaultProp:a,onChange:c}),D=v.useRef(null),G=g?!!g.closest("form"):!0,[N,F]=v.useState(new Set),S=Array.from(N).map(U=>U.props.value).join(";");return l.jsx(zy,{...x,children:l.jsxs(TU,{required:y,scope:t,trigger:g,onTriggerChange:w,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:b,onValueNodeHasChildrenChange:_,contentId:Wn(),value:P,onValueChange:A,open:j,onOpenChange:T,dir:C,triggerPointerDownPosRef:D,disabled:h,children:[l.jsx(Ph.Provider,{scope:t,children:l.jsx(RU,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(U=>{F(J=>new Set(J).add(U))},[]),onNativeOptionRemove:v.useCallback(U=>{F(J=>{const z=new Set(J);return z.delete(U),z})},[]),children:n})}),G?l.jsxs(ON,{"aria-hidden":!0,required:y,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:U=>A(U.target.value),disabled:h,children:[P===void 0?l.jsx("option",{value:""}):null,Array.from(N)]},S):null]})})};aN.displayName=nu;var lN="SelectTrigger",cN=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Oh(n),o=Ii(lN,n),a=o.disabled||r,c=Ke(t,o.onTriggerChange),u=Ah(n),[d,f,h]=DN(x=>{const g=u().filter(p=>!p.disabled),w=g.find(p=>p.value===o.value),m=IN(g,x,w);m!==void 0&&o.onValueChange(m.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return l.jsx($y,{asChild:!0,...i,children:l.jsx(Re.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":AN(o.value)?"":void 0,...s,ref:c,onClick:ue(s.onClick,x=>{x.currentTarget.focus()}),onPointerDown:ue(s.onPointerDown,x=>{const g=x.target;g.hasPointerCapture(x.pointerId)&&g.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)},x.preventDefault())}),onKeyDown:ue(s.onKeyDown,x=>{const g=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&f(x.key),!(g&&x.key===" ")&&jU.includes(x.key)&&(y(),x.preventDefault())})})})});cN.displayName=lN;var uN="SelectValue",dN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,c=Ii(uN,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=Ke(t,c.onValueNodeChange);return en(()=>{u(d)},[u,d]),l.jsx(Re.span,{...a,ref:f,style:{pointerEvents:"none"},children:AN(c.value)?l.jsx(l.Fragment,{children:o}):i})});dN.displayName=uN;var AU="SelectIcon",fN=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return l.jsx(Re.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});fN.displayName=AU;var OU="SelectPortal",hN=e=>l.jsx(Uc,{asChild:!0,...e});hN.displayName=OU;var mo="SelectContent",pN=v.forwardRef((e,t)=>{const n=Ii(mo,e.__scopeSelect),[r,s]=v.useState();if(en(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Is.createPortal(l.jsx(mN,{scope:e.__scopeSelect,children:l.jsx(Ph.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),i):null}return l.jsx(gN,{...e,ref:t})});pN.displayName=mo;var hs=10,[mN,Mi]=Za(mo),DU="SelectContentImpl",gN=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w,...m}=e,p=Ii(mo,n),[b,_]=v.useState(null),[C,j]=v.useState(null),T=Ke(t,pe=>_(pe)),[P,A]=v.useState(null),[D,G]=v.useState(null),N=Ah(n),[F,S]=v.useState(!1),U=v.useRef(!1);v.useEffect(()=>{if(b)return Hy(b)},[b]),Ty();const J=v.useCallback(pe=>{const[_e,...Te]=N().map(Pe=>Pe.ref.current),[Fe]=Te.slice(-1),Ie=document.activeElement;for(const Pe of pe)if(Pe===Ie||(Pe==null||Pe.scrollIntoView({block:"nearest"}),Pe===_e&&C&&(C.scrollTop=0),Pe===Fe&&C&&(C.scrollTop=C.scrollHeight),Pe==null||Pe.focus(),document.activeElement!==Ie))return},[N,C]),z=v.useCallback(()=>J([P,b]),[J,P,b]);v.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:W,triggerPointerDownPosRef:I}=p;v.useEffect(()=>{if(b){let pe={x:0,y:0};const _e=Fe=>{var Ie,Pe;pe={x:Math.abs(Math.round(Fe.pageX)-(((Ie=I.current)==null?void 0:Ie.x)??0)),y:Math.abs(Math.round(Fe.pageY)-(((Pe=I.current)==null?void 0:Pe.y)??0))}},Te=Fe=>{pe.x<=10&&pe.y<=10?Fe.preventDefault():b.contains(Fe.target)||W(!1),document.removeEventListener("pointermove",_e),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",Te,{capture:!0})}}},[b,W,I]),v.useEffect(()=>{const pe=()=>W(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[W]);const[X,$]=DN(pe=>{const _e=N().filter(Ie=>!Ie.disabled),Te=_e.find(Ie=>Ie.ref.current===document.activeElement),Fe=IN(_e,pe,Te);Fe&&setTimeout(()=>Fe.ref.current.focus())}),B=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&(A(pe),Fe&&(U.current=!0))},[p.value]),he=v.useCallback(()=>b==null?void 0:b.focus(),[b]),re=v.useCallback((pe,_e,Te)=>{const Fe=!U.current&&!Te;(p.value!==void 0&&p.value===_e||Fe)&&G(pe)},[p.value]),ie=r==="popper"?mg:yN,De=ie===mg?{side:a,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:y,sticky:x,hideWhenDetached:g,avoidCollisions:w}:{};return l.jsx(mN,{scope:n,content:b,viewport:C,onViewportChange:j,itemRefCallback:B,selectedItem:P,onItemLeave:he,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:F,searchRef:X,children:l.jsx(Xf,{as:Ns,allowPinchZoom:!0,children:l.jsx(Yf,{asChild:!0,trapped:p.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:ue(s,pe=>{var _e;(_e=p.trigger)==null||_e.focus({preventScroll:!0}),pe.preventDefault()}),children:l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:l.jsx(ie,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:pe=>pe.preventDefault(),...m,...De,onPlaced:()=>S(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:ue(m.onKeyDown,pe=>{const _e=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!_e&&pe.key.length===1&&$(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Fe=N().filter(Ie=>!Ie.disabled).map(Ie=>Ie.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Ie=pe.target,Pe=Fe.indexOf(Ie);Fe=Fe.slice(Pe+1)}setTimeout(()=>J(Fe)),pe.preventDefault()}})})})})})})});gN.displayName=DU;var IU="SelectItemAlignedPosition",yN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Ii(mo,n),o=Mi(mo,n),[a,c]=v.useState(null),[u,d]=v.useState(null),f=Ke(t,T=>d(T)),h=Ah(n),y=v.useRef(!1),x=v.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:m,focusSelectedItem:p}=o,b=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&g&&w&&m){const T=i.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),A=i.valueNode.getBoundingClientRect(),D=m.getBoundingClientRect();if(i.dir!=="rtl"){const Ie=D.left-P.left,Pe=A.left-Ie,rt=T.left-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=pg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.left=O+"px"}else{const Ie=P.right-D.right,Pe=window.innerWidth-A.right-Ie,rt=window.innerWidth-T.right-Pe,E=T.width+rt,ee=Math.max(E,P.width),Z=window.innerWidth-hs,O=pg(Pe,[hs,Z-ee]);a.style.minWidth=E+"px",a.style.right=O+"px"}const G=h(),N=window.innerHeight-hs*2,F=g.scrollHeight,S=window.getComputedStyle(u),U=parseInt(S.borderTopWidth,10),J=parseInt(S.paddingTop,10),z=parseInt(S.borderBottomWidth,10),W=parseInt(S.paddingBottom,10),I=U+J+F+W+z,X=Math.min(w.offsetHeight*5,I),$=window.getComputedStyle(g),B=parseInt($.paddingTop,10),he=parseInt($.paddingBottom,10),re=T.top+T.height/2-hs,ie=N-re,De=w.offsetHeight/2,pe=w.offsetTop+De,_e=U+J+pe,Te=I-_e;if(_e<=re){const Ie=w===G[G.length-1].ref.current;a.style.bottom="0px";const Pe=u.clientHeight-g.offsetTop-g.offsetHeight,rt=Math.max(ie,De+(Ie?he:0)+Pe+z),E=_e+rt;a.style.height=E+"px"}else{const Ie=w===G[0].ref.current;a.style.top="0px";const rt=Math.max(re,U+g.offsetTop+(Ie?B:0)+De)+Te;a.style.height=rt+"px",g.scrollTop=_e-re+g.offsetTop}a.style.margin=`${hs}px 0`,a.style.minHeight=X+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[h,i.trigger,i.valueNode,a,u,g,w,m,i.dir,r]);en(()=>b(),[b]);const[_,C]=v.useState();en(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const j=v.useCallback(T=>{T&&x.current===!0&&(b(),p==null||p(),x.current=!1)},[b,p]);return l.jsx(LU,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:j,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:l.jsx(Re.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});yN.displayName=IU;var MU="SelectPopperPosition",mg=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=hs,...i}=e,o=Oh(n);return l.jsx(Uy,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mg.displayName=MU;var[LU,nx]=Za(mo,{}),gg="SelectViewport",vN=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=Mi(gg,n),o=nx(gg,n),a=Ke(t,i.onViewportChange),c=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(Ph.Slot,{scope:n,children:l.jsx(Re.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ue(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const y=Math.abs(c.current-d.scrollTop);if(y>0){const x=window.innerHeight-hs*2,g=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),m=Math.max(g,w);if(m0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});vN.displayName=gg;var xN="SelectGroup",[FU,zU]=Za(xN),wN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Wn();return l.jsx(FU,{scope:n,id:s,children:l.jsx(Re.div,{role:"group","aria-labelledby":s,...r,ref:t})})});wN.displayName=xN;var bN="SelectLabel",_N=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=zU(bN,n);return l.jsx(Re.div,{id:s.id,...r,ref:t})});_N.displayName=bN;var pf="SelectItem",[$U,SN]=Za(pf),kN=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=Ii(pf,n),c=Mi(pf,n),u=a.value===r,[d,f]=v.useState(i??""),[h,y]=v.useState(!1),x=Ke(t,m=>{var p;return(p=c.itemRefCallback)==null?void 0:p.call(c,m,r,s)}),g=Wn(),w=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx($U,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:v.useCallback(m=>{f(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:l.jsx(Ph.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:l.jsx(Re.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:x,onFocus:ue(o.onFocus,()=>y(!0)),onBlur:ue(o.onBlur,()=>y(!1)),onPointerUp:ue(o.onPointerUp,w),onPointerMove:ue(o.onPointerMove,m=>{var p;s?(p=c.onItemLeave)==null||p.call(c):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(o.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=c.onItemLeave)==null||p.call(c))}),onKeyDown:ue(o.onKeyDown,m=>{var b;((b=c.searchRef)==null?void 0:b.current)!==""&&m.key===" "||(EU.includes(m.key)&&w(),m.key===" "&&m.preventDefault())})})})})});kN.displayName=pf;var kl="SelectItemText",CN=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Ii(kl,n),a=Mi(kl,n),c=SN(kl,n),u=PU(kl,n),[d,f]=v.useState(null),h=Ke(t,m=>f(m),c.onItemTextChange,m=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,m,c.value,c.disabled)}),y=d==null?void 0:d.textContent,x=v.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=u;return en(()=>(g(x),()=>w(x)),[g,w,x]),l.jsxs(l.Fragment,{children:[l.jsx(Re.span,{id:c.textId,...i,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Is.createPortal(i.children,o.valueNode):null]})});CN.displayName=kl;var jN="SelectItemIndicator",EN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return SN(jN,n).isSelected?l.jsx(Re.span,{"aria-hidden":!0,...r,ref:t}):null});EN.displayName=jN;var yg="SelectScrollUpButton",NN=v.forwardRef((e,t)=>{const n=Mi(yg,e.__scopeSelect),r=nx(yg,e.__scopeSelect),[s,i]=v.useState(!1),o=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(RN,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});NN.displayName=yg;var vg="SelectScrollDownButton",TN=v.forwardRef((e,t)=>{const n=Mi(vg,e.__scopeSelect),r=nx(vg,e.__scopeSelect),[s,i]=v.useState(!1),o=Ke(t,r.onScrollButtonChange);return en(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?l.jsx(RN,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});TN.displayName=vg;var RN=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=Mi("SelectScrollButton",n),o=v.useRef(null),a=Ah(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),en(()=>{var d;const u=a().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),l.jsx(Re.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ue(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ue(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ue(s.onPointerLeave,()=>{c()})})}),UU="SelectSeparator",PN=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Re.div,{"aria-hidden":!0,...r,ref:t})});PN.displayName=UU;var xg="SelectArrow",VU=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Oh(n),i=Ii(xg,n),o=Mi(xg,n);return i.open&&o.position==="popper"?l.jsx(Vy,{...s,...r,ref:t}):null});VU.displayName=xg;function AN(e){return e===""||e===void 0}var ON=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=v.useRef(null),i=Ke(t,s),o=Wv(n);return v.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[o,n]),l.jsx(Qc,{asChild:!0,children:l.jsx("select",{...r,ref:i,defaultValue:n})})});ON.displayName="BubbleSelect";function DN(e){const t=It(e),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(o=>{const a=n.current+o;t(a),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function IN(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=BU(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function BU(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var WU=aN,MN=cN,HU=dN,YU=fN,KU=hN,LN=pN,GU=vN,ZU=wN,FN=_N,zN=kN,qU=CN,XU=EN,$N=NN,UN=TN,VN=PN;const Ui=WU,Cl=ZU,Vi=HU,si=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(MN,{ref:r,className:se("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(YU,{asChild:!0,children:l.jsx(Sy,{className:"h-4 w-4 opacity-50"})})]}));si.displayName=MN.displayName;const BN=v.forwardRef(({className:e,...t},n)=>l.jsx($N,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(AO,{className:"h-4 w-4"})}));BN.displayName=$N.displayName;const WN=v.forwardRef(({className:e,...t},n)=>l.jsx(UN,{ref:n,className:se("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Sy,{className:"h-4 w-4"})}));WN.displayName=UN.displayName;const ii=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>l.jsx(KU,{children:l.jsxs(LN,{ref:s,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(BN,{}),l.jsx(GU,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(WN,{})]})}));ii.displayName=LN.displayName;const sa=v.forwardRef(({className:e,...t},n)=>l.jsx(FN,{ref:n,className:se("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sa.displayName=FN.displayName;const yr=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(zN,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(XU,{children:l.jsx(aS,{className:"h-4 w-4"})})}),l.jsx(qU,{children:t})]}));yr.displayName=zN.displayName;const QU=v.forwardRef(({className:e,...t},n)=>l.jsx(VN,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",e),...t}));QU.displayName=VN.displayName;const wg=new Map([["aliyun-cdn",["aliyun.cdn","/imgs/providers/aliyun.svg"]],["aliyun-oss",["aliyun.oss","/imgs/providers/aliyun.svg"]],["aliyun-dcdn",["aliyun.dcdn","/imgs/providers/aliyun.svg"]],["tencent-cdn",["tencent.cdn","/imgs/providers/tencent.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["qiniu-cdn",["qiniu.cdn","/imgs/providers/qiniu.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),JU=Array.from(wg.keys()),Dh=ov,Ih=av,eV=lv,HN=v.forwardRef(({className:e,...t},n)=>l.jsx(Wc,{ref:n,className:se("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));HN.displayName=Wc.displayName;const ru=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(eV,{children:[l.jsx(HN,{}),l.jsxs(Hc,{ref:r,className:se("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(th,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(ky,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ru.displayName=Hc.displayName;const su=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});su.displayName="DialogHeader";const YN=({className:e,...t})=>l.jsx("div",{className:se("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});YN.displayName="DialogFooter";const iu=v.forwardRef(({className:e,...t},n)=>l.jsx(Yc,{ref:n,className:se("text-lg font-semibold leading-none tracking-tight",e),...t}));iu.displayName=Yc.displayName;const tV=v.forwardRef(({className:e,...t},n)=>l.jsx(Kc,{ref:n,className:se("text-sm text-muted-foreground",e),...t}));tV.displayName=Kc.displayName;function nV(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var rx="ScrollArea",[KN,zH]=on(rx),[rV,fr]=KN(rx),GN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,c]=v.useState(null),[u,d]=v.useState(null),[f,h]=v.useState(null),[y,x]=v.useState(null),[g,w]=v.useState(null),[m,p]=v.useState(0),[b,_]=v.useState(0),[C,j]=v.useState(!1),[T,P]=v.useState(!1),A=Ke(t,G=>c(G)),D=xo(s);return l.jsx(rV,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:y,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:j,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:p,onCornerHeightChange:_,children:l.jsx(Re.div,{dir:D,...o,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});GN.displayName=rx;var ZN="ScrollAreaViewport",qN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=e,o=fr(ZN,n),a=v.useRef(null),c=Ke(t,a,o.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),l.jsx(Re.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});qN.displayName=ZN;var ns="ScrollAreaScrollbar",sx=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return v.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?l.jsx(sV,{...r,ref:t,forceMount:n}):s.type==="scroll"?l.jsx(iV,{...r,ref:t,forceMount:n}):s.type==="auto"?l.jsx(XN,{...r,ref:t,forceMount:n}):s.type==="always"?l.jsx(ix,{...r,ref:t}):null});sx.displayName=ns;var sV=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),[i,o]=v.useState(!1);return v.useEffect(()=>{const a=s.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),l.jsx(an,{present:n||i,children:l.jsx(XN,{"data-state":i?"visible":"hidden",...r,ref:t})})}),iV=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=fr(ns,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Lh(()=>c("SCROLL_END"),100),[a,c]=nV("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return v.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,c]),v.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const y=u[d];f!==y&&(c("SCROLL"),o()),f=y};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[s.viewport,i,c,o]),l.jsx(an,{present:n||a!=="hidden",children:l.jsx(ix,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),XN=v.forwardRef((e,t)=>{const n=fr(ns,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=v.useState(!1),a=e.orientation==="horizontal",c=Lh(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,s=fr(ns,e.__scopeScrollArea),i=v.useRef(null),o=v.useRef(0),[a,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=n2(a.viewport,a.content),d={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,y){return dV(h,o.current,a,y)}return n==="horizontal"?l.jsx(oV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollLeft,y=u1(h,a,s.dir);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=f(h,s.dir))}}):n==="vertical"?l.jsx(aV,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const h=s.viewport.scrollTop,y=u1(h,a);i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=f(h))}}):null}),oV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=fr(ns,e.__scopeScrollArea),[o,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,i.onScrollbarXChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(JN,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),s2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:gf(o.paddingLeft),paddingEnd:gf(o.paddingRight)}})}})}),aV=v.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=fr(ns,e.__scopeScrollArea),[o,a]=v.useState(),c=v.useRef(null),u=Ke(t,c,i.onScrollbarYChange);return v.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),l.jsx(JN,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),s2(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:gf(o.paddingTop),paddingEnd:gf(o.paddingBottom)}})}})}),[lV,QN]=KN(ns),JN=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,y=fr(ns,n),[x,g]=v.useState(null),w=Ke(t,A=>g(A)),m=v.useRef(null),p=v.useRef(""),b=y.viewport,_=r.content-r.viewport,C=It(d),j=It(c),T=Lh(f,10);function P(A){if(m.current){const D=A.clientX-m.current.left,G=A.clientY-m.current.top;u({x:D,y:G})}}return v.useEffect(()=>{const A=D=>{const G=D.target;(x==null?void 0:x.contains(G))&&C(D,_)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[b,x,_,C]),v.useEffect(j,[r,j]),Oa(x,T),Oa(y.content,T),l.jsx(lV,{scope:n,scrollbar:x,hasThumb:s,onThumbChange:It(i),onThumbPointerUp:It(o),onThumbPositionChange:j,onThumbPointerDown:It(a),children:l.jsx(Re.div,{...h,ref:w,style:{position:"absolute",...h.style},onPointerDown:ue(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),m.current=x.getBoundingClientRect(),p.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),P(A))}),onPointerMove:ue(e.onPointerMove,P),onPointerUp:ue(e.onPointerUp,A=>{const D=A.target;D.hasPointerCapture(A.pointerId)&&D.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=p.current,y.viewport&&(y.viewport.style.scrollBehavior=""),m.current=null})})})}),mf="ScrollAreaThumb",e2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=QN(mf,e.__scopeScrollArea);return l.jsx(an,{present:n||s.hasThumb,children:l.jsx(cV,{ref:t,...r})})}),cV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=fr(mf,n),o=QN(mf,n),{onThumbPositionChange:a}=o,c=Ke(t,f=>o.onThumbChange(f)),u=v.useRef(),d=Lh(()=>{u.current&&(u.current(),u.current=void 0)},100);return v.useEffect(()=>{const f=i.viewport;if(f){const h=()=>{if(d(),!u.current){const y=fV(f,a);u.current=y,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,d,a]),l.jsx(Re.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,f=>{const y=f.target.getBoundingClientRect(),x=f.clientX-y.left,g=f.clientY-y.top;o.onThumbPointerDown({x,y:g})}),onPointerUp:ue(e.onPointerUp,o.onThumbPointerUp)})});e2.displayName=mf;var ox="ScrollAreaCorner",t2=v.forwardRef((e,t)=>{const n=fr(ox,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?l.jsx(uV,{...e,ref:t}):null});t2.displayName=ox;var uV=v.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=fr(ox,n),[i,o]=v.useState(0),[a,c]=v.useState(0),u=!!(i&&a);return Oa(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Oa(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?l.jsx(Re.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function gf(e){return e?parseInt(e,10):0}function n2(e,t){const n=e/t;return isNaN(n)?0:n}function Mh(e){const t=n2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function dV(e,t,n,r="ltr"){const s=Mh(n),i=s/2,o=t||i,a=s-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return r2([c,u],f)(e)}function u1(e,t,n="ltr"){const r=Mh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=pg(e,c);return r2([0,o],[0,a])(u)}function r2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function s2(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function Lh(e,t){const n=It(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Oa(e,t){const n=It(t);en(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var i2=GN,hV=qN,pV=t2;const Fh=v.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(i2,{ref:r,className:se("relative overflow-hidden",e),...n,children:[l.jsx(hV,{className:"h-full w-full rounded-[inherit]",children:t}),l.jsx(o2,{}),l.jsx(pV,{})]}));Fh.displayName=i2.displayName;const o2=v.forwardRef(({className:e,orientation:t="vertical",...n},r)=>l.jsx(sx,{ref:r,orientation:t,className:se("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:l.jsx(e2,{className:"relative flex-1 rounded-full bg-border"})}));o2.displayName=sx.displayName;const Ne=v.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:se("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ne.displayName="Input";const wi=new Map([["tencent",["tencent","/imgs/providers/tencent.svg"]],["aliyun",["aliyun","/imgs/providers/aliyun.svg"]],["cloudflare",["cloudflare","/imgs/providers/cloudflare.svg"]],["namesilo",["namesilo","/imgs/providers/namesilo.svg"]],["godaddy",["go.daddy","/imgs/providers/godaddy.svg"]],["qiniu",["qiniu","/imgs/providers/qiniu.svg"]],["ssh",["ssh","/imgs/providers/ssh.svg"]],["webhook",["webhook","/imgs/providers/webhook.svg"]],["local",["local.deployment","/imgs/providers/local.svg"]]]),d1=e=>wi.get(e),Bs=ce.union([ce.literal("aliyun"),ce.literal("tencent"),ce.literal("ssh"),ce.literal("webhook"),ce.literal("cloudflare"),ce.literal("qiniu"),ce.literal("namesilo"),ce.literal("godaddy"),ce.literal("local")],{message:"access.not.empty"}),Ws=e=>{switch(e){case"aliyun":case"tencent":return"all";case"ssh":case"webhook":case"qiniu":case"local":return"deploy";case"cloudflare":case"namesilo":case"godaddy":return"apply";default:return"all"}},mV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,secretId:ce.string().min(1,"access.form.secret.id.not.empty").max(64,i("zod.rule.string.max",{max:64})),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={secretId:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"tencent",secretId:a.secretId,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{secretId:d.secretId,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},gV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,accessKeyId:ce.string().min(1,"access.form.access.key.id.not.empty").max(64,i("zod.rule.string.max",{max:64})),accessSecretId:ce.string().min(1,"access.form.access.key.secret.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={accessKeyId:"",accessKeySecret:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"aliyun",accessKeyId:a.accessKeyId,accessSecretId:a.accessKeySecret}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{accessKeyId:d.accessKeyId,accessKeySecret:d.accessSecretId}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}console.log(f),r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKeyId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key.id")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.id.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessSecretId",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},go=v.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:se("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));go.displayName="Textarea";const ax=({className:e,trigger:t})=>{const{reloadAccessGroups:n}=In(),[r,s]=v.useState(!1),{t:i}=it(),o=ce.object({name:ce.string().min(1,"access.group.name.not.empty").max(64,i("zod.rule.string.max",{max:64}))}),a=pn({resolver:mn(o),defaultValues:{name:""}}),c=async u=>{try{await x6({name:u.name}),n(),s(!1)}catch(d){Object.entries(d.response.data).forEach(([h,y])=>{a.setError(h,{type:"manual",message:y.message})})}};return l.jsxs(Dh,{onOpenChange:s,open:r,children:[l.jsx(Ih,{asChild:!0,className:se(e),children:t}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:i("access.group.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...a,children:l.jsxs("form",{onSubmit:u=>{u.stopPropagation(),a.handleSubmit(c)(u)},className:"space-y-8",children:[l.jsx(Se,{control:a.control,name:"name",render:({field:u})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.group.name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.group.name.not.empty"),...u,type:"text"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})]})]})},yV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:i,config:{accessGroups:o}}=In(),a=v.useRef(null),[c,u]=v.useState(""),{t:d}=it(),f=e&&e.group?e.group:"",h=/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,y=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,x=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,d("zod.rule.string.max",{max:64})),configType:Bs,host:ce.string().refine(_=>y.test(_)||h.test(_),{message:"zod.rule.ssh.host"}),group:ce.string().optional(),port:ce.string().min(1,"access.form.ssh.port.not.empty").max(5,d("zod.rule.string.max",{max:5})),username:ce.string().min(1,"username.not.empty").max(64,d("zod.rule.string.max",{max:64})),password:ce.string().min(0,"password.not.empty").max(64,d("zod.rule.string.max",{max:64})),key:ce.string().min(0,"access.form.ssh.key.not.empty").max(20480,d("zod.rule.string.max",{max:20480})),keyFile:ce.any().optional(),preCommand:ce.string().min(0).max(2048,d("zod.rule.string.max",{max:2048})).optional(),command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,d("zod.rule.string.max",{max:2048}))});let g={host:"127.0.0.1",port:"22",username:"root",password:"",key:"",keyFile:"",preCommand:"",command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(g=e.config);const w=pn({resolver:mn(x),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"ssh",group:e==null?void 0:e.group,host:g.host,port:g.port,username:g.username,password:g.password,key:g.key,keyFile:g.keyFile,certPath:g.certPath,keyPath:g.keyPath,command:g.command,preCommand:g.preCommand}}),m=async _=>{let C=_.group;C=="emptyId"&&(C="");const j={id:_.id,name:_.name,configType:_.configType,usage:Ws(_.configType),group:C,config:{host:_.host,port:_.port,username:_.username,password:_.password,key:_.key,command:_.command,preCommand:_.preCommand,certPath:_.certPath,keyPath:_.keyPath}};try{j.id=t=="copy"?"":j.id;const T=await Us(j);n(),j.id=T.id,j.created=T.created,j.updated=T.updated,_.id&&t=="edit"?s(j):r(j),C!=f&&(f&&await Zw({id:f,"access-":j.id}),C&&await Zw({id:C,"access+":j.id})),i()}catch(T){Object.entries(T.response.data).forEach(([A,D])=>{w.setError(A,{type:"manual",message:D.message})});return}},p=async _=>{var P;const C=(P=_.target.files)==null?void 0:P[0];if(!C)return;const j=C;u(j.name);const T=await H$(j);w.setValue("key",T)},b=()=>{var _;console.log(a.current),(_=a.current)==null||_.click()};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...w,children:l.jsxs("form",{onSubmit:_=>{_.stopPropagation(),w.handleSubmit(m)(_)},className:"space-y-3",children:[l.jsx(Se,{control:w.control,name:"name",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.name.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"group",render:({field:_})=>l.jsxs(ve,{children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:d("access.form.ssh.group.label")}),l.jsx(ax,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),d("add")]})})]}),l.jsx(we,{children:l.jsxs(Ui,{..._,value:_.value,defaultValue:"emptyId",onValueChange:C=>{w.setValue("group",C)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:d("access.group.not.empty")})}),l.jsxs(ii,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),o.map(C=>l.jsx(yr,{value:C.id?C.id:"",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:C.name})},C.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"id",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"configType",render:({field:_})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:d("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{..._})}),l.jsx(ge,{})]})}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Se,{control:w.control,name:"host",render:({field:_})=>l.jsxs(ve,{className:"grow",children:[l.jsx(xe,{children:d("access.form.ssh.host")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.host.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"port",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.port")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.port.not.empty"),..._,type:"number"})}),l.jsx(ge,{})]})})]}),l.jsx(Se,{control:w.control,name:"username",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("username.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"password",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("password.not.empty"),..._,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"key",render:({field:_})=>l.jsxs(ve,{hidden:!0,children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyFile",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key")}),l.jsx(we,{children:l.jsxs("div",{children:[l.jsx(Ue,{type:"button",variant:"secondary",size:"sm",className:"w-48",onClick:b,children:c||d("access.form.ssh.key.file.not.empty")}),l.jsx(Ne,{placeholder:d("access.form.ssh.key.not.empty"),..._,ref:a,className:"hidden",hidden:!0,type:"file",onChange:p})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"certPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.cert.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"keyPath",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:d("access.form.ssh.key.path.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"preCommand",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.pre.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:d("access.form.ssh.pre.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:w.control,name:"command",render:({field:_})=>l.jsxs(ve,{children:[l.jsx(xe,{children:d("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:d("access.form.ssh.command.not.empty"),..._})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:d("save")})})]})})})})},vV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,url:ce.string().url("zod.rule.url")});let a={url:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"webhook",url:a.url}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{url:d.url}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"url",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.webhook.url")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.webhook.url.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},xV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,dnsApiToken:ce.string().min(1,"access.form.cloud.dns.api.token.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={dnsApiToken:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"cloudflare",dnsApiToken:a.dnsApiToken}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{dnsApiToken:d.dnsApiToken}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"dnsApiToken",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.cloud.dns.api.token")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.cloud.dns.api.token.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},wV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,accessKey:ce.string().min(1,"access.form.access.key.not.empty").max(64),secretKey:ce.string().min(1,"access.form.secret.key.not.empty").max(64)});let a={accessKey:"",secretKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"qiniu",accessKey:a.accessKey,secretKey:a.secretKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{accessKey:d.accessKey,secretKey:d.secretKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"accessKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.access.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.access.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"secretKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.secret.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.secret.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},bV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,apiKey:ce.string().min(1,"access.form.namesilo.api.key.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={apiKey:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"namesilo",apiKey:a.apiKey}}),u=async d=>{const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{apiKey:d.apiKey}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.namesilo.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.namesilo.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},_V=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s}=In(),{t:i}=it(),o=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,i("zod.rule.string.max",{max:64})),configType:Bs,apiKey:ce.string().min(1,"access.form.go.daddy.api.key.not.empty").max(64,i("zod.rule.string.max",{max:64})),apiSecret:ce.string().min(1,"access.form.go.daddy.api.secret.not.empty").max(64,i("zod.rule.string.max",{max:64}))});let a={apiKey:"",apiSecret:""};e&&(a=e.config);const c=pn({resolver:mn(o),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"godaddy",apiKey:a.apiKey,apiSecret:a.apiSecret}}),u=async d=>{console.log(d);const f={id:d.id,name:d.name,configType:d.configType,usage:Ws(d.configType),config:{apiKey:d.apiKey,apiSecret:d.apiSecret}};try{f.id=t=="copy"?"":f.id;const h=await Us(f);if(n(),f.id=h.id,f.created=h.created,f.updated=h.updated,d.id&&t=="edit"){s(f);return}r(f)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"name",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.name.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"id",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"configType",render:({field:d})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:i("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiKey",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.go.daddy.api.key")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.go.daddy.api.key.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:c.control,name:"apiSecret",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:i("access.form.go.daddy.api.secret")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:i("access.form.go.daddy.api.secret.not.empty"),...d})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:i("save")})})]})})})})},SV=({data:e,op:t,onAfterReq:n})=>{const{addAccess:r,updateAccess:s,reloadAccessGroups:i}=In(),{t:o}=it(),a=ce.object({id:ce.string().optional(),name:ce.string().min(1,"access.form.name.not.empty").max(64,o("zod.rule.string.max",{max:64})),configType:Bs,command:ce.string().min(1,"access.form.ssh.command.not.empty").max(2048,o("zod.rule.string.max",{max:2048})),certPath:ce.string().min(0,"access.form.ssh.cert.path.not.empty").max(2048,o("zod.rule.string.max",{max:2048})),keyPath:ce.string().min(0,"access.form.ssh.key.path.not.empty").max(2048,o("zod.rule.string.max",{max:2048}))});let c={command:"sudo service nginx restart",certPath:"/etc/nginx/ssl/certificate.crt",keyPath:"/etc/nginx/ssl/private.key"};e&&(c=e.config);const u=pn({resolver:mn(a),defaultValues:{id:e==null?void 0:e.id,name:(e==null?void 0:e.name)||"",configType:"local",certPath:c.certPath,keyPath:c.keyPath,command:c.command}}),d=async f=>{const h={id:f.id,name:f.name,configType:f.configType,usage:Ws(f.configType),config:{command:f.command,certPath:f.certPath,keyPath:f.keyPath}};try{h.id=t=="copy"?"":h.id;const y=await Us(h);n(),h.id=y.id,h.created=y.created,h.updated=y.updated,f.id&&t=="edit"?s(h):r(h),i()}catch(y){Object.entries(y.response.data).forEach(([g,w])=>{u.setError(g,{type:"manual",message:w.message})});return}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"max-w-[35em] mx-auto mt-10",children:l.jsx(gn,{...u,children:l.jsxs("form",{onSubmit:f=>{f.stopPropagation(),u.handleSubmit(d)(f)},className:"space-y-3",children:[l.jsx(Se,{control:u.control,name:"name",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("name")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.name.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"id",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"configType",render:({field:f})=>l.jsxs(ve,{className:"hidden",children:[l.jsx(xe,{children:o("access.form.config.field")}),l.jsx(we,{children:l.jsx(Ne,{...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"certPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.cert.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.ssh.cert.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"keyPath",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.key.path")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("access.form.ssh.key.path.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:u.control,name:"command",render:({field:f})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("access.form.ssh.command")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("access.form.ssh.command.not.empty"),...f})}),l.jsx(ge,{})]})}),l.jsx(ge,{}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})})};function ia({trigger:e,op:t,data:n,className:r}){const[s,i]=v.useState(!1),{t:o}=it(),a=Array.from(wi.keys()),[c,u]=v.useState((n==null?void 0:n.configType)||"");let d=l.jsx(l.Fragment,{children:" "});switch(c){case"tencent":d=l.jsx(mV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"aliyun":d=l.jsx(gV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"ssh":d=l.jsx(yV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"webhook":d=l.jsx(vV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"cloudflare":d=l.jsx(xV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"qiniu":d=l.jsx(wV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"namesilo":d=l.jsx(bV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"godaddy":d=l.jsx(_V,{data:n,op:t,onAfterReq:()=>{i(!1)}});break;case"local":d=l.jsx(SV,{data:n,op:t,onAfterReq:()=>{i(!1)}});break}const f=h=>h==c?"border-primary":"";return l.jsxs(Dh,{onOpenChange:i,open:s,children:[l.jsx(Ih,{asChild:!0,className:se(r),children:e}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:t=="add"?o("access.add"):t=="edit"?o("access.edit"):o("access.copy")})}),l.jsx(Fh,{className:"max-h-[80vh]",children:l.jsxs("div",{className:"container py-3",children:[l.jsx(Ri,{children:o("access.type")}),l.jsxs(Ui,{onValueChange:h=>{u(h)},defaultValue:c,children:[l.jsx(si,{className:"mt-3",children:l.jsx(Vi,{placeholder:o("access.type.not.empty")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("access.type")}),a.map(h=>{var y,x;return l.jsx(yr,{value:h,children:l.jsxs("div",{className:se("flex items-center space-x-2 rounded cursor-pointer",f(h)),children:[l.jsx("img",{src:(y=wi.get(h))==null?void 0:y[1],className:"h-6 w-6"}),l.jsx("div",{children:o(((x=wi.get(h))==null?void 0:x[0])||"")})]})},h)})]})})]}),d]})})]})]})}const kV=({className:e,trigger:t})=>{const{config:{emails:n},setEmails:r}=In(),[s,i]=v.useState(!1),{t:o}=it(),a=ce.object({email:ce.string().email("email.valid.message")}),c=pn({resolver:mn(a),defaultValues:{email:""}}),u=async d=>{if(n.content.emails.includes(d.email)){c.setError("email",{message:"email.already.exist"});return}const f=[...n.content.emails,d.email];try{const h=await Ga({...n,name:"emails",content:{emails:f}});r(h),c.reset(),c.clearErrors(),i(!1)}catch(h){Object.entries(h.response.data).forEach(([x,g])=>{c.setError(x,{type:"manual",message:g.message})})}};return l.jsxs(Dh,{onOpenChange:i,open:s,children:[l.jsx(Ih,{asChild:!0,className:se(e),children:t}),l.jsxs(ru,{className:"sm:max-w-[600px] w-full dark:text-stone-200",children:[l.jsx(su,{children:l.jsx(iu,{children:o("email.add")})}),l.jsx("div",{className:"container py-3",children:l.jsx(gn,{...c,children:l.jsxs("form",{onSubmit:d=>{console.log(d),d.stopPropagation(),c.handleSubmit(u)(d)},className:"space-y-8",children:[l.jsx(Se,{control:c.control,name:"email",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:o("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:o("email.not.empty.message"),...d,type:"email"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})]})]})},a2={domain:"domain",ip:"IP"},CV=({value:e,className:t,onValueChange:n,valueType:r="domain"})=>{const[s,i]=v.useState([]),{t:o}=it();v.useMemo(()=>{e&&i(e.split(";"))},[e]),v.useEffect(()=>{(()=>{n(s.join(";"))})()},[s]);const a=d=>{s.includes(d)||i([...s,d])},c=(d,f)=>{const h=[...s];h[d]=f,i(h)},u=d=>{const f=[...s];f.splice(d,1),i(f)};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:se(t),children:[l.jsxs(xe,{className:"flex justify-between items-center",children:[l.jsx("div",{children:o(a2[r])}),l.jsx(Ss,{when:s.length>0,children:l.jsx(Up,{op:"add",onValueChange:d=>{a(d)},valueType:r,value:"",trigger:l.jsxs("div",{className:"flex items-center text-primary",children:[l.jsx(Fl,{size:16,className:"cursor-pointer "}),l.jsx("div",{className:"text-sm ",children:o("add")})]})})})]}),l.jsx(we,{children:l.jsx(Ss,{when:s.length>0,fallback:l.jsxs("div",{className:"border rounded-md p-3 text-sm mt-2 flex flex-col items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:"暂未添加域名"}),l.jsx(Up,{value:"",trigger:o("add"),onValueChange:a,valueType:r})]}),children:l.jsx("div",{className:"border rounded-md p-3 text-sm mt-2 text-gray-700 space-y-2 dark:text-white dark:border-stone-700 dark:bg-stone-950",children:s.map((d,f)=>l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{children:d}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx(Up,{op:"edit",valueType:r,trigger:l.jsx(WO,{size:16,className:"cursor-pointer text-gray-600 dark:text-white"}),value:d,onValueChange:h=>{c(f,h)}}),l.jsx(KO,{size:16,className:"cursor-pointer",onClick:()=>{u(f)}})]})]},f))})})})]})})},Up=({trigger:e,value:t,onValueChange:n,op:r="add",valueType:s})=>{const[i,o]=v.useState(""),[a,c]=v.useState(!1),[u,d]=v.useState(""),{t:f}=it();v.useEffect(()=>{o(t)},[t]);const h=ce.string().regex(/^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/,{message:f("domain.not.empty.verify.message")}),y=ce.string().ip({message:f("ip.not.empty.verify.message")}),x={domain:h,ip:y},g=v.useCallback(()=>{const m=x[s].safeParse(i);if(!m.success){d(JSON.parse(m.error.message)[0].message);return}o(""),c(!1),d(""),n(i)},[i]);return l.jsxs(Dh,{open:a,onOpenChange:w=>{c(w)},children:[l.jsx(Ih,{className:"text-primary",children:e}),l.jsxs(ru,{className:"dark:text-white",children:[l.jsx(su,{children:l.jsx(iu,{className:"dark:text-white",children:f(a2[s])})}),l.jsx(Ne,{value:i,className:"dark:text-white",onChange:w=>{o(w.target.value)}}),l.jsx(Ss,{when:u.length>0,children:l.jsx("div",{className:"text-red-500 text-sm",children:u})}),l.jsx(YN,{children:l.jsx(Ue,{onClick:()=>{g()},children:f(r==="add"?"add":"confirm")})})]})]})},jV=()=>{const{config:{accesses:e,emails:t,accessGroups:n}}=In(),[r,s]=v.useState(),i=Ar(),{t:o}=it(),[a,c]=v.useState("base"),[u,d]=v.useState(r?r.targetType:"");v.useEffect(()=>{const p=new URLSearchParams(i.search).get("id");p&&(async()=>{const _=await q$(p);s(_),d(_.targetType)})()},[i.search]);const f=ce.object({id:ce.string().optional(),domain:ce.string().min(1,{message:"domain.not.empty.verify.message"}),email:ce.string().email("email.valid.message").optional(),access:ce.string().regex(/^[a-zA-Z0-9]+$/,{message:"domain.management.edit.dns.access.not.empty.message"}),targetAccess:ce.string().optional(),targetType:ce.string().regex(/^[a-zA-Z0-9-]+$/,{message:"domain.management.edit.target.type.not.empty.message"}),variables:ce.string().optional(),group:ce.string().optional(),nameservers:ce.string().optional()}),h=pn({resolver:mn(f),defaultValues:{id:"",domain:"",email:"",access:"",targetAccess:"",targetType:"",variables:"",group:"",nameservers:""}});v.useEffect(()=>{r&&h.reset({id:r.id,domain:r.domain,email:r.email,access:r.access,targetAccess:r.targetAccess,targetType:r.targetType,variables:r.variables,group:r.group,nameservers:r.nameservers})},[r,h]);const y=e.filter(m=>{if(m.usage=="apply")return!1;if(u=="")return!0;const p=u.split("-");return m.configType===p[0]}),{toast:x}=Ir(),g=Dn(),w=async m=>{const p=m.group=="emptyId"?"":m.group,b=m.targetAccess==="emptyId"?"":m.targetAccess;if(p==""&&b==""){h.setError("group",{type:"manual",message:"domain.management.edit.target.access.verify.msg"}),h.setError("targetAccess",{type:"manual",message:"domain.management.edit.target.access.verify.msg"});return}const _={id:m.id,crontab:"0 0 * * *",domain:m.domain,email:m.email,access:m.access,group:p,targetAccess:b,targetType:m.targetType,variables:m.variables,nameservers:m.nameservers};try{await cg(_);let C=o("domain.management.edit.succeed.tips");_.id==""&&(C=o("domain.management.add.succeed.tips")),x({title:o("succeed"),description:C}),g("/domains")}catch(C){Object.entries(C.response.data).forEach(([T,P])=>{h.setError(T,{type:"manual",message:P.message})});return}};return l.jsx(l.Fragment,{children:l.jsxs("div",{className:"",children:[l.jsx(Zv,{}),l.jsx("div",{className:" h-5 text-muted-foreground",children:r!=null&&r.id?o("domain.edit"):o("domain.add")}),l.jsxs("div",{className:"mt-5 flex w-full justify-center md:space-x-10 flex-col md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[200px] text-muted-foreground space-x-3 md:space-y-3 flex-row md:flex-col flex",children:[l.jsx("div",{className:se("cursor-pointer text-right",a==="base"?"text-primary":""),onClick:()=>{c("base")},children:o("basic.setting")}),l.jsx("div",{className:se("cursor-pointer text-right",a==="advance"?"text-primary":""),onClick:()=>{c("advance")},children:o("advanced.setting")})]}),l.jsx("div",{className:"w-full md:w-[35em] bg-gray-100 dark:bg-gray-900 p-5 rounded mt-3 md:mt-0",children:l.jsx(gn,{...h,children:l.jsxs("form",{onSubmit:h.handleSubmit(w),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:h.control,name:"domain",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(l.Fragment,{children:l.jsx(CV,{value:m.value,valueType:"domain",onValueChange:p=>{h.setValue("domain",p)}})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"email",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("email")+o("domain.management.edit.email.description")}),l.jsx(kV,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]})})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,onValueChange:p=>{h.setValue("email",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.email.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("email.list")}),t.content.emails.map(p=>l.jsx(yr,{value:p,children:l.jsx("div",{children:p})},p))]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"access",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"flex w-full justify-between",children:[l.jsx("div",{children:o("domain.management.edit.dns.access.label")}),l.jsx(ia,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,onValueChange:p=>{h.setValue("access",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.access.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("domain.management.edit.access.label")}),e.filter(p=>p.usage!="deploy").map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wi.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetType",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsx(xe,{children:o("domain.management.edit.target.type")}),l.jsx(we,{children:l.jsxs(Ui,{...m,onValueChange:p=>{d(p),h.setValue("targetType",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.target.type.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsx(sa,{children:o("domain.management.edit.target.type")}),JU.map(p=>{var b,_;return l.jsx(yr,{value:p,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wg.get(p))==null?void 0:b[1]}),l.jsx("div",{children:o(((_=wg.get(p))==null?void 0:_[0])||"")})]})},p)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"targetAccess",render:({field:m})=>l.jsxs(ve,{hidden:a!="base",children:[l.jsxs(xe,{className:"w-full flex justify-between",children:[l.jsx("div",{children:o("domain.management.edit.target.access")}),l.jsx(ia,{trigger:l.jsxs("div",{className:"font-normal text-primary hover:underline cursor-pointer flex items-center",children:[l.jsx(Fl,{size:14}),o("add")]}),op:"add"})]}),l.jsx(we,{children:l.jsxs(Ui,{...m,onValueChange:p=>{h.setValue("targetAccess",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.target.access.not.empty.message")})}),l.jsx(ii,{children:l.jsxs(Cl,{children:[l.jsxs(sa,{children:[o("domain.management.edit.target.access.content.label")," ",h.getValues().targetAccess]}),l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:"flex items-center space-x-2",children:"--"})}),y.map(p=>{var b;return l.jsx(yr,{value:p.id,children:l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("img",{className:"w-6",src:(b=wi.get(p.configType))==null?void 0:b[1]}),l.jsx("div",{children:p.name})]})},p.id)})]})})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"group",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance"||u!="ssh",children:[l.jsx(xe,{className:"w-full flex justify-between",children:l.jsx("div",{children:o("domain.management.edit.group.label")})}),l.jsx(we,{children:l.jsxs(Ui,{...m,value:m.value,defaultValue:"emptyId",onValueChange:p=>{h.setValue("group",p)},children:[l.jsx(si,{children:l.jsx(Vi,{placeholder:o("domain.management.edit.group.not.empty.message")})}),l.jsxs(ii,{children:[l.jsx(yr,{value:"emptyId",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:"--"})}),n.filter(p=>{var b;return p.expand&&((b=p.expand)==null?void 0:b.access.length)>0}).map(p=>l.jsx(yr,{value:p.id?p.id:"",children:l.jsx("div",{className:se("flex items-center space-x-2 rounded cursor-pointer"),children:p.name})},p.id))]})]})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"variables",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:o("variables")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("domain.management.edit.variables.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:h.control,name:"nameservers",render:({field:m})=>l.jsxs(ve,{hidden:a!="advance",children:[l.jsx(xe,{children:o("dns")}),l.jsx(we,{children:l.jsx(go,{placeholder:o("domain.management.edit.dns.placeholder"),...m,className:"placeholder:whitespace-pre-wrap"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:o("save")})})]})})})]})]})})},l2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));l2.displayName="Card";const c2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("flex flex-col space-y-1.5 p-6",e),...t}));c2.displayName="CardHeader";const u2=v.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:se("text-2xl font-semibold leading-none tracking-tight",e),...t}));u2.displayName="CardTitle";const d2=v.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:se("text-sm text-muted-foreground",e),...t}));d2.displayName="CardDescription";const f2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("p-6 pt-0",e),...t}));f2.displayName="CardContent";const h2=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("flex items-center p-6 pt-0",e),...t}));h2.displayName="CardFooter";const Os=e=>e instanceof Error?e.message:typeof e=="object"&&e!==null&&"message"in e?String(e.message):typeof e=="string"?e:"Something went wrong",EV=()=>{const{config:{accessGroups:e},reloadAccessGroups:t}=In(),{toast:n}=Ir(),r=Dn(),{t:s}=it(),i=async a=>{try{await v6(a),t()}catch(c){n({title:s("delete.failed"),description:Os(c),variant:"destructive"});return}},o=()=>{r("/access")};return l.jsxs("div",{className:"mt-10",children:[l.jsx(Ss,{when:e.length==0,children:l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(iw,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:s("access.group.domain.empty")}),l.jsx(ax,{trigger:l.jsx(Ue,{children:s("access.group.add")}),className:"mt-3"})]})})}),l.jsx(Fh,{className:"h-[75vh] overflow-hidden",children:l.jsx("div",{className:"flex gap-5 flex-wrap",children:e.map(a=>l.jsxs(l2,{className:"w-full md:w-[350px]",children:[l.jsxs(c2,{children:[l.jsx(u2,{children:a.name}),l.jsx(d2,{children:s("access.group.total",{total:a.expand?a.expand.access.length:0})})]}),l.jsx(f2,{className:"min-h-[180px]",children:a.expand?l.jsx(l.Fragment,{children:a.expand.access.slice(0,3).map(c=>l.jsx("div",{className:"flex flex-col mb-3",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"",children:l.jsx("img",{src:d1(c.configType)[1],alt:"provider",className:"w-8 h-8"})}),l.jsxs("div",{className:"ml-3",children:[l.jsx("div",{className:"text-sm font-semibold text-gray-700 dark:text-gray-200",children:c.name}),l.jsx("div",{className:"text-xs text-muted-foreground",children:d1(c.configType)[0]})]})]})},c.id))}):l.jsx(l.Fragment,{children:l.jsxs("div",{className:"flex text-gray-700 dark:text-gray-200 items-center",children:[l.jsx("div",{children:l.jsx(iw,{size:40})}),l.jsx("div",{className:"ml-2",children:s("access.group.empty")})]})})}),l.jsx(h2,{children:l.jsxs("div",{className:"flex justify-end w-full",children:[l.jsx(Ss,{when:!!(a.expand&&a.expand.access.length>0),children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",variant:"link",onClick:()=>{r(`/access?accessGroupId=${a.id}&tab=access`,{replace:!0})},children:s("access.all")})})}),l.jsx(Ss,{when:!a.expand||a.expand.access.length==0,children:l.jsx("div",{children:l.jsx(Ue,{size:"sm",onClick:o,children:s("access.add")})})}),l.jsx("div",{className:"ml-3",children:l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"destructive",size:"sm",children:s("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:s("access.group.delete")}),l.jsx(_h,{children:s("access.group.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{className:"dark:text-gray-200",children:s("cancel")}),l.jsx(Sh,{onClick:()=>{i(a.id?a.id:"")},children:s("confirm")})]})]})]})})]})})]}))})})]})};var lx="Tabs",[NV,$H]=on(lx,[Wa]),p2=Wa(),[TV,cx]=NV(lx),m2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...u}=e,d=xo(a),[f,h]=Zn({prop:r,onChange:s,defaultProp:i});return l.jsx(TV,{scope:n,baseId:Wn(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:l.jsx(Re.div,{dir:d,"data-orientation":o,...u,ref:t})})});m2.displayName=lx;var g2="TabsList",y2=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=cx(g2,n),o=p2(n);return l.jsx(By,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:l.jsx(Re.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});y2.displayName=g2;var v2="TabsTrigger",x2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=cx(v2,n),a=p2(n),c=_2(o.baseId,r),u=S2(o.baseId,r),d=r===o.value;return l.jsx(Wy,{asChild:!0,...a,focusable:!s,active:d,children:l.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!s&&f&&o.onValueChange(r)})})})});x2.displayName=v2;var w2="TabsContent",b2=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=cx(w2,n),c=_2(a.baseId,r),u=S2(a.baseId,r),d=r===a.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),l.jsx(an,{present:s||d,children:({present:h})=>l.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});b2.displayName=w2;function _2(e,t){return`${e}-trigger-${t}`}function S2(e,t){return`${e}-content-${t}`}var RV=m2,k2=y2,C2=x2,j2=b2;const E2=RV,ux=v.forwardRef(({className:e,...t},n)=>l.jsx(k2,{ref:n,className:se("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ux.displayName=k2.displayName;const Xi=v.forwardRef(({className:e,...t},n)=>l.jsx(C2,{ref:n,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Xi.displayName=C2.displayName;const yf=v.forwardRef(({className:e,...t},n)=>l.jsx(j2,{ref:n,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));yf.displayName=j2.displayName;const PV={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class vf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||PV,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[a,c]=o;for(let u=0;u{let[a,c]=o;for(let u=0;u{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},f1=e=>e==null?"":""+e,AV=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},OV=/###/g,h1=e=>e&&e.indexOf("###")>-1?e.replace(OV,"."):e,p1=e=>!e||typeof e=="string",Bl=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s{const{obj:r,k:s}=Bl(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=Bl(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Bl(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},DV=(e,t,n,r)=>{const{obj:s,k:i}=Bl(e,t,Object);s[i]=s[i]||[],s[i].push(n)},xf=(e,t)=>{const{obj:n,k:r}=Bl(e,t);if(n)return n[r]},IV=(e,t,n)=>{const r=xf(e,n);return r!==void 0?r:xf(t,n)},N2=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):N2(e[r],t[r],n):e[r]=t[r]);return e},Mo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var MV={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const LV=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>MV[t]):e;class FV{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const zV=[" ",",","?","!",";"],$V=new FV(20),UV=(e,t,n)=>{t=t||"",n=n||"";const r=zV.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=$V.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},bg=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let i=0;i-1&&ce&&e.indexOf("_")>0?e.replace("_","-"):e;class g1 extends zh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):typeof r=="string"&&i?a.push(...r.split(i)):a.push(r)));const c=xf(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||typeof r!="string"?c:bg(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),m1(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=xf(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?N2(c,r,i):c={...c,...r},m1(this.data,a,c),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var T2={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,s))}),t}};const y1={};class bf extends zh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),AV(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yr.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!UV(t,r,s);if(o&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(s)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const _=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${_}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${_}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let h=f&&f.res;const y=f&&f.usedKey||o,x=f&&f.exactUsedKey||o,g=Object.prototype.toString.apply(h),w=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&h&&(typeof h!="string"&&typeof h!="boolean"&&typeof h!="number")&&w.indexOf(g)<0&&!(typeof m=="string"&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(f.res=_,f.usedParams=this.getUsedParamsDetails(n),f):_}if(i){const _=Array.isArray(h),C=_?[]:{},j=_?x:y;for(const T in h)if(Object.prototype.hasOwnProperty.call(h,T)){const P=`${j}${i}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:a}),C[T]===P&&(C[T]=h[T])}h=C}}else if(p&&typeof m=="string"&&Array.isArray(h))h=h.join(m),h&&(h=this.extendTranslation(h,t,n,r));else{let _=!1,C=!1;const j=n.count!==void 0&&typeof n.count!="string",T=bf.hasDefaultValue(n),P=j?this.pluralResolver.getSuffix(u,n.count,n):"",A=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),G=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(h)&&T&&(_=!0,h=G),this.isValidLookup(h)||(C=!0,h=o);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,S=T&&G!==h&&this.options.updateMissing;if(C||_||S){if(this.logger.log(S?"updateKey":"missingKey",u,c,o,S?G:h),i){const W=this.resolve(o,{...n,keySeparator:!1});W&&W.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let W=0;W{const $=T&&X!==h?X:F;this.options.missingKeyHandler?this.options.missingKeyHandler(W,c,I,$,S,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(W,c,I,$,S,n),this.emit("missingKey",W,c,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?U.forEach(W=>{const I=this.pluralResolver.getSuffixes(W,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(X=>{z([W],o+X,n[`defaultValue${X}`]||G)})}):z(U,o,G))}h=this.extendTranslation(h,t,n,f,r),C&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${c}:${o}`),(C||_)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,_?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=t.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||s.usedLng,r),u){const h=t.match(this.interpolator.nestingRegexp),y=h&&h.length;d1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return typeof t=="string"&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),d=u.key;s=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&typeof n.count!="string",y=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),x=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(w=>{this.isValidLookup(r)||(a=w,!y1[`${g[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(y1[`${g[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(m=>{if(this.isValidLookup(r))return;o=m;const p=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,d,m,w,n);else{let _;h&&(_=this.pluralResolver.getSuffix(m,n.count,n));const C=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(p.push(d+_),n.ordinal&&_.indexOf(j)===0&&p.push(d+_.replace(j,this.options.pluralSeparator)),y&&p.push(d+C)),x){const T=`${d}${this.options.contextSeparator}${n.context}`;p.push(T),h&&(p.push(T+_),n.ordinal&&_.indexOf(j)===0&&p.push(T+_.replace(j,this.options.pluralSeparator)),y&&p.push(T+C))}}let b;for(;b=p.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(m,w,b,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Vp=e=>e.charAt(0).toUpperCase()+e.slice(1);class v1{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yr.create("languageUtils")}getScriptPartFromCode(t){if(t=wf(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=wf(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Vp(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Vp(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Vp(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let VV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],BV={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const WV=["v1","v2","v3"],HV=["v4"],x1={zero:0,one:1,two:2,few:3,many:4,other:5},YV=()=>{const e={};return VV.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:BV[t.fc]}})}),e};class KV{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yr.create("pluralResolver"),(!this.options.compatibilityJSON||HV.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=YV(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=wf(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const o=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[i]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>x1[s]-x1[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!WV.includes(this.options.compatibilityJSON)}}const w1=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=IV(e,t,n);return!i&&s&&typeof n=="string"&&(i=bg(e,n,r),i===void 0&&(i=bg(t,n,r))),i},Bp=e=>e.replace(/\$/g,"$$$$");class GV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:y,nestingSuffix:x,nestingSuffixEscaped:g,nestingOptionsSeparator:w,maxReplaces:m,alwaysFormat:p}=t.interpolation;this.escape=n!==void 0?n:LV,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Mo(i):o||"{{",this.suffix=a?Mo(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=h?Mo(h):y||Mo("$t("),this.nestingSuffix=x?Mo(x):g||Mo(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=m||1e3,this.alwaysFormat=p!==void 0?p:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=y=>{if(y.indexOf(this.formatSeparator)<0){const m=w1(n,c,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...s,...n,interpolationkey:y}):m}const x=y.split(this.formatSeparator),g=x.shift().trim(),w=x.join(this.formatSeparator).trim();return this.format(w1(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:g})};this.resetRegExp();const d=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>Bp(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Bp(this.escape(y)):Bp(y)}].forEach(y=>{for(a=0;i=y.regex.exec(t);){const x=i[1].trim();if(o=u(x),o===void 0)if(typeof d=="function"){const w=d(t,i,s);o=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(f){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=f1(o));const g=y.safeValue(o);if(t=t.replace(i[0],g),f?(y.regex.lastIndex+=o.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(c,u)=>{const d=this.nestingOptionsSeparator;if(c.indexOf(d)<0)return c;const f=c.split(new RegExp(`${d}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,o);const y=h.match(/'/g),x=h.match(/"/g);(y&&y.length%2===0&&!x||x.length%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${d}${h}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),c=d,u=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=f1(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),u&&(i=c.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const ZV=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Lo=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(wf(r),s),t[o]=a),a(n)}};class qV{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yr.create("formatter"),this.options=t,this.formats={number:Lo((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Lo((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Lo((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Lo((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Lo((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Lo(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,c)=>{const{formatName:u,formatOptions:d}=ZV(c);if(this.formats[u]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},y=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](a,y,{...d,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const XV=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QV extends zh{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Yr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,d=!1,o[h]===void 0&&(o[h]=!0),i[h]===void 0&&(i[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{DV(c.loaded,[i],o),XV(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&s{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(u,d)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>a(null,d)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,r,s,c):d=u(t,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else u(t,n,r,s,a,c)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const b1=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),_1=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Hu=()=>{},JV=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ac extends zh{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=_1(t),this.services={},this.logger=Yr,this.modules={external:[]},JV(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=b1();this.options={...s,...this.options,..._1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Yr.init(i(this.modules.logger),this.options):Yr.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=qV);const f=new v1(this.options);this.store=new g1(this.options.resources,this.options);const h=this.services;h.logger=Yr,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new KV(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=i(d),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new GV(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new QV(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(y){for(var x=arguments.length,g=new Array(x>1?x-1:0),w=1;w1?x-1:0),w=1;w{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Hu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const c=hl(),u=()=>{const d=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hu;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const s=hl();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Hu),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&T2.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=hl();this.emit("languageChanging",t);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const u=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{o(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const i=function(o,a){let c;if(typeof a!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f`${c.keyPrefix}${h}${x}`):y=c.keyPrefix?`${c.keyPrefix}${h}${o}`:o,s.t(y,c)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=hl();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=hl();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new v1(b1());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ac(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hu;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new Ac(s);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new g1(this.store.data,s),i.services.resourceStore=i.store),i.translator=new bf(i.services,s),i.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d{const{config:e,deleteAccess:t}=In(),{accesses:n}=e,r=10,s=Math.ceil(n.length/r),i=Dn(),o=Ar(),a=new URLSearchParams(o.search),c=a.get("page"),u=c?Number(c):1,d=a.get("tab"),f=a.get("accessGroupId"),h=(u-1)*r,y=h+r,x=async w=>{const m=await y6(w);t(m.id)},g=w=>{a.set("tab",w),i({search:a.toString()})};return l.jsxs("div",{className:"",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("div",{className:"text-muted-foreground",children:Pt("access.management")}),d!="access_group"?l.jsx(ia,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add"}):l.jsx(ax,{trigger:l.jsx(Ue,{children:Pt("access.group.add")})})]}),l.jsxs(E2,{defaultValue:d||"access",value:d||"access",className:"w-full mt-5",children:[l.jsxs(ux,{className:"space-x-5 px-3",children:[l.jsx(Xi,{value:"access",onClick:()=>{g("access")},children:Pt("access.management")}),l.jsx(Xi,{value:"access_group",onClick:()=>{g("access_group")},children:Pt("access.group.management")})]}),l.jsx(yf,{value:"access",children:n.length===0?l.jsxs("div",{className:"flex flex-col items-center mt-10",children:[l.jsx("span",{className:"bg-orange-100 p-5 rounded-full",children:l.jsx(LO,{size:40,className:"text-primary"})}),l.jsx("div",{className:"text-center text-sm text-muted-foreground mt-3",children:Pt("access.empty")}),l.jsx(ia,{trigger:l.jsx(Ue,{children:Pt("access.add")}),op:"add",className:"mt-3"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:Pt("name")}),l.jsx("div",{className:"w-48",children:Pt("access.type")}),l.jsx("div",{className:"w-60",children:Pt("create.time")}),l.jsx("div",{className:"w-60",children:Pt("update.time")}),l.jsx("div",{className:"grow",children:Pt("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:Pt("access.list")}),n.filter(w=>f?w.group==f:!0).slice(h,y).map(w=>{var m,p;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:w.name}),l.jsxs("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center space-x-2",children:[l.jsx("img",{src:(m=wi.get(w.configType))==null?void 0:m[1],className:"w-6"}),l.jsx("div",{children:Pt(((p=wi.get(w.configType))==null?void 0:p[0])||"")})]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("created.in")," ",w.created&&Ta(w.created)]}),l.jsxs("div",{className:"sm:w-60 w-full pt-1 sm:pt-0 flex items-center",children:[Pt("updated.in")," ",w.updated&&Ta(w.updated)]}),l.jsxs("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0",children:[l.jsx(ia,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("edit")}),op:"edit",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsx(ia,{trigger:l.jsx(Ue,{variant:"link",className:"p-0",children:Pt("copy")}),op:"copy",data:w}),l.jsx(xr,{orientation:"vertical",className:"h-4 mx-2"}),l.jsxs(Vv,{children:[l.jsx(Bv,{asChild:!0,children:l.jsx(Ue,{variant:"link",size:"sm",children:Pt("delete")})}),l.jsxs(vh,{children:[l.jsxs(xh,{children:[l.jsx(bh,{className:"dark:text-gray-200",children:Pt("access.group.delete")}),l.jsx(_h,{children:Pt("access.delete.confirm")})]}),l.jsxs(wh,{children:[l.jsx(kh,{className:"dark:text-gray-200",children:Pt("cancel")}),l.jsx(Sh,{onClick:()=>{x(w)},children:Pt("confirm")})]})]})]})]})]},w.id)}),l.jsx(Aj,{totalPages:s,currentPage:u,onPageChange:w=>{a.set("page",w.toString()),i({search:a.toString()})}})]})}),l.jsx(yf,{value:"access_group",children:l.jsx(EV,{})})]})]})},tB=Fc("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),dx=v.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:se(tB({variant:t}),e),...n}));dx.displayName="Alert";const fx=v.forwardRef(({className:e,...t},n)=>l.jsx("h5",{ref:n,className:se("mb-1 font-medium leading-none tracking-tight",e),...t}));fx.displayName="AlertTitle";const hx=v.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:se("text-sm [&_p]:leading-relaxed",e),...t}));hx.displayName="AlertDescription";const R2=async e=>{let t=1;e.page&&(t=e.page);let n=50;e.perPage&&(n=e.perPage);let r="domain!=null";return e.domain&&(r=`domain="${e.domain}"`),await st().collection("deployments").getList(t,n,{filter:r,sort:"-deployedAt",expand:"domain"})},nB=()=>{const e=Dn(),[t,n]=v.useState(),[r]=kO(),{t:s}=it(),i=r.get("domain");return v.useEffect(()=>{(async()=>{const a={};i&&(a.domain=i);const c=await R2(a);n(c.items)})()},[i]),l.jsxs(Fh,{className:"h-[80vh] overflow-hidden",children:[l.jsx("div",{className:"text-muted-foreground",children:s("deployment.log.name")}),t!=null&&t.length?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:s("domain")}),l.jsx("div",{className:"w-24",children:s("deployment.log.status")}),l.jsx("div",{className:"w-56",children:s("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:s("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:s("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:s("deployment.log.name")}),t==null?void 0:t.map(o=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=o.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Uv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Lv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:s("deployment.log.detail.button.text")})}),l.jsxs(nh,{className:"sm:max-w-5xl",children:[l.jsx(dv,{children:l.jsxs(fv,{children:[(c=o.expand.domain)==null?void 0:c.domain,"-",o.id,s("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},o.id)})]}):l.jsx(l.Fragment,{children:l.jsxs(dx,{className:"max-w-[40em] mx-auto mt-20",children:[l.jsx(fx,{children:s("no.data")}),l.jsxs(hx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(cS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",s("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{e("/")},children:s("domain.add")})})]})]})})]})},rB=ce.object({username:ce.string().email({message:"login.username.no.empty.message"}),password:ce.string().min(10,{message:"login.password.length.message"})}),sB=()=>{const{t:e}=it(),t=pn({resolver:mn(rB),defaultValues:{username:"",password:""}}),n=async s=>{try{await st().admins.authWithPassword(s.username,s.password),r("/")}catch(i){const o=Os(i);t.setError("username",{message:o}),t.setError("password",{message:o})}},r=Dn();return l.jsxs("div",{className:"max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md",children:[l.jsx("div",{className:"flex justify-center mb-10",children:l.jsx("img",{src:"/vite.svg",className:"w-16"})}),l.jsx(gn,{...t,children:l.jsxs("form",{onSubmit:t.handleSubmit(n),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:t.control,name:"username",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("username")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"email",...s})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:t.control,name:"password",render:({field:s})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"password",...s,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("login.submit")})})]})})]})},iB=()=>st().authStore.isValid&&st().authStore.isAdmin?l.jsx(iS,{to:"/"}):l.jsxs("div",{className:"container",children:[l.jsx(_y,{}),l.jsx(vj,{})]}),oB=ce.object({oldPassword:ce.string().min(10,{message:"setting.password.length.message"}),newPassword:ce.string().min(10,{message:"setting.password.length.message"}),confirmPassword:ce.string().min(10,{message:"setting.password.length.message"})}).refine(e=>e.newPassword===e.confirmPassword,{message:"setting.password.not.match",path:["confirmPassword"]}),aB=()=>{const{toast:e}=Ir(),t=Dn(),{t:n}=it(),r=pn({resolver:mn(oB),defaultValues:{oldPassword:"",newPassword:"",confirmPassword:""}}),s=async i=>{var o,a;try{await st().admins.authWithPassword((o=st().authStore.model)==null?void 0:o.email,i.oldPassword)}catch(c){const u=Os(c);r.setError("oldPassword",{message:u})}try{await st().admins.update((a=st().authStore.model)==null?void 0:a.id,{password:i.newPassword,passwordConfirm:i.confirmPassword}),st().authStore.clear(),e({title:n("setting.password.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(c){const u=Os(c);e({title:n("setting.password.change.failed"),description:u,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...r,children:l.jsxs("form",{onSubmit:r.handleSubmit(s),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:r.control,name:"oldPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.current.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.password.current.password"),...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"newPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.new.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"newPassword",...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:r.control,name:"confirmPassword",render:({field:i})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("setting.password.confirm.password")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:"confirmPassword",...i,type:"password"})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:n("setting.submit")})})]})})})})},lB=()=>{const e=Ar(),[t,n]=v.useState("account"),r=Dn(),{t:s}=it();return v.useEffect(()=>{const o=e.pathname.split("/")[2];n(o)},[e]),l.jsxs("div",{children:[l.jsx(Zv,{}),l.jsx("div",{className:"text-muted-foreground border-b dark:border-stone-500 py-5",children:s("setting")}),l.jsx("div",{className:"w-full mt-5 p-0 md:p-3 flex justify-center",children:l.jsxs(E2,{defaultValue:"account",className:"w-full",value:t,children:[l.jsxs(ux,{className:"mx-auto",children:[l.jsxs(Xi,{value:"account",onClick:()=>{r("/setting/account")},className:"px-5",children:[l.jsx(GO,{size:14}),l.jsx("div",{className:"ml-1",children:s("account")})]}),l.jsxs(Xi,{value:"password",onClick:()=>{r("/setting/password")},className:"px-5",children:[l.jsx(MO,{size:14}),l.jsx("div",{className:"ml-1",children:s("password")})]}),l.jsxs(Xi,{value:"notify",onClick:()=>{r("/setting/notify")},className:"px-5",children:[l.jsx($O,{size:14}),l.jsx("div",{className:"ml-1",children:s("setting.notify.menu")})]}),l.jsxs(Xi,{value:"ssl-provider",onClick:()=>{r("/setting/ssl-provider")},className:"px-5",children:[l.jsx(BO,{size:14}),l.jsx("div",{className:"ml-1",children:s("ca")})]})]}),l.jsx(yf,{value:t,children:l.jsx("div",{className:"mt-5 w-full md:w-[45em]",children:l.jsx(_y,{})})})]})})]})},cB=()=>{const[e,t]=v.useState(),[n,r]=v.useState(),s=Dn(),{t:i}=it();return v.useEffect(()=>{(async()=>{const a=await Z$();t(a)})()},[]),v.useEffect(()=>{(async()=>{const c=await R2({perPage:8});r(c.items)})()},[]),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("div",{className:"text-muted-foreground",children:i("dashboard")})}),l.jsxs("div",{className:"flex mt-10 gap-5 flex-col flex-wrap md:flex-row",children:[l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(HO,{size:48,strokeWidth:1,className:"text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.all")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.total?l.jsx(xn,{to:"/domains",className:"hover:underline",children:e==null?void 0:e.total}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg border",children:[l.jsx("div",{className:"p-3",children:l.jsx(RO,{size:48,strokeWidth:1,className:"text-red-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.near.expired")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.expired?l.jsx(xn,{to:"/domains?state=expired",className:"hover:underline",children:e==null?void 0:e.expired}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(zO,{size:48,strokeWidth:1,className:"text-green-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.enabled?l.jsx(xn,{to:"/domains?state=enabled",className:"hover:underline",children:e==null?void 0:e.enabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]}),l.jsxs("div",{className:"border w-full md:w-[250px] 3xl:w-[300px] flex items-center rounded-md p-3 shadow-lg",children:[l.jsx("div",{className:"p-3",children:l.jsx(NO,{size:48,strokeWidth:1,className:"text-gray-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground font-semibold",children:i("dashboard.not.enabled")}),l.jsxs("div",{className:"flex items-baseline",children:[l.jsx("div",{className:"text-3xl text-stone-700 dark:text-stone-200",children:e!=null&&e.disabled?l.jsx(xn,{to:"/domains?state=disabled",className:"hover:underline",children:e==null?void 0:e.disabled}):0}),l.jsx("div",{className:"ml-1 text-stone-700 dark:text-stone-200",children:i("dashboard.unit")})]})]})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground mt-5 text-sm",children:i("deployment.log.name")}),(n==null?void 0:n.length)==0?l.jsx(l.Fragment,{children:l.jsxs(dx,{className:"max-w-[40em] mt-10",children:[l.jsx(fx,{children:i("no.data")}),l.jsxs(hx,{children:[l.jsxs("div",{className:"flex items-center mt-5",children:[l.jsx("div",{children:l.jsx(cS,{className:"text-yellow-400",size:36})}),l.jsxs("div",{className:"ml-2",children:[" ",i("deployment.log.empty")]})]}),l.jsx("div",{className:"mt-2 flex justify-end",children:l.jsx(Ue,{onClick:()=>{s("/edit")},children:i("domain.add")})})]})]})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"hidden sm:flex sm:flex-row text-muted-foreground text-sm border-b dark:border-stone-500 sm:p-2 mt-5",children:[l.jsx("div",{className:"w-48",children:i("domain")}),l.jsx("div",{className:"w-24",children:i("deployment.log.status")}),l.jsx("div",{className:"w-56",children:i("deployment.log.stage")}),l.jsx("div",{className:"w-56 sm:ml-2 text-center",children:i("deployment.log.last.execution.time")}),l.jsx("div",{className:"grow",children:i("operation")})]}),l.jsx("div",{className:"sm:hidden flex text-sm text-muted-foreground",children:i("deployment.log.name")}),n==null?void 0:n.map(o=>{var a,c;return l.jsxs("div",{className:"flex flex-col sm:flex-row text-secondary-foreground border-b dark:border-stone-500 sm:p-2 hover:bg-muted/50 text-sm",children:[l.jsx("div",{className:"sm:w-48 w-full pt-1 sm:pt-0 flex items-center",children:(a=o.expand.domain)==null?void 0:a.domain.split(";").map(u=>l.jsxs(l.Fragment,{children:[u,l.jsx("br",{})]}))}),l.jsx("div",{className:"sm:w-24 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Uv,{deployment:o})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center",children:l.jsx(Lv,{phase:o.phase,phaseSuccess:o.phaseSuccess})}),l.jsx("div",{className:"sm:w-56 w-full pt-1 sm:pt-0 flex items-center sm:justify-center",children:Ta(o.deployedAt)}),l.jsx("div",{className:"flex items-center grow justify-start pt-1 sm:pt-0 sm:ml-2",children:l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsx(Ue,{variant:"link",className:"p-0",children:i("deployment.log.detail.button.text")})}),l.jsxs(nh,{className:"sm:max-w-5xl",children:[l.jsx(dv,{children:l.jsxs(fv,{children:[(c=o.expand.domain)==null?void 0:c.domain,"-",o.id,i("deployment.log.detail")]})}),l.jsxs("div",{className:"bg-gray-950 text-stone-100 p-5 text-sm h-[80dvh]",children:[o.log.check&&l.jsx(l.Fragment,{children:o.log.check.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.apply&&l.jsx(l.Fragment,{children:o.log.apply.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.info&&u.info.map(d=>l.jsx("div",{className:"mt-1 text-green-600",children:d})),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))}),o.log.deploy&&l.jsx(l.Fragment,{children:o.log.deploy.map(u=>l.jsxs("div",{className:"flex flex-col mt-2",children:[l.jsxs("div",{className:"flex",children:[l.jsxs("div",{children:["[",u.time,"]"]}),l.jsx("div",{className:"ml-2",children:u.message})]}),u.error&&l.jsx("div",{className:"mt-1 text-red-600",children:u.error})]}))})]})]})]})})]},o.id)})]})]})]})},uB=ce.object({email:ce.string().email("setting.account.email.valid.message")}),dB=()=>{var a;const{toast:e}=Ir(),t=Dn(),{t:n}=it(),[r,s]=v.useState(!1),i=pn({resolver:mn(uB),defaultValues:{email:(a=st().authStore.model)==null?void 0:a.email}}),o=async c=>{var u;try{await st().admins.update((u=st().authStore.model)==null?void 0:u.id,{email:c.email}),st().authStore.clear(),e({title:n("setting.account.email.change.succeed"),description:n("setting.account.log.back.in")}),setTimeout(()=>{t("/login")},500)}catch(d){const f=Os(d);e({title:n("setting.account.email.change.failed"),description:f,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...i,children:l.jsxs("form",{onSubmit:i.handleSubmit(o),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:i.control,name:"email",render:({field:c})=>l.jsxs(ve,{children:[l.jsx(xe,{children:n("email")}),l.jsx(we,{children:l.jsx(Ne,{placeholder:n("setting.email.placeholder"),...c,type:"email",onChange:u=>{s(!0),i.setValue("email",u.target.value)}})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:r?l.jsx(Ue,{type:"submit",children:n("setting.submit")}):l.jsx(Ue,{type:"submit",disabled:!0,variant:"secondary",children:n("setting.submit")})})]})})})})},fB=(e,t)=>{switch(t.type){case"SET_CHANNEL":{const n=t.payload.channel;return{...e,content:{...e.content,[n]:t.payload.data}}}case"SET_CHANNELS":return{...t.payload};default:return e}},P2=v.createContext({}),px=()=>v.useContext(P2),hB=({children:e})=>{const[t,n]=v.useReducer(fB,{});v.useEffect(()=>{(async()=>{const o=await Mv("notifyChannels");n({type:"SET_CHANNELS",payload:o})})()},[]);const r=v.useCallback(i=>{n({type:"SET_CHANNEL",payload:i})},[]),s=v.useCallback(i=>{n({type:"SET_CHANNELS",payload:i})},[]);return l.jsx(P2.Provider,{value:{config:t,setChannel:r,setChannels:s},children:e})},pB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{accessToken:"",secret:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={accessToken:"",secret:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.dingtalk?d.dingtalk:u})();s({id:e.id??"",name:"dingtalk",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,dingtalk:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"AccessToken",value:r.data.accessToken,onChange:a=>{s({...r,data:{...r.data,accessToken:a.target.value}})}}),l.jsx(Ne,{placeholder:n("access.form.ding.access.token.placeholder"),className:"mt-2",value:r.data.secret,onChange:a=>{s({...r,data:{...r.data,secret:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})},mB={title:"您有{COUNT}张证书即将过期",content:"有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!"},gB=()=>{const[e,t]=v.useState(""),[n,r]=v.useState([mB]),{toast:s}=Ir(),{t:i}=it();v.useEffect(()=>{(async()=>{const d=await Mv("templates");d.content&&(r(d.content.notifyTemplates),t(d.id?d.id:""))})()},[]);const o=u=>{const d=n[0];r([{...d,title:u}])},a=u=>{const d=n[0];r([{...d,content:u}])},c=async()=>{const u=await Ga({id:e,content:{notifyTemplates:n},name:"templates"});u.id&&t(u.id),s({title:i("save.succeed"),description:i("setting.notify.template.save.succeed")})};return l.jsxs("div",{children:[l.jsx(Ne,{value:n[0].title,onChange:u=>{o(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:i("setting.notify.template.variables.tips.title")}),l.jsx(go,{className:"mt-2",value:n[0].content,onChange:u=>{a(u.target.value)}}),l.jsx("div",{className:"text-muted-foreground text-sm mt-1",children:i("setting.notify.template.variables.tips.content")}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:c,children:i("save")})})]})},yB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{apiToken:"",chatId:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={apiToken:"",chatId:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.telegram?d.telegram:u})();s({id:e.id??"",name:"telegram",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{const a=await Ga({...e,name:"notifyChannels",content:{...e.content,telegram:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"ApiToken",value:r.data.apiToken,onChange:a=>{s({...r,data:{...r.data,apiToken:a.target.value}})}}),l.jsx(Ne,{placeholder:"ChatId",value:r.data.chatId,onChange:a=>{s({...r,data:{...r.data,chatId:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})};function vB(e){try{return new URL(e),!0}catch{return!1}}const xB=()=>{const{config:e,setChannels:t}=px(),{t:n}=it(),[r,s]=v.useState({id:e.id??"",name:"notifyChannels",data:{url:"",enabled:!1}});v.useEffect(()=>{const c=(()=>{const u={url:"",enabled:!1};if(!e.content)return u;const d=e.content;return d.webhook?d.webhook:u})();s({id:e.id??"",name:"webhook",data:c})},[e]);const{toast:i}=Ir(),o=async()=>{try{if(r.data.url=r.data.url.trim(),!vB(r.data.url)){i({title:n("save.failed"),description:n("setting.notify.config.save.failed.url.not.valid"),variant:"destructive"});return}const a=await Ga({...e,name:"notifyChannels",content:{...e.content,webhook:{...r.data}}});t(a),i({title:n("save.succeed"),description:n("setting.notify.config.save.succeed")})}catch(a){const c=Os(a);i({title:n("save.failed"),description:`${n("setting.notify.config.save.failed")}: ${c}`,variant:"destructive"})}};return l.jsxs("div",{children:[l.jsx(Ne,{placeholder:"Url",value:r.data.url,onChange:a=>{s({...r,data:{...r.data,url:a.target.value}})}}),l.jsxs("div",{className:"flex items-center space-x-1 mt-2",children:[l.jsx(Jc,{id:"airplane-mode",checked:r.data.enabled,onCheckedChange:()=>{s({...r,data:{...r.data,enabled:!r.data.enabled}})}}),l.jsx(Ri,{htmlFor:"airplane-mode",children:n("setting.notify.config.enable")})]}),l.jsx("div",{className:"flex justify-end mt-2",children:l.jsx(Ue,{onClick:()=>{o()},children:n("save")})})]})};var mx="Collapsible",[wB,A2]=on(mx),[bB,gx]=wB(mx),O2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=e,[c=!1,u]=Zn({prop:r,defaultProp:s,onChange:o});return l.jsx(bB,{scope:n,disabled:i,contentId:Wn(),open:c,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),children:l.jsx(Re.div,{"data-state":vx(c),"data-disabled":i?"":void 0,...a,ref:t})})});O2.displayName=mx;var D2="CollapsibleTrigger",I2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=gx(D2,n);return l.jsx(Re.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":vx(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:ue(e.onClick,s.onOpenToggle)})});I2.displayName=D2;var yx="CollapsibleContent",M2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=gx(yx,e.__scopeCollapsible);return l.jsx(an,{present:n||s.open,children:({present:i})=>l.jsx(_B,{...r,ref:t,present:i})})});M2.displayName=yx;var _B=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=e,o=gx(yx,n),[a,c]=v.useState(r),u=v.useRef(null),d=Ke(t,u),f=v.useRef(0),h=f.current,y=v.useRef(0),x=y.current,g=o.open||a,w=v.useRef(g),m=v.useRef();return v.useEffect(()=>{const p=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(p)},[]),en(()=>{const p=u.current;if(p){m.current=m.current||{transitionDuration:p.style.transitionDuration,animationName:p.style.animationName},p.style.transitionDuration="0s",p.style.animationName="none";const b=p.getBoundingClientRect();f.current=b.height,y.current=b.width,w.current||(p.style.transitionDuration=m.current.transitionDuration,p.style.animationName=m.current.animationName),c(r)}},[o.open,r]),l.jsx(Re.div,{"data-state":vx(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...i,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:g&&s})});function vx(e){return e?"open":"closed"}var SB=O2,kB=I2,CB=M2,Hs="Accordion",jB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[xx,EB,NB]=zc(Hs),[$h,UH]=on(Hs,[NB,A2]),wx=A2(),L2=We.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,i=r;return l.jsx(xx.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(AB,{...i,ref:t}):l.jsx(PB,{...s,ref:t})})});L2.displayName=Hs;var[F2,TB]=$h(Hs),[z2,RB]=$h(Hs,{collapsible:!1}),PB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[a,c]=Zn({prop:n,defaultProp:r,onChange:s});return l.jsx(F2,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:We.useCallback(()=>i&&c(""),[i,c]),children:l.jsx(z2,{scope:e.__scopeAccordion,collapsible:i,children:l.jsx($2,{...o,ref:t})})})}),AB=We.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=e,[o=[],a]=Zn({prop:n,defaultProp:r,onChange:s}),c=We.useCallback(d=>a((f=[])=>[...f,d]),[a]),u=We.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return l.jsx(F2,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:l.jsx(z2,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx($2,{...i,ref:t})})})}),[OB,Uh]=$h(Hs),$2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=e,a=We.useRef(null),c=Ke(a,t),u=EB(n),f=xo(s)==="ltr",h=ue(e.onKeyDown,y=>{var P;if(!jB.includes(y.key))return;const x=y.target,g=u().filter(A=>{var D;return!((D=A.ref.current)!=null&&D.disabled)}),w=g.findIndex(A=>A.ref.current===x),m=g.length;if(w===-1)return;y.preventDefault();let p=w;const b=0,_=m-1,C=()=>{p=w+1,p>_&&(p=b)},j=()=>{p=w-1,p{const{__scopeAccordion:n,value:r,...s}=e,i=Uh(_f,n),o=TB(_f,n),a=wx(n),c=Wn(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return l.jsx(DB,{scope:n,open:u,disabled:d,triggerId:c,children:l.jsx(SB,{"data-orientation":i.orientation,"data-state":K2(u),...a,...s,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(r):o.onItemClose(r)}})})});U2.displayName=_f;var V2="AccordionHeader",B2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(V2,n);return l.jsx(Re.h3,{"data-orientation":s.orientation,"data-state":K2(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});B2.displayName=V2;var _g="AccordionTrigger",W2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(_g,n),o=RB(_g,n),a=wx(n);return l.jsx(xx.ItemSlot,{scope:n,children:l.jsx(kB,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:t})})});W2.displayName=_g;var H2="AccordionContent",Y2=We.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Uh(Hs,n),i=bx(H2,n),o=wx(n);return l.jsx(CB,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Y2.displayName=H2;function K2(e){return e?"open":"closed"}var IB=L2,MB=U2,LB=B2,G2=W2,Z2=Y2;const S1=IB,jl=v.forwardRef(({className:e,...t},n)=>l.jsx(MB,{ref:n,className:se("border-b",e),...t}));jl.displayName="AccordionItem";const El=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(LB,{className:"flex",children:l.jsxs(G2,{ref:r,className:se("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,l.jsx(Sy,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));El.displayName=G2.displayName;const Nl=v.forwardRef(({className:e,children:t,...n},r)=>l.jsx(Z2,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:se("pb-4 pt-0",e),children:t})}));Nl.displayName=Z2.displayName;const FB=()=>{const{t:e}=it();return l.jsx(l.Fragment,{children:l.jsxs(hB,{children:[l.jsx("div",{className:"border rounded-sm p-5 shadow-lg",children:l.jsx(S1,{type:"multiple",className:"dark:text-stone-200",children:l.jsxs(jl,{value:"item-1",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("template")}),l.jsx(Nl,{children:l.jsx(gB,{})})]})})}),l.jsx("div",{className:"border rounded-md p-5 mt-7 shadow-lg",children:l.jsxs(S1,{type:"single",className:"dark:text-stone-200",children:[l.jsxs(jl,{value:"item-2",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("ding.talk")}),l.jsx(Nl,{children:l.jsx(pB,{})})]}),l.jsxs(jl,{value:"item-4",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("telegram")}),l.jsx(Nl,{children:l.jsx(yB,{})})]}),l.jsxs(jl,{value:"item-5",className:"dark:border-stone-200",children:[l.jsx(El,{children:e("webhook")}),l.jsx(Nl,{children:l.jsx(xB,{})})]})]})})]})})};var _x="Radio",[zB,q2]=on(_x),[$B,UB]=zB(_x),X2=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...u}=e,[d,f]=v.useState(null),h=Ke(t,g=>f(g)),y=v.useRef(!1),x=d?!!d.closest("form"):!0;return l.jsxs($B,{scope:n,checked:s,disabled:o,children:[l.jsx(Re.button,{type:"button",role:"radio","aria-checked":s,"data-state":eT(s),"data-disabled":o?"":void 0,disabled:o,value:a,...u,ref:h,onClick:ue(e.onClick,g=>{s||c==null||c(),x&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),x&&l.jsx(VB,{control:d,bubbles:!y.current,name:r,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});X2.displayName=_x;var Q2="RadioIndicator",J2=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,i=UB(Q2,n);return l.jsx(an,{present:r||i.checked,children:l.jsx(Re.span,{"data-state":eT(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})})});J2.displayName=Q2;var VB=e=>{const{control:t,checked:n,bubbles:r=!0,...s}=e,i=v.useRef(null),o=Wv(n),a=My(t);return v.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(o!==n&&f){const h=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(h)}},[o,n,r]),l.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function eT(e){return e?"checked":"unchecked"}var BB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sx="RadioGroup",[WB,VH]=on(Sx,[Wa,q2]),tT=Wa(),nT=q2(),[HB,YB]=WB(Sx),rT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,y=tT(n),x=xo(u),[g,w]=Zn({prop:i,defaultProp:s,onChange:f});return l.jsx(HB,{scope:n,name:r,required:o,disabled:a,value:g,onValueChange:w,children:l.jsx(By,{asChild:!0,...y,orientation:c,dir:x,loop:d,children:l.jsx(Re.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:x,...h,ref:t})})})});rT.displayName=Sx;var sT="RadioGroupItem",iT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...s}=e,i=YB(sT,n),o=i.disabled||r,a=tT(n),c=nT(n),u=v.useRef(null),d=Ke(t,u),f=i.value===s.value,h=v.useRef(!1);return v.useEffect(()=>{const y=g=>{BB.includes(g.key)&&(h.current=!0)},x=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",x)}},[]),l.jsx(Wy,{asChild:!0,...a,focusable:!o,active:f,children:l.jsx(X2,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:d,onCheck:()=>i.onValueChange(s.value),onKeyDown:ue(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ue(s.onFocus,()=>{var y;h.current&&((y=u.current)==null||y.click())})})})});iT.displayName=sT;var KB="RadioGroupIndicator",oT=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=nT(n);return l.jsx(J2,{...s,...r,ref:t})});oT.displayName=KB;var aT=rT,lT=iT,GB=oT;const cT=v.forwardRef(({className:e,...t},n)=>l.jsx(aT,{className:se("grid gap-2",e),...t,ref:n}));cT.displayName=aT.displayName;const Sg=v.forwardRef(({className:e,...t},n)=>l.jsx(lT,{ref:n,className:se("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(GB,{className:"flex items-center justify-center",children:l.jsx(lS,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Sg.displayName=lT.displayName;const ZB=()=>{const{t:e}=it(),t=ce.object({provider:ce.enum(["letsencrypt","zerossl"],{message:e("setting.ca.not.empty")}),eabKid:ce.string().optional(),eabHmacKey:ce.string().optional()}),n=pn({resolver:mn(t),defaultValues:{provider:"letsencrypt"}}),[r,s]=v.useState("letsencrypt"),[i,o]=v.useState(),{toast:a}=Ir();v.useEffect(()=>{(async()=>{const f=await Mv("ssl-provider");if(f){o(f);const h=f.content;n.setValue("provider",h.provider),n.setValue("eabKid",h.config[h.provider].eabKid),n.setValue("eabHmacKey",h.config[h.provider].eabHmacKey),s(h.provider)}else n.setValue("provider","letsencrypt"),s("letsencrypt")})()},[]);const c=d=>r===d?"border-primary":"",u=async d=>{if(d.provider==="zerossl"&&(d.eabKid||n.setError("eabKid",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),d.eabHmacKey||n.setError("eabHmacKey",{message:e("setting.ca.eab_kid_hmac_key.not.empty")}),!d.eabKid||!d.eabHmacKey))return;const f={id:i==null?void 0:i.id,name:"ssl-provider",content:{provider:d.provider,config:{letsencrypt:{},zerossl:{eabKid:d.eabKid??"",eabHmacKey:d.eabHmacKey??""}}}};try{await Ga(f),a({title:e("update.succeed"),description:e("update.succeed")})}catch(h){const y=Os(h);a({title:e("update.failed"),description:y,variant:"destructive"})}};return l.jsx(l.Fragment,{children:l.jsx("div",{className:"w-full md:max-w-[35em]",children:l.jsx(gn,{...n,children:l.jsxs("form",{onSubmit:n.handleSubmit(u),className:"space-y-8 dark:text-stone-200",children:[l.jsx(Se,{control:n.control,name:"provider",render:({field:d})=>l.jsxs(ve,{children:[l.jsx(xe,{children:e("ca")}),l.jsx(we,{children:l.jsxs(cT,{...d,className:"flex",onValueChange:f=>{s(f),n.setValue("provider",f)},value:r,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Sg,{value:"letsencrypt",id:"letsencrypt"}),l.jsx(Ri,{htmlFor:"letsencrypt",children:l.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("letsencrypt")),children:[l.jsx("img",{src:"/imgs/providers/letsencrypt.svg",className:"h-6"}),l.jsx("div",{children:"Let's Encrypt"})]})})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(Sg,{value:"zerossl",id:"zerossl"}),l.jsx(Ri,{htmlFor:"zerossl",children:l.jsxs("div",{className:se("flex items-center space-x-2 border p-2 rounded cursor-pointer",c("zerossl")),children:[l.jsx("img",{src:"/imgs/providers/zerossl.svg",className:"h-6"}),l.jsx("div",{children:"ZeroSSL"})]})})]})]})}),l.jsx(Se,{control:n.control,name:"eabKid",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_KID"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_kid.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(Se,{control:n.control,name:"eabHmacKey",render:({field:f})=>l.jsxs(ve,{hidden:r!=="zerossl",children:[l.jsx(xe,{children:"EAB_HMAC_KEY"}),l.jsx(we,{children:l.jsx(Ne,{placeholder:e("setting.ca.eab_hmac_key.not.empty"),...f,type:"text"})}),l.jsx(ge,{})]})}),l.jsx(ge,{})]})}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Ue,{type:"submit",children:e("setting.submit")})})]})})})})},qB=cO([{path:"/",element:l.jsx(A6,{}),children:[{path:"/",element:l.jsx(cB,{})},{path:"/domains",element:l.jsx(e8,{})},{path:"/edit",element:l.jsx(jV,{})},{path:"/access",element:l.jsx(eB,{})},{path:"/history",element:l.jsx(nB,{})},{path:"/setting",element:l.jsx(lB,{}),children:[{path:"/setting/password",element:l.jsx(aB,{})},{path:"/setting/account",element:l.jsx(dB,{})},{path:"/setting/notify",element:l.jsx(FB,{})},{path:"/setting/ssl-provider",element:l.jsx(ZB,{})}]}]},{path:"/login",element:l.jsx(iB,{}),children:[{path:"/login",element:l.jsx(sB,{})}]},{path:"/about",element:l.jsx("div",{children:"About"})}]),{slice:XB,forEach:QB}=[];function JB(e){return QB.call(XB.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const k1=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,eW=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const s=encodeURIComponent(t);let i=`${e}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!k1.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!k1.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},C1={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=eW(e,encodeURIComponent(t),s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}};let pl=null;const j1=()=>{if(pl!==null)return pl;try{pl=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{pl=!1}return pl};var rW={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&j1())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&j1()&&window.localStorage.setItem(n,e)}};let ml=null;const E1=()=>{if(ml!==null)return ml;try{ml=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ml=!1}return ml};var sW={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&E1())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&E1()&&window.sessionStorage.setItem(n,e)}},iW={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let i=0;i0?t:void 0}},oW={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},aW={name:"path",lookup(e){var s;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(s=n[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}},lW={name:"subdomain",lookup(e){var s,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function cW(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class uT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=JB(n,this.options||{},cW()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(tW),this.addDetector(nW),this.addDetector(rW),this.addDetector(sW),this.addDetector(iW),this.addDetector(oW),this.addDetector(aW),this.addDetector(lW)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}uT.type="languageDetector";const uW="证书颁发机构",dW="用户名",fW="密码",hW="邮箱",pW="退出登录",mW="设置",gW="账户",yW="模版",vW="保存",xW="状态",wW="操作",bW="启用",_W="禁用",SW="部署",kW="下载",CW="取消",jW="确认",EW="编辑",NW="复制",TW="成功",RW="新增",PW="文档",AW="变量",OW="域名服务器",DW="名称",IW="Telegram",MW="Webhook",LW="腾讯云",FW="阿里云",zW="七牛云",$W="Cloudflare",UW="Namesilo",VW="SSH 部署",BW="控制面板",WW="域名",HW={ca:uW,username:dW,"username.not.empty":"请输入用户名",password:fW,"password.not.empty":"请输入密码",email:hW,logout:pW,setting:mW,account:gW,template:yW,save:vW,"no.data":"暂无数据",status:xW,operation:wW,enable:bW,disable:_W,deploy:SW,download:kW,delete:"删除",cancel:CW,confirm:jW,edit:EW,copy:NW,succeed:TW,add:RW,document:PW,variables:AW,dns:OW,name:DW,"create.time":"创建时间","update.time":"更新时间","created.in":"创建于","updated.in":"更新于","basic.setting":"基础设置","advanced.setting":"高级设置","operation.succeed":"操作成功","save.succeed":"保存成功","save.failed":"保存失败","update.succeed":"修改成功","update.failed":"修改失败","delete.failed":"删除失败","ding.talk":"钉钉",telegram:IW,webhook:MW,"local.deployment":"本地部署",tencent:LW,"tencent.cdn":"腾讯云-CDN",aliyun:FW,"aliyun.cdn":"阿里云-CDN","aliyun.oss":"阿里云-OSS","aliyun.dcdn":"阿里云-DCDN",qiniu:zW,"qiniu.cdn":"七牛云-CDN",cloudflare:$W,namesilo:UW,"go.daddy":"GoDaddy",ssh:VW,"zod.rule.string.max":"请输入不超过 {{max}} 个字符","zod.rule.url":"请输入有效的 url 地址","zod.rule.ssh.host":"请输入正确的域名或IP","login.submit":"登录","login.username.no.empty.message":"请输入正确的邮箱地址","login.password.length.message":"密码至少10个字符","menu.auth.management":"授权管理","theme.light":"浅色","theme.dark":"暗黑","theme.system":"系统",dashboard:BW,"dashboard.all":"所有","dashboard.near.expired":"即将过期","dashboard.enabled":"启用中","dashboard.not.enabled":"未启用","dashboard.unit":"个","deployment.log.name":"部署历史","deployment.log.empty":"你暂未创建任何部署,请先添加域名进行部署吧!","deployment.log.status":"状态","deployment.log.stage":"阶段","deployment.log.last.execution.time":"最近执行时间","deployment.log.detail.button.text":"日志","deployment.log.detail":"部署详情","pagination.next":"下一页","pagination.prev":"上一页",domain:WW,"domain.add":"新增域名","domain.edit":"编辑域名","domain.delete":"删除域名","domain.not.empty.verify.message":"请输入域名","domain.management.name":"域名列表","domain.management.start.deploy.succeed.tips":"已发起部署,请稍后查看部署日志。","domain.management.execution.failed":"执行失败","domain.management.execution.failed.tips":"执行失败,请在 <1>部署历史 查看详情。","domain.management.empty":"请添加域名开始部署证书吧。","domain.management.expiry.date":"有效期限","domain.management.expiry.date1":"有效期 {{date}} 天","domain.management.expiry.date2":"{{date}} 到期","domain.management.last.execution.time":"最近执行时间","domain.management.last.execution.status":"最近执行状态","domain.management.last.execution.stage":"最近执行阶段","domain.management.enable":"是否启用","domain.management.start.deploying":"立即部署","domain.management.forced.deployment":"强行部署","domain.management.delete.confirm":"确定要删除域名吗?","domain.management.edit.title":"编辑域名","domain.management.edit.dns.access.label":"DNS 服务商授权配置","domain.management.edit.dns.access.not.empty.message":"请选择DNS服务商授权配置","domain.management.edit.access.label":"服务商授权配置","domain.management.edit.access.not.empty.message":"请选择授权配置","domain.management.edit.target.type":"部署服务类型","domain.management.edit.target.type.not.empty.message":"请选择部署服务类型","domain.management.edit.succeed.tips":"域名编辑成功","domain.management.edit.target.access":"部署服务商授权配置","domain.management.edit.target.access.content.label":"服务商授权配置","domain.management.edit.target.access.not.empty.message":"请选择授权配置","domain.management.edit.target.access.verify.msg":"部署授权和部署授权组至少选一个","domain.management.edit.group.label":"部署配置组(用于将一个域名证书部署到多个 ssh 主机)","domain.management.edit.group.not.empty.message":"请选择分组","domain.management.edit.email.not.empty.message":"请选择邮箱","domain.management.edit.email.description":"(申请证书需要提供邮箱)","domain.management.edit.variables.placeholder":`可在SSH部署中使用,形如: key=val; key2=val2;`,"domain.management.edit.dns.placeholder":`自定义域名服务器,多个用分号隔开,如: 8.8.8.8; diff --git a/ui/dist/assets/index-ClQTEWmX.css b/ui/dist/assets/index-DOft-CKV.css similarity index 89% rename from ui/dist/assets/index-ClQTEWmX.css rename to ui/dist/assets/index-DOft-CKV.css index f4192520..1e08162c 100644 --- a/ui/dist/assets/index-ClQTEWmX.css +++ b/ui/dist/assets/index-DOft-CKV.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 20 14.3% 4.1%;--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary: 20.5 90.2% 48.2%;--primary-foreground: 60 9.1% 97.8%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 0 72.2% 50.6%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 20.5 90.2% 48.2%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}@media (min-width: 1920px){.container{max-width:1920px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[75vh\]{height:75vh}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[80vh\]{max-height:80vh}.max-h-screen{max-height:100vh}.min-h-\[180px\]{min-height:180px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-\[60px\]{max-width:60px}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pl-2\.5{padding-left:.625rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:whitespace-pre-wrap::-moz-placeholder{white-space:pre-wrap}.placeholder\:whitespace-pre-wrap::placeholder{white-space:pre-wrap}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:border-stone-200:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 229 228 / var(--tw-border-opacity))}.dark\:border-stone-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 113 108 / var(--tw-border-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-stone-200:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-stone-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-36{width:9rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-56{width:14rem}.sm\:w-60{width:15rem}.sm\:w-64{width:16rem}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:hidden{display:none}.md\:w-\[200px\]{width:200px}.md\:w-\[250px\]{width:250px}.md\:w-\[350px\]{width:350px}.md\:w-\[35em\]{width:35em}.md\:w-\[45em\]{width:45em}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[35em\]{max-width:35em}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.md\:p-3{padding:.75rem}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1536px){@media (min-width: 768px){.\32xl\:md\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24.6 95% 53.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark{--background: 20 14.3% 4.1%;--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary: 20.5 90.2% 48.2%;--primary-foreground: 60 9.1% 97.8%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 0 72.2% 50.6%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 20.5 90.2% 48.2%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}@media (min-width: 1920px){.container{max-width:1920px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-\[-0\.65rem\]{margin-left:-.65rem;margin-right:-.65rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1\.2rem\]{height:1.2rem}.h-\[1px\]{height:1px}.h-\[36px\]{height:36px}.h-\[75vh\]{height:75vh}.h-\[80dvh\]{height:80dvh}.h-\[80vh\]{height:80vh}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-\[80vh\]{max-height:80vh}.max-h-screen{max-height:100vh}.min-h-\[180px\]{min-height:180px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[1\.2rem\]{width:1.2rem}.w-\[100px\]{width:100px}.w-\[1px\]{width:1px}.w-\[36px\]{width:36px}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-\[35em\]{max-width:35em}.max-w-\[40em\]{max-width:40em}.max-w-\[60px\]{max-width:60px}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-0{--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.text-nowrap{text-wrap:nowrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-4{padding-bottom:1rem}.pl-2\.5{padding-left:.625rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-stone-100{--tw-text-opacity: 1;color:rgb(245 245 244 / var(--tw-text-opacity))}.text-stone-700{--tw-text-opacity: 1;color:rgb(68 64 60 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:whitespace-pre-wrap::-moz-placeholder{white-space:pre-wrap}.placeholder\:whitespace-pre-wrap::placeholder{white-space:pre-wrap}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-stone-900:hover{--tw-text-opacity: 1;color:rgb(28 25 23 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:-rotate-90:is(.dark *){--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:rotate-0:is(.dark *){--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-0:is(.dark *){--tw-scale-x: 0;--tw-scale-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:scale-100:is(.dark *){--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:border-stone-200:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 229 228 / var(--tw-border-opacity))}.dark\:border-stone-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 113 108 / var(--tw-border-opacity))}.dark\:border-stone-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(68 64 60 / var(--tw-border-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-stone-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(12 10 9 / var(--tw-bg-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-stone-200:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:text-stone-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(231 229 228 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:ml-2{margin-left:.5rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-24{width:6rem}.sm\:w-32{width:8rem}.sm\:w-36{width:9rem}.sm\:w-40{width:10rem}.sm\:w-48{width:12rem}.sm\:w-56{width:14rem}.sm\:w-60{width:15rem}.sm\:w-64{width:16rem}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-\[600px\]{max-width:600px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:p-2{padding:.5rem}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:hidden{display:none}.md\:w-\[200px\]{width:200px}.md\:w-\[250px\]{width:250px}.md\:w-\[350px\]{width:350px}.md\:w-\[35em\]{width:35em}.md\:w-\[45em\]{width:45em}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[35em\]{max-width:35em}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2.5rem * var(--tw-space-x-reverse));margin-left:calc(2.5rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.md\:p-3{padding:.75rem}}@media (min-width: 1024px){.lg\:h-\[60px\]{height:60px}.lg\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}.lg\:gap-6{gap:1.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 1536px){@media (min-width: 768px){.\32xl\:md\:grid-cols-\[280px_1fr\]{grid-template-columns:280px 1fr}}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px} diff --git a/ui/dist/index.html b/ui/dist/index.html index 5ae1ca1e..5cb390ec 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -5,8 +5,8 @@ Certimate - Your Trusted SSL Automation Partner - - + +
diff --git a/ui/src/components/certimate/StringList.tsx b/ui/src/components/certimate/StringList.tsx index 4462098c..02517b6f 100644 --- a/ui/src/components/certimate/StringList.tsx +++ b/ui/src/components/certimate/StringList.tsx @@ -111,7 +111,7 @@ const StringList = ({ } > -
+
{list.map((item, index) => (
{item}
@@ -122,7 +122,7 @@ const StringList = ({ trigger={ } value={item} @@ -213,12 +213,15 @@ const StringEdit = ({ }} > {trigger} - + - {t(titles[valueType])} + + {t(titles[valueType])} + { setCurrentValue(e.target.value); }} diff --git a/ui/src/domain/version.ts b/ui/src/domain/version.ts index 4d4e9012..7d8777f5 100644 --- a/ui/src/domain/version.ts +++ b/ui/src/domain/version.ts @@ -1 +1 @@ -export const version = "Certimate v0.1.16"; +export const version = "Certimate v0.1.17";