This commit is contained in:
oiov committed 2026-02-11 16:08:37 +08:00
1 parent 0128924a04
commit a1d1f3c18c
36 files changed
+2238 -18827

No files matched your search

@@ -0,0 +1,11 @@
import worker, * as OTHER_EXPORTS from "/Users/songjunxi/Desktop/repos/vmail/worker/src/index.ts";
import * as __MIDDLEWARE_0__ from "/Users/songjunxi/Desktop/repos/vmail/node_modules/.pnpm/wrangler@3.114.15/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts";
import * as __MIDDLEWARE_1__ from "/Users/songjunxi/Desktop/repos/vmail/node_modules/.pnpm/wrangler@3.114.15/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts";
export * from "/Users/songjunxi/Desktop/repos/vmail/worker/src/index.ts";
export const __INTERNAL_WRANGLER_MIDDLEWARE__ = [
__MIDDLEWARE_0__.default,__MIDDLEWARE_1__.default
]
export default worker;
@@ -0,0 +1,134 @@
// This loads all middlewares exposed on the middleware object and then starts
// the invocation chain. The big idea is that we can add these to the middleware
// export dynamically through wrangler, or we can potentially let users directly
// add them as a sort of "plugin" system.
import ENTRY, { __INTERNAL_WRANGLER_MIDDLEWARE__ } from "/Users/songjunxi/Desktop/repos/vmail/.wrangler/tmp/bundle-caThGl/middleware-insertion-facade.js";
import { __facade_invoke__, __facade_register__, Dispatcher } from "/Users/songjunxi/Desktop/repos/vmail/node_modules/.pnpm/wrangler@3.114.15/node_modules/wrangler/templates/middleware/common.ts";
import type { WorkerEntrypointConstructor } from "/Users/songjunxi/Desktop/repos/vmail/.wrangler/tmp/bundle-caThGl/middleware-insertion-facade.js";
// Preserve all the exports from the worker
export * from "/Users/songjunxi/Desktop/repos/vmail/.wrangler/tmp/bundle-caThGl/middleware-insertion-facade.js";
class __Facade_ScheduledController__ implements ScheduledController {
readonly #noRetry: ScheduledController["noRetry"];
constructor(
readonly scheduledTime: number,
readonly cron: string,
noRetry: ScheduledController["noRetry"]
) {
this.#noRetry = noRetry;
}
noRetry() {
if (!(this instanceof __Facade_ScheduledController__)) {
throw new TypeError("Illegal invocation");
}
// Need to call native method immediately in case uncaught error thrown
this.#noRetry();
}
}
function wrapExportedHandler(worker: ExportedHandler): ExportedHandler {
// If we don't have any middleware defined, just return the handler as is
if (
__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
) {
return worker;
}
// Otherwise, register all middleware once
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
__facade_register__(middleware);
}
const fetchDispatcher: ExportedHandlerFetchHandler = function (
request,
env,
ctx
) {
if (worker.fetch === undefined) {
throw new Error("Handler does not export a fetch() function.");
}
return worker.fetch(request, env, ctx);
};
return {
...worker,
fetch(request, env, ctx) {
const dispatcher: Dispatcher = function (type, init) {
if (type === "scheduled" && worker.scheduled !== undefined) {
const controller = new __Facade_ScheduledController__(
Date.now(),
init.cron ?? "",
() => {}
);
return worker.scheduled(controller, env, ctx);
}
};
return __facade_invoke__(request, env, ctx, dispatcher, fetchDispatcher);
},
};
}
function wrapWorkerEntrypoint(
klass: WorkerEntrypointConstructor
): WorkerEntrypointConstructor {
// If we don't have any middleware defined, just return the handler as is
if (
__INTERNAL_WRANGLER_MIDDLEWARE__ === undefined ||
__INTERNAL_WRANGLER_MIDDLEWARE__.length === 0
) {
return klass;
}
// Otherwise, register all middleware once
for (const middleware of __INTERNAL_WRANGLER_MIDDLEWARE__) {
__facade_register__(middleware);
}
// `extend`ing `klass` here so other RPC methods remain callable
return class extends klass {
#fetchDispatcher: ExportedHandlerFetchHandler<Record<string, unknown>> = (
request,
env,
ctx
) => {
this.env = env;
this.ctx = ctx;
if (super.fetch === undefined) {
throw new Error("Entrypoint class does not define a fetch() function.");
}
return super.fetch(request);
};
#dispatcher: Dispatcher = (type, init) => {
if (type === "scheduled" && super.scheduled !== undefined) {
const controller = new __Facade_ScheduledController__(
Date.now(),
init.cron ?? "",
() => {}
);
return super.scheduled(controller);
}
};
fetch(request: Request<unknown, IncomingRequestCfProperties>) {
return __facade_invoke__(
request,
this.env,
this.ctx,
this.#dispatcher,
this.#fetchDispatcher
);
}
};
}
let WRAPPED_ENTRY: ExportedHandler | WorkerEntrypointConstructor | undefined;
if (typeof ENTRY === "object") {
WRAPPED_ENTRY = wrapExportedHandler(ENTRY);
} else if (typeof ENTRY === "function") {
WRAPPED_ENTRY = wrapWorkerEntrypoint(ENTRY);
}
export default WRAPPED_ENTRY;
@@ -0,0 +1,13 @@
function stripCfConnectingIPHeader(input, init) {
const request = new Request(input, init);
request.headers.delete("CF-Connecting-IP");
return request;
}
globalThis.fetch = new Proxy(globalThis.fetch, {
apply(target, thisArg, argArray) {
return Reflect.apply(target, thisArg, [
stripCfConnectingIPHeader.apply(null, argArray),
]);
},
});
+41
View File
@@ -0,0 +1,41 @@
var Rn=Object.defineProperty;var eu=(r,e,t)=>e in r?Rn(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var o=(r,e)=>Rn(r,"name",{value:e,configurable:!0});var tu=(r,e)=>{for(var t in e)Rn(r,t,{get:e[t],enumerable:!0})};var h=(r,e,t)=>(eu(r,typeof e!="symbol"?e+"":e,t),t);function ru(r,e){let t=new Request(r,e);return t.headers.delete("CF-Connecting-IP"),t}o(ru,"stripCfConnectingIPHeader");globalThis.fetch=new Proxy(globalThis.fetch,{apply(r,e,t){return Reflect.apply(r,e,[ru.apply(null,t)])}});function L(r){return new Error(`[unenv] ${r} is not implemented yet!`)}o(L,"createNotImplementedError");function Ve(r){return Object.assign(o(()=>{throw L(r)},"fn"),{__unenv__:!0})}o(Ve,"notImplemented");function qi(r){return class{__unenv__=!0;constructor(){throw new Error(`[unenv] ${r} is not implemented yet!`)}}}o(qi,"notImplementedClass");var On=globalThis.performance?.timeOrigin??Date.now(),Bn=globalThis.performance?.now?globalThis.performance.now.bind(globalThis.performance):()=>Date.now()-On,su={name:"node",entryType:"node",startTime:0,duration:0,nodeStart:0,v8Start:0,bootstrapComplete:0,environment:0,loopStart:0,loopExit:0,idleTime:0,uvMetricsInfo:{loopCount:0,events:0,eventsWaiting:0},detail:void 0,toJSON(){return this}},rt=class{__unenv__=!0;detail;entryType="event";name;startTime;constructor(e,t){this.name=e,this.startTime=t?.startTime||Bn(),this.detail=t?.detail}get duration(){return Bn()-this.startTime}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration,detail:this.detail}}};o(rt,"PerformanceEntry");var qn=o(class extends rt{entryType="mark";constructor(){super(...arguments)}get duration(){return 0}},"PerformanceMark"),ar=class extends rt{entryType="measure"};o(ar,"PerformanceMeasure");var or=class extends rt{entryType="resource";serverTiming=[];connectEnd=0;connectStart=0;decodedBodySize=0;domainLookupEnd=0;domainLookupStart=0;encodedBodySize=0;fetchStart=0;initiatorType="";name="";nextHopProtocol="";redirectEnd=0;redirectStart=0;requestStart=0;responseEnd=0;responseStart=0;secureConnectionStart=0;startTime=0;transferSize=0;workerStart=0;responseStatus=0};o(or,"PerformanceResourceTiming");var Kr=class{__unenv__=!0;getEntries(){return[]}getEntriesByName(e,t){return[]}getEntriesByType(e){return[]}};o(Kr,"PerformanceObserverEntryList");var ur=class{__unenv__=!0;timeOrigin=On;eventCounts=new Map;_entries=[];_resourceTimingBufferSize=0;navigation=void 0;timing=void 0;timerify(e,t){throw L("Performance.timerify")}get nodeTiming(){return su}eventLoopUtilization(){return{}}markResourceTiming(){return new or("")}onresourcetimingbufferfull=null;now(){return this.timeOrigin===On?Bn():Date.now()-this.timeOrigin}clearMarks(e){this._entries=e?this._entries.filter(t=>t.name!==e):this._entries.filter(t=>t.entryType!=="mark")}clearMeasures(e){this._entries=e?this._entries.filter(t=>t.name!==e):this._entries.filter(t=>t.entryType!=="measure")}clearResourceTimings(){this._entries=this._entries.filter(e=>e.entryType!=="resource"||e.entryType!=="navigation")}getEntries(){return this._entries}getEntriesByName(e,t){return this._entries.filter(s=>s.name===e&&(!t||s.entryType===t))}getEntriesByType(e){return this._entries.filter(t=>t.entryType===e)}mark(e,t){let s=new qn(e,t);return this._entries.push(s),s}measure(e,t,s){let n,i;typeof t=="string"?(n=this.getEntriesByName(t,"mark")[0]?.startTime,i=this.getEntriesByName(s,"mark")[0]?.startTime):(n=Number.parseFloat(t?.start)||this.now(),i=Number.parseFloat(t?.end)||this.now());let a=new ar(e,{startTime:n,detail:{start:n,end:i}});return this._entries.push(a),a}setResourceTimingBufferSize(e){this._resourceTimingBufferSize=e}addEventListener(e,t,s){throw L("Performance.addEventListener")}removeEventListener(e,t,s){throw L("Performance.removeEventListener")}dispatchEvent(e){throw L("Performance.dispatchEvent")}toJSON(){return this}};o(ur,"Performance");var ir=class{__unenv__=!0;_callback=null;constructor(e){this._callback=e}takeRecords(){return[]}disconnect(){throw L("PerformanceObserver.disconnect")}observe(e){throw L("PerformanceObserver.observe")}bind(e){return e}runInAsyncScope(e,t,...s){return e.call(t,...s)}asyncId(){return 0}triggerAsyncId(){return 0}emitDestroy(){return this}};o(ir,"PerformanceObserver"),h(ir,"supportedEntryTypes",[]);var Fi=globalThis.performance&&"addEventListener"in globalThis.performance?globalThis.performance:new ur;globalThis.performance=Fi;globalThis.Performance=ur;globalThis.PerformanceEntry=rt;globalThis.PerformanceMark=qn;globalThis.PerformanceMeasure=ar;globalThis.PerformanceObserver=ir;globalThis.PerformanceObserverEntryList=Kr;globalThis.PerformanceResourceTiming=or;import{Writable as ji}from"node:stream";var te=Object.assign(()=>{},{__unenv__:!0});var Q=globalThis.console,Ii=!0,Mi=new ji,$i=new ji,$s=Q?.log??te,nu=Q?.info??$s,Up=Q?.trace??nu,Kp=Q?.debug??$s,Hp=Q?.table??$s,iu=Q?.error??$s,Qp=Q?.warn??iu,Gp=Q?.createTask??Ve("console.createTask");var Wp=Q?.clear??te,Jp=Q?.count??Line truncated
CREATE TABLE IF NOT EXISTS ${f.identifier(n)} (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
`;t.run(i);let u=t.values(f`SELECT id, hash, created_at FROM ${f.identifier(n)} ORDER BY created_at DESC LIMIT 1`)[0]??void 0;t.run(f`BEGIN`);try{for(let l of e)if(!u||Number(u[2])<l.folderMillis){for(let c of l.sql)t.run(f.raw(c));t.run(f`INSERT INTO ${f.identifier(n)} ("hash", "created_at") VALUES(${l.hash}, ${l.folderMillis})`)}t.run(f`COMMIT`)}catch(l){throw t.run(f`ROLLBACK`),l}}};o(xr,"SQLiteSyncDialect"),Rd=p,h(xr,Rd,"SQLiteSyncDialect");var Od,vr=class extends br{async migrate(e,t,s){let n=typeof s=="string"?"__drizzle_migrations":s.migrationsTable??"__drizzle_migrations",i=f`
CREATE TABLE IF NOT EXISTS ${f.identifier(n)} (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
`;await t.run(i);let u=(await t.values(f`SELECT id, hash, created_at FROM ${f.identifier(n)} ORDER BY created_at DESC LIMIT 1`))[0]??void 0;await t.transaction(async l=>{for(let c of e)if(!u||Number(u[2])<c.folderMillis){for(let d of c.sql)await l.run(f.raw(d));await l.run(f`INSERT INTO ${f.identifier(n)} ("hash", "created_at") VALUES(${c.hash}, ${c.folderMillis})`)}})}};o(vr,"SQLiteAsyncDialect"),Od=p,h(vr,Od,"SQLiteAsyncDialect");var Bd,wr=class{getSelectedFields(){return this._.selectedFields}};o(wr,"TypedQueryBuilder"),Bd=p,h(wr,Bd,"TypedQueryBuilder");var $d,fe=class{fields;session;dialect;withList;distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,this.withList=e.withList,this.distinct=e.distinct}from(e){let t=!!this.fields,s;return this.fields?s=this.fields:g(e,ee)?s=Object.fromEntries(Object.keys(e[J].selection).map(n=>[n,e[n]])):g(e,at)?s=e[Y].selectedFields:g(e,D)?s={}:s=ln(e),new Ar({table:e,fields:s,isPartialSelect:t,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct})}};o(fe,"SQLiteSelectBuilder"),$d=p,h(fe,$d,"SQLiteSelectBuilder");var Ld,ms=class extends wr{_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;constructor({table:e,fields:t,isPartialSelect:s,session:n,dialect:i,withList:a,distinct:u}){super(),this.config={withList:a,table:e,fields:{...t},distinct:u,setOperators:[]},this.isPartialSelect=s,this.session=n,this.dialect=i,this._={selectedFields:t},this.tableName=ai(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(t,s)=>{let n=this.tableName,i=ai(t);if(typeof i=="string"&&this.config.joins?.some(a=>a.alias===i))throw new Error(`Alias "${i}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof n=="string"&&(this.config.fields={[n]:this.config.fields}),typeof i=="string"&&!g(t,D))){let a=g(t,ee)?t[J].selection:g(t,le)?t[Y].selectedFields:t[v.Symbol.Columns];this.config.fields[i]=a}if(typeof s=="function"&&(s=s(new Proxy(this.config.fields,new ae({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:s,table:t,joinType:e,alias:i}),typeof i=="string")switch(e){case"left":{this.joinsNotNullableMap[i]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[i]=!0;break}case"inner":{this.joinsNotNullableMap[i]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([a])=>[a,!1])),this.joinsNotNullableMap[i]=!1;break}}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");createSetOperator(e,t){return s=>{let n=typeof s=="function"?s(qd()):s;if(!ii(this.getSelectedFields(),n.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:t,rightSelect:n}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new ae({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new ae({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){let t=e[0](new Proxy(this.config.fields,new ae({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){let t=e[0](new Proxy(this.config.fields,new ae({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),s=Array.isArray(t)?t:[t];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=s:this.config.orderBy=s}else{let t=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=t:this.config.orderBy=t}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){return new Proxy(new ee(this.getSQL(),this.config.fields,e),new ae({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new ae({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this} Line truncated
`)}finalize(){return Dt(new Blob(this.chunks,{type:"application/octet-stream"}))}};o($r,"PassThroughDecoder");var Lr=class{constructor(e){e=e||{},this.decoder=e.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.chunks=[],this.remainder=""}update(e){let t=this.decoder.decode(e);if(/[^a-zA-Z0-9+\/]/.test(t)&&(t=t.replace(/[^a-zA-Z0-9+\/]+/g,"")),this.remainder+=t,this.remainder.length>=this.maxChunkSize){let s=Math.floor(this.remainder.length/4)*4,n;s===this.remainder.length?(n=this.remainder,this.remainder=""):(n=this.remainder.substr(0,s),this.remainder=this.remainder.substr(s)),n.length&&this.chunks.push(Cn(n))}}finalize(){return this.remainder&&!/^=+$/.test(this.remainder)&&this.chunks.push(Cn(this.remainder)),Dt(new Blob(this.chunks,{type:"application/octet-stream"}))}};o(Lr,"Base64Decoder");var Io=/^=[a-f0-9]{2}$/i,Gh=/(?==[a-f0-9]{2})/i,Wh=/=\r?\n/g,Jh=/=[a-fA-F0-9]?$/,Pr=class{constructor(e){e=e||{},this.decoder=e.decoder||new TextDecoder,this.maxChunkSize=100*1024,this.remainder="",this.chunks=[]}decodeQPBytes(e){let t=new ArrayBuffer(e.length),s=new DataView(t);for(let n=0,i=e.length;n<i;n++)s.setUint8(n,parseInt(e[n],16));return t}decodeChunks(e){e=e.replace(Wh,"");let t=e.split(Gh),s=[];for(let n of t){if(n.charAt(0)!=="="){s.length&&(this.chunks.push(this.decodeQPBytes(s)),s=[]),this.chunks.push(n);continue}if(n.length===3){Io.test(n)?s.push(n.substr(1)):(s.length&&(this.chunks.push(this.decodeQPBytes(s)),s=[]),this.chunks.push(n));continue}if(n.length>3){let i=n.substr(0,3);Io.test(i)?(s.push(n.substr(1,2)),this.chunks.push(this.decodeQPBytes(s)),s=[],n=n.substr(3),this.chunks.push(n)):(s.length&&(this.chunks.push(this.decodeQPBytes(s)),s=[]),this.chunks.push(n))}}s.length&&(this.chunks.push(this.decodeQPBytes(s)),s=[])}update(e){let t=this.decoder.decode(e)+`
`;if(t=this.remainder+t,t.length<this.maxChunkSize){this.remainder=t;return}this.remainder="";let s=t.match(Jh);if(s){if(s.index===0){this.remainder=t;return}this.remainder=t.substr(s.index),t=t.substr(0,s.index)}this.decodeChunks(t)}finalize(){return this.remainder.length&&(this.decodeChunks(this.remainder),this.remainder=""),Dt(new Blob(this.chunks,{type:"application/octet-stream"}))}};o(Pr,"QPDecoder");var Zt=class{constructor(e){if(this.options=e||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw new Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0,this.contentType={value:"text/plain",default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(e){/base64/i.test(e)?this.contentDecoder=new Lr:/quoted-printable/i.test(e)?this.contentDecoder=new Pr({decoder:Mr(this.contentType.parsed.params.charset)}):this.contentDecoder=new $r}async finalize(){if(this.state==="finished")return;this.state==="header"&&this.processHeaders();let e=this.postalMime.boundaries;for(let t=e.length-1;t>=0;t--)if(e[t].node===this){e.splice(t,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.state="finished"}async finalizeChildNodes(){for(let e of this.childNodes)await e.finalize()}parseStructuredHeader(e){let t={value:!1,params:{}},s=!1,n="",i="value",a=!1,u=!1,l;for(let c=0,d=e.length;c<d;c++)switch(l=e.charAt(c),i){case"key":if(l==="="){s=n.trim().toLowerCase(),i="value",n="";break}n+=l;break;case"value":if(u)n+=l;else if(l==="\\"){u=!0;continue}else a&&l===a?a=!1:!a&&l==='"'?a=l:!a&&l===";"?(s===!1?t.value=n.trim():t.params[s]=n.trim(),i="key",n=""):n+=l;u=!1;break}return n=n.trim(),i==="value"?s===!1?t.value=n:t.params[s]=n:n&&(t.params[n.toLowerCase()]=""),t.value&&(t.value=t.value.toLowerCase()),jo(t),t}decodeFlowedText(e,t){return e.split(/\r?\n/).reduce((s,n)=>/ $/.test(s)&&!/(^|\n)-- $/.test(s)?t?s.slice(0,-1)+n:s+n:s+`
`+n).replace(/^ /gm,"")}getTextContent(){if(!this.content)return"";let e=Mr(this.contentType.parsed.params.charset).decode(this.content);return/^flowed$/i.test(this.contentType.parsed.params.format)&&(e=this.decodeFlowedText(e,/^yes$/i.test(this.contentType.parsed.params.delsp))),e}processHeaders(){for(let e=this.headerLines.length-1;e>=0;e--){let t=this.headerLines[e];if(e&&/^\s/.test(t))this.headerLines[e-1]+=`
`+t,this.headerLines.splice(e,1);else{t=t.replace(/\s+/g," ");let s=t.indexOf(":"),n=s<0?t.trim():t.substr(0,s).trim(),i=s<0?"":t.substr(s+1).trim();switch(this.headers.push({key:n.toLowerCase(),originalKey:n,value:i}),n.toLowerCase()){case"content-type":this.contentType.default&&(this.contentType={value:i,parsed:{}});break;case"content-transfer-encoding":this.contentTransferEncoding={value:i,parsed:{}};break;case"content-disposition":this.contentDisposition={value:i,parsed:{}};break;case"content-id":this.contentId=i;break;case"content-description":this.contentDescription=i;break}}}this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=/^multipart\//i.test(this.contentType.parsed.value)?this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/")+1):!1,this.contentType.multipart&&this.contentType.parsed.params.boundary&&this.postalMime.boundaries.push({value:At.encode(this.contentType.parsed.params.boundary),node:this}),this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(),this.setupContentDecoder(this.contentTransferEncoding.encoding)}feed(e){switch(this.state){case"header":if(!e.length)return this.state="body",this.processHeaders();if(this.headerSize+=e.length,this.headerSize>this.options.maxHeadersSize)throw new Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);this.headerLines.push(Mr().decode(e));break;case"body":this.contentDecoder.update(e)}}};o(Zt,"MimeNode");var Yh={"&AElig":"\xC6","&AElig;":"\xC6","&AMP":"&","&AMP;":"&","&Aacute":"\xC1","&Aacute;":"\xC1","&Abreve;":"\u0102","&Acirc":"\xC2","&Acirc;":"\xC2","&Acy;":"\u0410","&Afr;":"\u{1D504}","&Agrave":"\xC0","&Agrave;":"\xC0","&Alpha;":"\u0391","&Amacr;":"\u0100","&And;":"\u2A53","&Aogon;":"\u0104","&Aopf;":"\u{1D538}","&ApplyFunction;":"\u2061","&Aring":"\xC5","&Aring;":"\xC5","&Ascr;":"\u{1D49C}","&Assign;":"\u2254","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Backslash;":"\u2216","&Barv;":"\u2AE7","&Barwed;":"\u2306","&Bcy;":"\u0411","&Because;":"\u2235","&Bernoullis;":"\u212C","&Beta;":"\u0392","&Bfr;":"\u{1D505}","&Bopf;":"\u{1D539}","&Breve;":"\u02D8","&Bscr;":"\u212C","&Bumpeq;":"\u224E","&CHcy;":"\u0427","&COPY":"\xA9","&COPY;":"\xA9","&Cacute;":"\u0106","&Cap;":"\u22D2","&CapitalDifferentialD;":"\u2145","&Cayleys;":"\u212D","&Ccaron;":"\u010C","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Ccirc;":"\u0108","&Cconint;":"\u2230","&Cdot;":"\u010A","&Cedilla;":"\xB8","&CenterDot;":"\xB7","&Cfr;":"\u212D","&Chi;":"\u03A7","&CircleDot;":"\u2299","&CircleMinus;":"\u2296","&CirclePlus;":"\u2295","&CircleTimes;":"\u2297","&ClockwiseContourIntegral;":"\u2232","&CloseCurlyDoubleQuote;":"\u201D","&CloseCurlyQuote;":"\u2019","&Colon;":"\u2237","&Colone;":"\u2A74","&Congruent;":"\u2261","&Conint;":"\u222F","&ContourIntegral;":"\u222E","&Copf;":"\u2102","&Coproduct;":"\u2210","&CounterClockwiseContourIntegral;":"\u2233","&Cross;":"\u2A2F","&Cscr;":"\u{1D49E}","&Cup;":"\u22D3","&CupCap;":"\u224D","&DD;":"\u2145","&DDotrahd;":"\u2911","&DJcy;":"\u0402","&DScy;":"\u0405","&DZcy;":"\u040F","&Dagger;":"\u2021","&Darr;":"\u21A1","&Dashv;":"\u2AE4","&Dcaron;":"\u010E","&Dcy;":"\u0414","&Del;":"\u2207","&Delta;":"\u0394","&Dfr;":"\u{1D507}","&DiacriticalAcute;":"\xB4","&DiacriticalDot;":"\u02D9","&DiacriticalDoubleAcute;":"\u02DD","&DiacriticalGrave;":"`","&DiacriticalTilde;":"\u02DC","&Diamond;":"\u22C4","&DifferentialD;":"\u2146","&Dopf;":"\u{1D53B}","&Dot;":"\xA8","&DotDot;":"\u20DC","&DotEqual;":"\u2250","&DoubleContourIntegral;":"\u222F","&DoubleDot;":"\xA8","&DoubleDownArrow;":"\u21D3","&DoubleLeftArrow;":"\u21D0","&DoubleLeftRightArrow;":"\u21D4","&DoubleLeftTee;":"\u2AE4","&DoubleLongLeftArrow;":"\u27F8","&DoubleLongLeftRightArrow;":"\u27FA","&DoubleLongRightArrow;":"\u27F9","&DoubleRightArrow;":"\u21D2","&DoubleRightTee;":"\u22A8","&DoubleUpArrow;":"\u21D1","&DoubleUpDownArrow;":"\u21D5","&DoubleVerticalBar;":"\u2225","&DownArrow;":"\u2193","&DownArrowBar;":"\u2913","&DownArrowUpArrow;":"\u21F5","&DownBreve;":"\u0311","&DownLeftRightVector;":"\u2950","&DownLeftTeeVector;":"\u295E","&DownLeftVector;":"\u21BD","&DownLeftVectorBar;":"\u2956","&DownRightTeeVector;":"\u295F","&DownRightVector;":"\u21C1","&DownRightVectorBar;":"\u2957","&DownTee;":"\u22A4","&DownTeeArrow;":"\u21A7","&Downarrow;":"\u21D3","&Dscr;":"\u{1D49F}","&Dstrok;":"\u0110","&ENG;":"\u014A","&ETH":"\xD0","&ETH;":"\xD0","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecaron;":"\u011A","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Ecy;":"\u042D","&Edot;":"\u0116","&Efr;":"\u{1D508}","&Egrave":"\xC8","&Egrave;":"\xC8","&Element;":"\u2208","&Emacr;":"\u0112","&EmptySmallSquare;":"\u25FB","&EmptyVerySmallSquare;":"\u25AB","&Eogon;":"\u0118","&Eopf;":"\u{1D53C}","&Epsilon;":"\u0395","&Equal;":"\u2A75","&EqualTilde;":"\u2242","&Equilibrium;":"\u21CC","&Escr;":"\u213Line truncated
`,"&Nfr;":"\u{1D511}","&NoBreak;":"\u2060","&NonBreakingSpace;":"\xA0","&Nopf;":"\u2115","&Not;":"\u2AEC","&NotCongruent;":"\u2262","&NotCupCap;":"\u226D","&NotDoubleVerticalBar;":"\u2226","&NotElement;":"\u2209","&NotEqual;":"\u2260","&NotEqualTilde;":"\u2242\u0338","&NotExists;":"\u2204","&NotGreater;":"\u226F","&NotGreaterEqual;":"\u2271","&NotGreaterFullEqual;":"\u2267\u0338","&NotGreaterGreater;":"\u226B\u0338","&NotGreaterLess;":"\u2279","&NotGreaterSlantEqual;":"\u2A7E\u0338","&NotGreaterTilde;":"\u2275","&NotHumpDownHump;":"\u224E\u0338","&NotHumpEqual;":"\u224F\u0338","&NotLeftTriangle;":"\u22EA","&NotLeftTriangleBar;":"\u29CF\u0338","&NotLeftTriangleEqual;":"\u22EC","&NotLess;":"\u226E","&NotLessEqual;":"\u2270","&NotLessGreater;":"\u2278","&NotLessLess;":"\u226A\u0338","&NotLessSlantEqual;":"\u2A7D\u0338","&NotLessTilde;":"\u2274","&NotNestedGreaterGreater;":"\u2AA2\u0338","&NotNestedLessLess;":"\u2AA1\u0338","&NotPrecedes;":"\u2280","&NotPrecedesEqual;":"\u2AAF\u0338","&NotPrecedesSlantEqual;":"\u22E0","&NotReverseElement;":"\u220C","&NotRightTriangle;":"\u22EB","&NotRightTriangleBar;":"\u29D0\u0338","&NotRightTriangleEqual;":"\u22ED","&NotSquareSubset;":"\u228F\u0338","&NotSquareSubsetEqual;":"\u22E2","&NotSquareSuperset;":"\u2290\u0338","&NotSquareSupersetEqual;":"\u22E3","&NotSubset;":"\u2282\u20D2","&NotSubsetEqual;":"\u2288","&NotSucceeds;":"\u2281","&NotSucceedsEqual;":"\u2AB0\u0338","&NotSucceedsSlantEqual;":"\u22E1","&NotSucceedsTilde;":"\u227F\u0338","&NotSuperset;":"\u2283\u20D2","&NotSupersetEqual;":"\u2289","&NotTilde;":"\u2241","&NotTildeEqual;":"\u2244","&NotTildeFullEqual;":"\u2247","&NotTildeTilde;":"\u2249","&NotVerticalBar;":"\u2224","&Nscr;":"\u{1D4A9}","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Nu;":"\u039D","&OElig;":"\u0152","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Ocy;":"\u041E","&Odblac;":"\u0150","&Ofr;":"\u{1D512}","&Ograve":"\xD2","&Ograve;":"\xD2","&Omacr;":"\u014C","&Omega;":"\u03A9","&Omicron;":"\u039F","&Oopf;":"\u{1D546}","&OpenCurlyDoubleQuote;":"\u201C","&OpenCurlyQuote;":"\u2018","&Or;":"\u2A54","&Oscr;":"\u{1D4AA}","&Oslash":"\xD8","&Oslash;":"\xD8","&Otilde":"\xD5","&Otilde;":"\xD5","&Otimes;":"\u2A37","&Ouml":"\xD6","&Ouml;":"\xD6","&OverBar;":"\u203E","&OverBrace;":"\u23DE","&OverBracket;":"\u23B4","&OverParenthesis;":"\u23DC","&PartialD;":"\u2202","&Pcy;":"\u041F","&Pfr;":"\u{1D513}","&Phi;":"\u03A6","&Pi;":"\u03A0","&PlusMinus;":"\xB1","&Poincareplane;":"\u210C","&Popf;":"\u2119","&Pr;":"\u2ABB","&Precedes;":"\u227A","&PrecedesEqual;":"\u2AAF","&PrecedesSlantEqual;":"\u227C","&PrecedesTilde;":"\u227E","&Prime;":"\u2033","&Product;":"\u220F","&Proportion;":"\u2237","&Proportional;":"\u221D","&Pscr;":"\u{1D4AB}","&Psi;":"\u03A8","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"\u{1D514}","&Qopf;":"\u211A","&Qscr;":"\u{1D4AC}","&RBarr;":"\u2910","&REG":"\xAE","&REG;":"\xAE","&Racute;":"\u0154","&Rang;":"\u27EB","&Rarr;":"\u21A0","&Rarrtl;":"\u2916","&Rcaron;":"\u0158","&Rcedil;":"\u0156","&Rcy;":"\u0420","&Re;":"\u211C","&ReverseElement;":"\u220B","&ReverseEquilibrium;":"\u21CB","&ReverseUpEquilibrium;":"\u296F","&Rfr;":"\u211C","&Rho;":"\u03A1","&RightAngleBracket;":"\u27E9","&RightArrow;":"\u2192","&RightArrowBar;":"\u21E5","&RightArrowLeftArrow;":"\u21C4","&RightCeiling;":"\u2309","&RightDoubleBracket;":"\u27E7","&RightDownTeeVector;":"\u295D","&RightDownVector;":"\u21C2","&RightDownVectorBar;":"\u2955","&RightFloor;":"\u230B","&RightTee;":"\u22A2","&RightTeeArrow;":"\u21A6","&RightTeeVector;":"\u295B","&RightTriangle;":"\u22B3","&RightTriangleBar;":"\u29D0","&RightTriangleEqual;":"\u22B5","&RightUpDownVector;":"\u294F","&RightUpTeeVector;":"\u295C","&RightUpVector;":"\u21BE","&RightUpVectorBar;":"\u2954","&RightVector;":"\u21C0","&RightVectorBar;":"\u2953","&Rightarrow;":"\u21D2","&Ropf;":"\u211D","&RoundImplies;":"\u2970","&Rrightarrow;":"\u21DB","&Rscr;":"\u211B","&Rsh;":"\u21B1","&RuleDelayed;":"\u29F4","&SHCHcy;":"\u0429","&SHcy;":"\u0428","&SOFTcy;":"\u042C","&Sacute;":"\u015A","&Sc;":"\u2ABC","&Scaron;":"\u0160","&Scedil;":"\u015E","&Scirc;":"\u015C","&Scy;":"\u0421","&Sfr;":"\u{1D516}","&ShortDownArrow;":"\u2193","&ShortLeftArrow;":"\u2190","&ShortRightArrow;":"\u2192","&ShortUpArrow;":"\u2191","&Sigma;":"\u03A3","&SmallCircle;":"\u2218","&Sopf;":"\u{1D54A}","&Sqrt;":"\u221A","&Square;":"\u25A1","&SquareIntersection;":"\u2293","&SquareSubset;":"\u228F","&SquareSubsetEqual;":"\u2291","&SquareSuperset;":"\u2290","&SquareSupersetEqual;":"\u2292","&SquareUnion;":"\u2294","&Sscr;":"\u{1D4AE}","&Star;":"\u22C6","&Sub;":"\u22D0","&Subset;":"\u22D0","&SubsetEqual;":"\u2286","&Succeeds;":"\u227B","&SucceedsEqual;":"\u2AB0","&SucceedsSlantEqual;":"\u227D","&SucceedsTilde;":"\u227F","&SuchThat;":"\u220B","&Sum;":"\u2211","&Sup;":"\u22D1","&Superset;":"\u2283","&SupersetEqual;":"\u2287","&Supset;":"\u22D1","&THORN":"\xDE","&THORN;":"\xDE","&TRADE;":"\u2122","&TSHcy;":"\u040B","&TScy;":"\u0426","&Tab;":" ","&Tau;":"\u03A4","&Tcaron;":"\u0164","&Tcedil Line truncated
`).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi,`
`).replace(/<script\b[^>]*>.*?<\/script\b[^>]*>/gi," ").replace(/^.*<body\b[^>]*>/i,"").replace(/^.*<\/head\b[^>]*>/i,"").replace(/^.*<\!doctype\b[^>]*>/i,"").replace(/<\/body\b[^>]*>.*$/i,"").replace(/<\/html\b[^>]*>.*$/i,"").replace(/<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi," ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi,"").replace(/<li\b[^>]*>[\n\u0001\s]*/gi,"* ").replace(/<hr\b[^>]*>/g,`
-------------
`).replace(/<[^>]*>/g," ").replace(/\u0001/g,`
`).replace(/[ \t]+/g," ").replace(/^\s+$/gm,"").replace(/\n\n+/g,`
`).replace(/^\n+/,`
`).replace(/\n+$/,`
`),r=Xh(r),r}o($o,"htmlToText");function Lo(r){return[].concat(r.name||[]).concat(r.name?`<${r.address}>`:r.address).join(" ")}o(Lo,"formatTextAddress");function Di(r){let e=[],t=o((s,n)=>{if(n&&e.push(", "),s.group){let i=`${s.name}:`,a=";";e.push(i),s.group.forEach(t),e.push(a)}else e.push(Lo(s))},"processAddress");return r.forEach(t),e.join("")}o(Di,"formatTextAddresses");function Po(r){return`<a href="mailto:${er(r.address)}" class="postal-email-address">${er(r.name||`<${r.address}>`)}</a>`}o(Po,"formatHtmlAddress");function _i(r){let e=[],t=o((s,n)=>{if(n&&e.push('<span class="postal-email-address-separator">, </span>'),s.group){let i=`<span class="postal-email-address-group">${er(s.name)}:</span>`,a='<span class="postal-email-address-group">;</span>';e.push(i),s.group.forEach(t),e.push(a)}else e.push(Po(s))},"processAddress");return r.forEach(t),e.join(" ")}o(_i,"formatHtmlAddresses");function Zh(r,e,t){r=(r||"").toString(),e=e||76;let s=0,n=r.length,i="",a,u;for(;s<n;){if(a=r.substr(s,e),a.length<e){i+=a;break}if(u=a.match(/^[^\n\r]*(\r?\n|\r)/)){a=u[0],i+=a,s+=a.length;continue}else(u=a.match(/(\s+)[^\s]*$/))&&u[0].length-(t?(u[1]||"").length:0)<a.length?a=a.substr(0,a.length-(u[0].length-(t?(u[1]||"").length:0))):(u=r.substr(s+a.length).match(/^[^\s]+(\s*)/))&&(a=a+u[0].substr(0,u[0].length-(t?0:(u[1]||"").length)));i+=a,s+=a.length,s<n&&(i+=`\r
`)}return i}o(Zh,"foldLines");function Ei(r){let e=[];if(r.from&&e.push({key:"From",val:Lo(r.from)}),r.subject&&e.push({key:"Subject",val:r.subject}),r.date){let a={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},u=typeof Intl>"u"?r.date:new Intl.DateTimeFormat("default",a).format(new Date(r.date));e.push({key:"Date",val:u})}r.to&&r.to.length&&e.push({key:"To",val:Di(r.to)}),r.cc&&r.cc.length&&e.push({key:"Cc",val:Di(r.cc)}),r.bcc&&r.bcc.length&&e.push({key:"Bcc",val:Di(r.bcc)});let t=e.map(a=>a.key.length).reduce((a,u)=>u>a?u:a,0);e=e.flatMap(a=>{let u=t-a.key.length,l=`${a.key}: ${" ".repeat(u)}`,c=`${" ".repeat(a.key.length+1)} ${" ".repeat(u)}`;return Zh(a.val,80,!0).split(/\r?\n/).map(m=>m.trim()).map((m,x)=>`${x?c:l}${m}`)});let s=e.map(a=>a.length).reduce((a,u)=>u>a?u:a,0),n="-".repeat(s);return`
${n}
${e.join(`
`)}
${n}
`}o(Ei,"formatTextHeader");function Ci(r){let e=[];if(r.from&&e.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${Po(r.from)}</div>`),r.subject&&e.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${er(r.subject)}</div>`),r.date){let s={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},n=typeof Intl>"u"?r.date:new Intl.DateTimeFormat("default",s).format(new Date(r.date));e.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${er(r.date)}">${er(n)}</div>`)}return r.to&&r.to.length&&e.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${_i(r.to)}</div>`),r.cc&&r.cc.length&&e.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${_i(r.cc)}</div>`),r.bcc&&r.bcc.length&&e.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${_i(r.bcc)}</div>`),`<div class="postal-email-header">${e.length?'<div class="postal-email-header-row">':""}${e.join(`</div>
<div class="postal-email-header-row">`)}${e.length?"</div>":""}</div>`}o(Ci,"formatHtmlHeader");function ep(r){let e=!1,t="text",s,n=[],i={address:[],comment:[],group:[],text:[],textWasQuoted:[]},a,u,l=!1;for(a=0,u=r.length;a<u;a++){let c=r[a],d=a?r[a-1]:null;if(c.type==="operator")switch(c.value){case"<":t="address",l=!1;break;case"(":t="comment",l=!1;break;case":":t="group",e=!0,l=!1;break;case'"':l=!l,t="text";break;default:t="text",l=!1;break}else c.value&&(t==="address"&&(c.value=c.value.replace(/^[^<]*<\s*/,"")),d&&d.noBreak&&i[t].length?(i[t][i[t].length-1]+=c.value,t==="text"&&l&&(i.textWasQuoted[i.textWasQuoted.length-1]=!0)):(i[t].push(c.value),t==="text"&&i.textWasQuoted.push(l)))}if(!i.text.length&&i.comment.length&&(i.text=i.comment,i.comment=[]),e){i.text=i.text.join(" ");let c=[];i.group.length&&Ti(i.group.join(",")).forEach(m=>{m.group?c=c.concat(m.group):c.push(m)}),n.push({name:Xt(i.text||s&&s.name),group:c})}else{if(!i.address.length&&i.text.length){for(a=i.text.length-1;a>=0;a--)if(!i.textWasQuoted[a]&&i.text[a].match(/^[^@\s]+@[^@\s]+$/)){i.address=i.text.splice(a,1),i.textWasQuoted.splice(a,1);break}let c=o(function(d){return i.address.length?d:(i.address=[d.trim()]," ")},"_regexHandler");if(!i.address.length)for(a=i.text.length-1;a>=0&&!(!i.textWasQuoted[a]&&(i.text[a]=i.text[a].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,c).trim(),i.address.length));a--);}if(!i.text.length&&i.comment.length&&(i.text=i.comment,i.comment=[]),i.address.length>1&&(i.text=i.text.concat(i.address.splice(1))),i.text=i.text.join(" "),i.address=i.address.join(" "),!i.address&&/^=\?[^=]+?=$/.test(i.text.trim())){let c=Ti(Xt(i.text));if(c&&c.length)return c}if(!i.address&&e)return[];s={address:i.address||i.text||"",name:Xt(i.text||i.address||"")},s.address===s.name&&((s.address||"").match(/@/)?s.name="":s.address=""),n.push(s)}return n}o(ep,"_handleAddress");var Tn=class{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let t=0,s=this.str.length;t<s;t++){let n=this.str.charAt(t),i=t<s-1?this.str.charAt(t+1):null;this.checkChar(n,i)}return this.list.forEach(t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)}),e}checkChar(e,t){if(!this.escaped){if(e===this.operatorExpecting){this.node={type:"operator",value:e},t&&![" "," ","\r",`
`,",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&e in this.operators){this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],this.escaped=!1;return}else if(['"',"'"].includes(this.operatorExpecting)&&e==="\\"){this.escaped=!0;return}}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),e===`
`&&(e=" "),(e.charCodeAt(0)>=33||[" "," "].includes(e))&&(this.node.value+=e),this.escaped=!1}};o(Tn,"Tokenizer");function Ti(r,e){e=e||{};let s=new Tn(r).tokenize(),n=[],i=[],a=[];if(s.forEach(u=>{u.type==="operator"&&(u.value===","||u.value===";")?(i.length&&n.push(i),i=[]):i.push(u)}),i.length&&n.push(i),n.forEach(u=>{u=ep(u),u.length&&(a=a.concat(u))}),e.flatten){let u=[],l=o(c=>{c.forEach(d=>{if(d.group)return l(d.group);u.push(d)})},"walkAddressList");return l(a),u}return a}o(Ti,"addressParser");var Sn=Ti;function zo(r){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(r),n=s.byteLength,i=n%3,a=n-i,u,l,c,d,m,x=0;x<a;x=x+3)m=s[x]<<16|s[x+1]<<8|s[x+2],u=(m&16515072)>>18,l=(m&258048)>>12,c=(m&4032)>>6,d=m&63,e+=t[u]+t[l]+t[c]+t[d];return i==1?(m=s[a],u=(m&252)>>2,l=(m&3)<<4,e+=t[u]+t[l]+"=="):i==2&&(m=s[a]<<8|s[a+1],u=(m&64512)>>10,l=(m&1008)>>4,c=(m&15)<<2,e+=t[u]+t[l]+t[c]+"="),e}o(zo,"base64ArrayBuffer");var tp=256,rp=2*1024*1024,tt=class{static parse(e,t){return new tt(t).parse(e)}constructor(e){this.options=e||{},this.mimeOptions={maxNestingDepth:this.options.maxNestingDepth||tp,maxHeadersSize:this.options.maxHeadersSize||rp},this.root=this.currentNode=new Zt({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.attachments=[],this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(e,t){let s=this.boundaries;if(s.length&&e.length>2&&e[0]===45&&e[1]===45)for(let n=s.length-1;n>=0;n--){let i=s[n];if(e.length!==i.value.length+2&&e.length!==i.value.length+4)continue;let a=e.length===i.value.length+4;if(a&&(e[e.length-2]!==45||e[e.length-1]!==45))continue;let u=!0;for(let l=0;l<i.value.length;l++)if(e[l+2]!==i.value[l]){u=!1;break}if(u)return a?(await i.node.finalize(),this.currentNode=i.node.parentNode||this.root):(await i.node.finalizeChildNodes(),this.currentNode=new Zt({postalMime:this,parentNode:i.node,...this.mimeOptions})),t?this.finalize():void 0}if(this.currentNode.feed(e),t)return this.finalize()}readLine(){let e=this.readPos,t=this.readPos,s=o(()=>({bytes:new Uint8Array(this.buf,e,t-e),done:this.readPos>=this.av.length}),"res");for(;this.readPos<this.av.length;){let n=this.av[this.readPos++];if(n!==13&&n!==10&&(t=this.readPos),n===10)return s()}return s()}async processNodeTree(){let e={},t=new Set,s=this.textMap=new Map,n=this.forceRfc822Attachments(),i=o(async(a,u,l)=>{if(u=u||!1,l=l||!1,a.contentType.multipart)a.contentType.multipart==="alternative"?u=a:a.contentType.multipart==="related"&&(l=a);else if(this.isInlineMessageRfc822(a)&&!n){let c=new tt;a.subMessage=await c.parse(a.content),s.has(a)||s.set(a,{});let d=s.get(a);(a.subMessage.text||!a.subMessage.html)&&(d.plain=d.plain||[],d.plain.push({type:"subMessage",value:a.subMessage}),t.add("plain")),a.subMessage.html&&(d.html=d.html||[],d.html.push({type:"subMessage",value:a.subMessage}),t.add("html")),c.textMap&&c.textMap.forEach((m,x)=>{s.set(x,m)});for(let m of a.subMessage.attachments||[])this.attachments.push(m)}else if(this.isInlineTextNode(a)){let c=a.contentType.parsed.value.substr(a.contentType.parsed.value.indexOf("/")+1),d=u||a;s.has(d)||s.set(d,{});let m=s.get(d);m[c]=m[c]||[],m[c].push({type:"text",value:a.getTextContent()}),t.add(c)}else if(a.content){let c=a.contentDisposition.parsed.params.filename||a.contentType.parsed.params.name||null,d={filename:c?Xt(c):null,mimeType:a.contentType.parsed.value,disposition:a.contentDisposition.parsed.value||null};switch(l&&a.contentId&&(d.related=!0),a.contentDescription&&(d.description=a.contentDescription),a.contentId&&(d.contentId=a.contentId),a.contentType.parsed.value){case"text/calendar":case"application/ics":{a.contentType.parsed.params.method&&(d.method=a.contentType.parsed.params.method.toString().toUpperCase().trim());let m=a.getTextContent().replace(/\r?\n/g,`
`).replace(/\n*$/,`
`);d.content=At.encode(m);break}default:d.content=a.content}this.attachments.push(d)}for(let c of a.childNodes)await i(c,u,l)},"walk");await i(this.root,!1,[]),s.forEach(a=>{t.forEach(u=>{if(e[u]||(e[u]=[]),a[u])a[u].forEach(l=>{switch(l.type){case"text":e[u].push(l.value);break;case"subMessage":switch(u){case"html":e[u].push(Ci(l.value));break;case"plain":e[u].push(Ei(l.value));break}break}});else{let l;switch(u){case"html":l="plain";break;case"plain":l="html";break}(a[l]||[]).forEach(c=>{switch(c.type){case"text":switch(u){case"html":e[u].push(Mo(c.value));break;case"plain":e[u].push($o(c.value));break}break;case"subMessage":switch(u){case"html":e[u].push(Ci(c.value));break;case"plain":e[u].push(Ei(c.value));break}break}})}})}),Object.keys(e).forEach(a=>{e[a]=e[a].join(`
`)}),this.textContent=e}isInlineTextNode(e){if(e.contentDisposition.parsed.value==="attachment")return!1;switch(e.contentType.parsed.value){case"text/html":case"text/plain":return!0;case"text/calendar":case"text/csv":default:return!1}}isInlineMessageRfc822(e){return e.contentType.parsed.value!=="message/rfc822"?!1:(e.contentDisposition.parsed.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let e=!1,t=o(s=>{s.contentType.multipart||["message/delivery-status","message/feedback-report"].includes(s.contentType.parsed.value)&&(e=!0);for(let n of s.childNodes)t(n)},"walk");return t(this.root),e}async resolveStream(e){let t=0,s=[],n=e.getReader();for(;;){let{done:u,value:l}=await n.read();if(u)break;s.push(l),t+=l.length}let i=new Uint8Array(t),a=0;for(let u of s)i.set(u,a),a+=u.length;return i}async parse(e){if(this.started)throw new Error("Can not reuse parser, create a new PostalMime object");for(this.started=!0,e&&typeof e.getReader=="function"&&(e=await this.resolveStream(e)),e=e||new ArrayBuffer(0),typeof e=="string"&&(e=At.encode(e)),(e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]")&&(e=await Dt(e)),e.buffer instanceof ArrayBuffer&&(e=new Uint8Array(e).buffer),this.buf=e,this.av=new Uint8Array(e),this.readPos=0;this.readPos<this.av.length;){let n=this.readLine();await this.processLine(n.bytes,n.done)}await this.processNodeTree();let t={headers:this.root.headers.map(n=>({key:n.key,value:n.value})).reverse()};for(let n of["from","sender"]){let i=this.root.headers.find(a=>a.key===n);if(i&&i.value){let a=Sn(i.value);a&&a.length&&(t[n]=a[0])}}for(let n of["delivered-to","return-path"]){let i=this.root.headers.find(a=>a.key===n);if(i&&i.value){let a=Sn(i.value);if(a&&a.length&&a[0].address){let u=n.replace(/\-(.)/g,(l,c)=>c.toUpperCase());t[u]=a[0].address}}}for(let n of["to","cc","bcc","reply-to"]){let i=this.root.headers.filter(u=>u.key===n),a=[];if(i.filter(u=>u&&u.value).map(u=>Sn(u.value)).forEach(u=>a=a.concat(u||[])),a&&a.length){let u=n.replace(/\-(.)/g,(l,c)=>c.toUpperCase());t[u]=a}}for(let n of["subject","message-id","in-reply-to","references"]){let i=this.root.headers.find(a=>a.key===n);if(i&&i.value){let a=n.replace(/\-(.)/g,(u,l)=>l.toUpperCase());t[a]=Xt(i.value)}}let s=this.root.headers.find(n=>n.key==="date");if(s){let n=new Date(s.value);!n||n.toString()==="Invalid Date"?n=s.value:n=n.toISOString(),t.date=n}switch(this.textContent?.html&&(t.html=this.textContent.html),this.textContent?.plain&&(t.text=this.textContent.plain),t.attachments=this.attachments,this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let i of t.attachments||[])i?.content&&(i.content=zo(i.content),i.encoding="base64");break;case"utf8":let n=new TextDecoder("utf8");for(let i of t.attachments||[])i?.content&&(i.content=n.decode(i.content),i.encoding="utf8");break;default:throw new Error("Unknwon attachment encoding")}return t}};o(tt,"PostalMime");function Vo(r,e){let t=atob(r),s="";for(let n=0;n<t.length;n++)s+=String.fromCharCode(t.charCodeAt(n)^e.charCodeAt(n%e.length));return s}o(Vo,"decrypt");var Uo=o(async(r,e)=>{let t=r.req.header("X-API-Key");if(!t){let i=r.req.header("Authorization");i?.startsWith("Bearer ")&&(t=i.substring(7))}if(!t)return r.json({error:{code:"UNAUTHORIZED",message:"Missing API Key. Provide it via X-API-Key header or Authorization: Bearer <key>"}},401);let s=ce(r.env.DB),n=await Eo(s,t);if(!n)return r.json({error:{code:"UNAUTHORIZED",message:"Invalid API Key"}},401);if(!n.isActive)return r.json({error:{code:"FORBIDDEN",message:"API Key is disabled"}},403);if(n.expiresAt&&n.expiresAt<new Date)return r.json({error:{code:"FORBIDDEN",message:"API Key has expired"}},403);r.executionCtx.waitUntil(Co(s,n.id)),r.set("apiKey",{id:n.id,rateLimit:n.rateLimit||100}),await e()},"apiKeyAuth");function sp(){let r=["quick","lazy","happy","sad","bright","dark","warm","cold","soft","hard"],e=["fox","dog","cat","bird","fish","lion","bear","wolf","deer","hawk"],t=r[Math.floor(Math.random()*r.length)],s=e[Math.floor(Math.random()*e.length)],n=Math.floor(Math.random()*1e3);return`${t}-${s}-${n}`}o(sp,"generateRandomLocalPart");var zr=new St;zr.post("/",async r=>{let e=ce(r.env.DB),t=r.get("apiKey"),s={};try{s=await r.req.json()}catch{}let n=r.env.EMAIL_DOMAIN?r.env.EMAIL_DOMAIN.split(",").map(x=>x.trim()):[];if(n.length===0)return r.json({error:{code:"CONFIGURATION_ERROR",message:"No email domains configured"}},500);let i=s.domain||n[0];if(!n.includes(i))return r.json({error:{code:"VALIDATION_ERROR",message:`Invalid domain. Available domains: ${n.join(", ")}`,details:{field:"domain",allowed:n}}},400);let u=`${s.localPart||sp()}@${i}`,l=s.expiresIn||24*60*60,c=new Date(Date.now()+l*1e3),d=new Date,m={id:Os(),address:u,domain:i,expiresAt:c,apiKeyId:t.id,createdAt:d,updatedAt:d};try{return await So(e,m),r.json({data:{id:m.id,address:m.address,domain:m.domain,expiresAt:m.expiresAt.toISOString Line truncated
//# sourceMappingURL=index.js.map
+8
View File
@@ -0,0 +1,8 @@
{
"version": 3,
"sources": ["../bundle-caThGl/strip-cf-connecting-ip-header.js", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/_internal/utils.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs", "../../../node_modules/.pnpm/@cloudflare+unenv-preset@2.0.2_unenv@2.0.0-rc.14_workerd@1.20250718.0/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/console.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/mock/noop.mjs", "../../../node_modules/.pnpm/@cloudflare+unenv-preset@2.0.2_unenv@2.0.0-rc.14_workerd@1.20250718.0/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs", "../../../node_modules/.pnpm/wrangler@3.114.15/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-console", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/internal/process/hrtime.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/internal/process/process.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/internal/tty/read-stream.mjs", "../../../node_modules/.pnpm/unenv@2.0.0-rc.14/node_modules/unenv/dist/runtime/node/internal/tty/write-stream.mjs", "../../../node_modules/.pnpm/@cloudflare+unenv-preset@2.0.2_unenv@2.0.0-rc.14_workerd@1.20250718.0/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs", "../../../node_modules/.pnpm/wrangler@3.114.15/node_modules/wrangler/_virtual_unenv_global_polyfill-@cloudflare-unenv-preset-node-process", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/compose.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/request/constants.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/body.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/url.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/request.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/html.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/context.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/constants.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/hono-base.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/reg-exp-router/matcher.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/reg-exp-router/node.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/reg-exp-router/trie.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/reg-exp-router/router.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/smart-router/router.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/trie-router/node.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/router/trie-router/router.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/hono.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/compress.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/utils/mime.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/middleware/serve-static/path.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/middleware/serve-static/index.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/adapter/cloudflare-workers/utils.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/adapter/cloudflare-workers/serve-static.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/adapter/cloudflare-workers/serve-static-module.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/helper/websocket/index.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/adapter/cloudflare-workers/websocket.js", "../../../node_modules/.pnpm/hono@4.9.12/node_modules/hono/dist/middleware/cors/index.js", "../../../node_modules/.pnpm/drizzle-orm@0.29.5_@libsql+client@0.4.0-pre.7_@types+react@18.3.26_react@18.2.0/node_modules/src/entity.ts", "../../../node_modules/.pnpm/drizzle-orm@0.29.5_@libsql+client@0.4.0-pre.7_@types+react@18.3.26_react@18.2.0/node_modules/src/column.ts", "../../../node_modules/.pnpm/drizzle-orm@0.29.5_@libsql+client@0.4.0-pre.7_@types+react@18.3.26_react@18.2.0/node_modules/src/subquery.ts", "../../../node_modules/.pnpm/drizzle-orm@0.29.5_@libsql+client@0.4.0-pre.7_@types+react@18.3.26_react@18.2.0/node_modules/src/tracing-utils.ts", "../../../node_modules/.pnpm/drizzle-orm@0.29.5_@libsql+client@0.4.0-pre.7_@types+react@18.3.26_react@18.2.0/node_modules/drizzle-orm/version.js", "../../../node_modules/.pnpm/driLine truncated
"sourceRoot": "/Users/songjunxi/Desktop/repos/vmail/.wrangler/tmp/dev-qzpL9Z",
"sourcesContent": ["function stripCfConnectingIPHeader(input, init) {\n\tconst request = new Request(input, init);\n\trequest.headers.delete(\"CF-Connecting-IP\");\n\treturn request;\n}\n\nglobalThis.fetch = new Proxy(globalThis.fetch, {\n\tapply(target, thisArg, argArray) {\n\t\treturn Reflect.apply(target, thisArg, [\n\t\t\tstripCfConnectingIPHeader.apply(null, argArray),\n\t\t]);\n\t},\n});\n", "/*@__NO_SIDE_EFFECTS__*/ export function rawHeaders(headers) {\n\tconst rawHeaders = [];\n\tfor (const key in headers) {\n\t\tif (Array.isArray(headers[key])) {\n\t\t\tfor (const h of headers[key]) {\n\t\t\t\trawHeaders.push(key, h);\n\t\t\t}\n\t\t} else {\n\t\t\trawHeaders.push(key, headers[key]);\n\t\t}\n\t}\n\treturn rawHeaders;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function mergeFns(...functions) {\n\treturn function(...args) {\n\t\tfor (const fn of functions) {\n\t\t\tfn(...args);\n\t\t}\n\t};\n}\n/*@__NO_SIDE_EFFECTS__*/ export function createNotImplementedError(name) {\n\treturn new Error(`[unenv] ${name} is not implemented yet!`);\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplemented(name) {\n\tconst fn = () => {\n\t\tthrow createNotImplementedError(name);\n\t};\n\treturn Object.assign(fn, { __unenv__: true });\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedAsync(name) {\n\tconst fn = notImplemented(name);\n\tfn.__promisify__ = () => notImplemented(name + \".__promisify__\");\n\tfn.native = fn;\n\treturn fn;\n}\n/*@__NO_SIDE_EFFECTS__*/ export function notImplementedClass(name) {\n\treturn class {\n\t\t__unenv__ = true;\n\t\tconstructor() {\n\t\t\tthrow new Error(`[unenv] ${name} is not implemented yet!`);\n\t\t}\n\t};\n}\n", "import { createNotImplementedError } from \"../../../_internal/utils.mjs\";\nconst _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();\nconst _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;\nconst nodeTiming = {\n\tname: \"node\",\n\tentryType: \"node\",\n\tstartTime: 0,\n\tduration: 0,\n\tnodeStart: 0,\n\tv8Start: 0,\n\tbootstrapComplete: 0,\n\tenvironment: 0,\n\tloopStart: 0,\n\tloopExit: 0,\n\tidleTime: 0,\n\tuvMetricsInfo: {\n\t\tloopCount: 0,\n\t\tevents: 0,\n\t\teventsWaiting: 0\n\t},\n\tdetail: undefined,\n\ttoJSON() {\n\t\treturn this;\n\t}\n};\nexport class PerformanceEntry {\n\t__unenv__ = true;\n\tdetail;\n\tentryType = \"event\";\n\tname;\n\tstartTime;\n\tconstructor(name, options) {\n\t\tthis.name = name;\n\t\tthis.startTime = options?.startTime || _performanceNow();\n\t\tthis.detail = options?.detail;\n\t}\n\tget duration() {\n\t\treturn _performanceNow() - this.startTime;\n\t}\n\ttoJSON() {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tentryType: this.entryType,\n\t\t\tstartTime: this.startTime,\n\t\t\tduration: this.duration,\n\t\t\tdetail: this.detail\n\t\t};\n\t}\n}\nexport const PerformanceMark = class PerformanceMark extends PerformanceEntry {\n\tentryType = \"mark\";\n\tconstructor() {\n\t\tsuper(...arguments);\n\t}\n\tget duration() {\n\t\treturn 0;\n\t}\n};\nexport class PerformanceMeasure extends PerformanceEntry {\n\tentryType = \"measure\";\n}\nexport class PerformanceResourceTiming extends PerformanceEntry {\n\tentryType = \"resource\";\n\tserverTiming = [];\n\tconnectEnd = 0;\n\tconnectStart = 0;\n\tdecodedBodySize = 0;\n\tdomainLookupEnd = 0;\n\tdomainLookupStart = 0;\n\tencodedBodySize = 0;\n\tfetchStart = 0;\n\tinitiatorType = \"\";\n\tname = \"\";\n\tnextHopProtocol = \"\";\n\tredirectEnd = 0;\n\tredirectStart = 0;\n\trequestStart = 0;\n\tresponseEnd = 0;\n\tresponseStart = 0;\n\tsecureConnectionStart = 0;\n\tstartTime = 0;\n\ttransferSize = 0;\n\tworkerStart = 0;\n\tresponseStatus = 0;\n}\nexport class PerformanceObserverEntryList {\n\t__unenv__ = true;\n\tgetEntries() {\n\t\treturn [];\n\t}\n\tgetEntriesByName(_name, _type) {\n\t\treturn [];\n\t}\n\tgetEntriesByType(type) {\n\t\treturn [];\n\t}\n}\nexport class Performance {\n\t__unenv__ = true;\n\ttimeOrigin = _timeOrigin;\n\teventCounts = new Map();\n\t_entries = [];\n\t_resourceTimingBufferSize = 0;\n\tnavigation = undefined;\n\ttiming = undefined;\n\ttimerify(_fn, _options) {\n\t\tthrow createNotImplementedError(\"Performance.timerify\");\n\t}\n\tget nodeTiming() {\n\t\treturn nodeTiming;\n\t}\n\teventLoopUtilization() {\n\t\treturn {};\n\t}\n\tmarkResourceTiming() {\n\t\treturn new PerformanceResourceTiming(\"\");\n\t}\n\tonresourcetimingbufferfull = null;\n\tnow() {\n\t\tif (this.timeOrigin === _timeOrigin) {\n\t\t\treturn _performanceNow();\n\t\t}\n\t\treturn Date.now() - this.timeOrigin;\n\t}\n\tclearMarks(markName) {\n\t\tthis._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== \"mark\");\n\t}\n\tclearMeasures(measureName) {\n\t\tthis._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== \"measure\");\n\t}\n\tclearResourceTimings() {\n\t\tthLine truncated
"mappings": "gSAAA,SAASA,GAA0BC,EAAOC,EAAM,CAC/C,IAAMC,EAAU,IAAI,QAAQF,EAAOC,CAAI,EACvC,OAAAC,EAAQ,QAAQ,OAAO,kBAAkB,EAClCA,CACR,CAJSC,EAAAJ,GAAA,6BAMT,WAAW,MAAQ,IAAI,MAAM,WAAW,MAAO,CAC9C,MAAMK,EAAQC,EAASC,EAAU,CAChC,OAAO,QAAQ,MAAMF,EAAQC,EAAS,CACrCN,GAA0B,MAAM,KAAMO,CAAQ,CAC/C,CAAC,CACF,CACD,CAAC,ECQ+B,SAASC,EAA0BC,EAAM,CACxE,OAAO,IAAI,MAAM,WAAWA,2BAA8B,CAC3D,CAFyCC,EAAAF,EAAA,6BAGT,SAASG,GAAeF,EAAM,CAI7D,OAAO,OAAO,OAHHC,EAAA,IAAM,CAChB,MAAMF,EAA0BC,CAAI,CACrC,EAFW,MAGc,CAAE,UAAW,EAAK,CAAC,CAC7C,CALyCC,EAAAC,GAAA,kBAYT,SAASC,GAAoBC,EAAM,CAClE,OAAO,KAAM,CACZ,UAAY,GACZ,aAAc,CACb,MAAM,IAAI,MAAM,WAAWA,2BAA8B,CAC1D,CACD,CACD,CAPyCC,EAAAF,GAAA,uBClCzC,IAAMG,GAAc,WAAW,aAAa,YAAc,KAAK,IAAI,EAC7DC,GAAkB,WAAW,aAAa,IAAM,WAAW,YAAY,IAAI,KAAK,WAAW,WAAW,EAAI,IAAM,KAAK,IAAI,EAAID,GAC7HE,GAAa,CAClB,KAAM,OACN,UAAW,OACX,UAAW,EACX,SAAU,EACV,UAAW,EACX,QAAS,EACT,kBAAmB,EACnB,YAAa,EACb,UAAW,EACX,SAAU,EACV,SAAU,EACV,cAAe,CACd,UAAW,EACX,OAAQ,EACR,cAAe,CAChB,EACA,OAAQ,OACR,QAAS,CACR,OAAO,IACR,CACD,EACaC,GAAN,KAAuB,CAC7B,UAAY,GACZ,OACA,UAAY,QACZ,KACA,UACA,YAAYC,EAAMC,EAAS,CAC1B,KAAK,KAAOD,EACZ,KAAK,UAAYC,GAAS,WAAaJ,GAAgB,EACvD,KAAK,OAASI,GAAS,MACxB,CACA,IAAI,UAAW,CACd,OAAOJ,GAAgB,EAAI,KAAK,SACjC,CACA,QAAS,CACR,MAAO,CACN,KAAM,KAAK,KACX,UAAW,KAAK,UAChB,UAAW,KAAK,UAChB,SAAU,KAAK,SACf,OAAQ,KAAK,MACd,CACD,CACD,EAvBaK,EAAAH,GAAA,oBAwBN,IAAMI,GAAkBD,EAAA,cAA8BH,EAAiB,CAC7E,UAAY,OACZ,aAAc,CACb,MAAM,GAAG,SAAS,CACnB,CACA,IAAI,UAAW,CACd,MAAO,EACR,CACD,EAR+B,mBASlBK,GAAN,cAAiCL,EAAiB,CACxD,UAAY,SACb,EAFaG,EAAAE,GAAA,sBAGN,IAAMC,GAAN,cAAwCN,EAAiB,CAC/D,UAAY,WACZ,aAAe,CAAC,EAChB,WAAa,EACb,aAAe,EACf,gBAAkB,EAClB,gBAAkB,EAClB,kBAAoB,EACpB,gBAAkB,EAClB,WAAa,EACb,cAAgB,GAChB,KAAO,GACP,gBAAkB,GAClB,YAAc,EACd,cAAgB,EAChB,aAAe,EACf,YAAc,EACd,cAAgB,EAChB,sBAAwB,EACxB,UAAY,EACZ,aAAe,EACf,YAAc,EACd,eAAiB,CAClB,EAvBaG,EAAAG,GAAA,6BAwBN,IAAMC,GAAN,KAAmC,CACzC,UAAY,GACZ,YAAa,CACZ,MAAO,CAAC,CACT,CACA,iBAAiBC,EAAOC,EAAO,CAC9B,MAAO,CAAC,CACT,CACA,iBAAiBC,EAAM,CACtB,MAAO,CAAC,CACT,CACD,EAXaP,EAAAI,GAAA,gCAYN,IAAMI,GAAN,KAAkB,CACxB,UAAY,GACZ,WAAad,GACb,YAAc,IAAI,IAClB,SAAW,CAAC,EACZ,0BAA4B,EAC5B,WAAa,OACb,OAAS,OACT,SAASe,EAAKC,EAAU,CACvB,MAAMC,EAA0B,sBAAsB,CACvD,CACA,IAAI,YAAa,CAChB,OAAOf,EACR,CACA,sBAAuB,CACtB,MAAO,CAAC,CACT,CACA,oBAAqB,CACpB,OAAO,IAAIO,GAA0B,EAAE,CACxC,CACA,2BAA6B,KAC7B,KAAM,CACL,OAAI,KAAK,aAAeT,GAChBC,GAAgB,EAEjB,KAAK,IAAI,EAAI,KAAK,UAC1B,CACA,WAAWiB,EAAU,CACpB,KAAK,SAAWA,EAAW,KAAK,SAAS,OAAQC,GAAMA,EAAE,OAASD,CAAQ,EAAI,KAAK,SAAS,OAAQC,GAAMA,EAAE,YAAc,MAAM,CACjI,CACA,cAAcC,EAAa,CAC1B,KAAK,SAAWA,EAAc,KAAK,SAAS,OAAQD,GAAMA,EAAE,OAASC,CAAW,EAAI,KAAK,SAAS,OAAQD,GAAMA,EAAE,YAAc,SAAS,CAC1I,CACA,sBAAuB,CACtB,KAAK,SAAW,KAAK,SAAS,OAAQ,GAAM,EAAE,YAAc,YAAc,EAAE,YAAc,YAAY,CACvG,CACA,YAAa,CACZ,OAAO,KAAK,QACb,CACA,iBAAiBf,EAAMS,EAAM,CAC5B,OAAO,KAAK,SAAS,OAAQM,GAAMA,EAAE,OAASf,IAAS,CAACS,GAAQM,EAAE,YAAcN,EAAK,CACtF,CACA,iBAAiBA,EAAM,CACtB,OAAO,KAAK,SAAS,OAAQM,GAAMA,EAAE,YAAcN,CAAI,CACxD,CACA,KAAKT,EAAMC,EAAS,CACnB,IAAMgB,EAAQ,IAAId,GAAgBH,EAAMC,CAAO,EAC/C,YAAK,SAAS,KAAKgB,CAAK,EACjBA,CACR,CACA,QAAQD,EAAaE,EAAuBC,EAAS,CACpD,IAAIC,EACAC,EACA,OAAOH,GAA0B,UACpCE,EAAQ,KAAK,iBAAiBF,EAAuB,MAAM,EAAE,CAAC,GAAG,UACjEG,EAAM,KAAK,iBAAiBF,EAAS,MAAM,EAAE,CAAC,GAAG,YAEjDC,EAAQ,OAAO,WAAWF,GAAuB,KAAK,GAAK,KAAK,IAAI,EACpEG,EAAM,OAAO,WAAWH,GAAuB,GAAG,GAAK,KAAK,IAAI,GAEjE,IAAMD,EAAQ,IAAIb,GAAmBY,EAAa,CACjD,UAAWI,EACX,OAAQ,CACP,MAAAA,EACA,IAAAC,CACD,CACD,CAAC,EACD,YAAK,SAAS,KAAKJ,CAAK,EACjBA,CACR,CACA,4BAA4BK,EAAS,CACpC,KAAK,0BAA4BA,CAClC,CACA,iBAAiBb,EAAMc,EAAUtB,EAAS,CACzC,MAAMY,EAA0B,8BAA8B,CAC/D,CACA,oBAAoBJ,EAAMc,EAAUtB,EAAS,CAC5C,MAAMY,EAA0B,iCAAiC,CAClE,CACA,cAAcW,EAAO,CACpB,MAAMX,EAA0B,2BAA2B,CAC5D,CACA,QAAS,CACR,OAAO,IACR,CACD,EArFaX,EAAAQ,GAAA,eAsFN,IAAMe,GAAN,KAA0B,CAChC,UAAY,GAEZ,UAAY,KACZ,YAAYC,EAAU,CACrB,KAAK,UAAYA,CAClB,CACA,aAAc,CACb,MAAO,CAAC,CACT,CACA,YAAa,CACZ,MAAMb,EAA0B,gCAAgC,CACjE,CACA,QAAQZ,EAAS,CAChB,MAAMY,EAA0B,6BAA6B,CAC9D,CACA,KAAKc,EAAI,CACR,OAAOA,CACR,CACA,gBAAgBA,EAAIC,KAAYC,EAAM,CACrC,OAAOF,EAAG,KAAKC,EAAS,GAAGC,CAAI,CAChC,CACA,SAAU,CACT,MAAO,EACR,CACA,gBAAiB,CAChB,MAAO,EACR,CACA,aAAc,CACb,OAAO,IACR,CACD,EA/Ba3B,EAAAuB,GAAA,uBAEZK,EAFYL,GAEL,sBAAsB,CAAC,GA8BxB,IAAMM,GAAc,WAAW,aAAe,qBAAsB,WAAW,YAAc,WAAW,YAAc,IAAIrB,GC7MjI,WAAW,YAAcsB,GACzB,WAAW,YAAcC,GACzB,WAAW,iBAAmBC,GAC9B,WAAW,gBAAkBC,GAC7B,WAAW,mBAAqBC,GAChC,WAAW,oBAAsBC,GACjC,WAAW,6BAA+BC,GAC1C,WAAW,0BAA4BC,GCjBvC,OAAS,YAAAC,OAAgB,cCAzB,IAAOC,GAAQ,OAAO,OAAO,IAAM,CAAC,EAAG,CAAE,UAAW,EAAK,CAAC,EDG1D,IAAMC,EAAW,WAAW,QACfC,GAAgB,GAChBC,GAAU,IAAIC,GACdC,GAAU,IAAID,GACdE,GAAML,GAAU,KAAOM,GACvBC,GAAOP,GAAU,MAAQK,GACzBG,GAAQR,GAAU,OAASO,GAC3BE,GAAQT,GAAU,OAASK,GAC3BK,GAAQV,GAAU,OAASK,GAC3BM,GAAQX,GAAU,OAASK,GAC3BO,GAAOZ,GAAU,MAAQW,GACzBE,GAAab,GAAU,YAA4Bc,GAAe,oBAAoB,EAE5F,IAAMC,GAAQC,GAAU,OAASC,GAC3BC,GAAQF,GAAU,OAASC,GAC3BE,GAAaH,GAAU,YAAcC,GACrCG,GAAMJ,GAAU,KAAOC,GACvBI,GAASL,GAAU,QAAUC,GAC7BK,GAAQN,GAAU,OAASC,GAC3BM,GAAWP,GAAU,UAAYC,GACjCO,GAAiBR,GAAU,gBAAkBC,GAC7CQ,GAAUT,GAAU,SAAWC,GAC/BS,GAAaV,GAAU,YAAcC,GACrCU,GAAOX,GAAU,MAAQC,GACzBW,GAAUZ,GAAU,SAAWC,GAC/BY,GAAUb,GAAU,SAAWC,GAC/Ba,GAAYd,GAAU,WAALine truncated
"names": ["stripCfConnectingIPHeader", "input", "init", "request", "__name", "target", "thisArg", "argArray", "createNotImplementedError", "name", "__name", "notImplemented", "notImplementedClass", "name", "__name", "_timeOrigin", "_performanceNow", "nodeTiming", "PerformanceEntry", "name", "options", "__name", "PerformanceMark", "PerformanceMeasure", "PerformanceResourceTiming", "PerformanceObserverEntryList", "_name", "_type", "type", "Performance", "_fn", "_options", "createNotImplementedError", "markName", "e", "measureName", "entry", "startOrMeasureOptions", "endMark", "start", "end", "maxSize", "listener", "event", "PerformanceObserver", "callback", "fn", "thisArg", "args", "__publicField", "performance", "performance", "Performance", "PerformanceEntry", "PerformanceMark", "PerformanceMeasure", "PerformanceObserver", "PerformanceObserverEntryList", "PerformanceResourceTiming", "Writable", "noop_default", "_console", "_ignoreErrors", "_stderr", "Writable", "_stdout", "log", "noop_default", "info", "trace", "debug", "table", "error", "warn", "createTask", "notImplemented", "clear", "_console", "noop_default", "count", "countReset", "dir", "dirxml", "group", "groupEnd", "groupCollapsed", "profile", "profileEnd", "time", "timeEnd", "timeLog", "timeStamp", "Console", "notImplementedClass", "_times", "_stdoutErrorHandler", "noop_default", "_stderrErrorHandler", "workerdConsole", "assert", "clear", "context", "count", "countReset", "createTask", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "profile", "profileEnd", "table", "time", "timeEnd", "timeLog", "timeStamp", "trace", "warn", "Console", "_ignoreErrors", "_stderr", "_stderrErrorHandler", "_stdout", "_stdoutErrorHandler", "_times", "console_default", "console_default", "hrtime", "__name", "startTime", "now", "seconds", "nanos", "diffSeconds", "diffNanos", "EventEmitter", "Socket", "ReadStream", "Socket", "fd", "mode", "__name", "Socket", "WriteStream", "Socket", "fd", "dir", "callback", "x", "y", "dx", "dy", "env", "count", "__name", "Process", "EventEmitter", "impl", "prop", "value", "warning", "type", "code", "args", "eventName", "#stdin", "#stdout", "#stderr", "ReadStream", "WriteStream", "#cwd", "cwd", "createNotImplementedError", "notImplemented", "__name", "globalProcess", "getBuiltinModule", "exit", "platform", "nextTick", "unenvProcess", "Process", "hrtime", "abort", "addListener", "allowedNodeEnvironmentFlags", "hasUncaughtExceptionCaptureCallback", "setUncaughtExceptionCaptureCallback", "loadEnvFile", "sourceMapsEnabled", "arch", "argv", "argv0", "chdir", "config", "connected", "constrainedMemory", "availableMemory", "cpuUsage", "cwd", "debugPort", "dlopen", "disconnect", "emit", "emitWarning", "env", "eventNames", "execArgv", "execPath", "finalization", "features", "getActiveResourcesInfo", "getMaxListeners", "kill", "listeners", "listenerCount", "memoryUsage", "on", "off", "once", "pid", "ppid", "prependListener", "prependOnceListener", "rawListeners", "release", "removeAllListeners", "removeListener", "report", "resourceUsage", "setMaxListeners", "setSourceMapsEnabled", "stderr", "stdin", "stdout", "title", "throwDeprecation", "traceDeprecation", "umask", "uptime", "version", "versions", "domain", "initgroups", "moduleLoadList", "reallyExit", "openStdin", "assert", "binding", "send", "exitCode", "channel", "getegid", "geteuid", "getgid", "getgroups", "getuid", "setegid", "seteuid", "setgid", "setgroups", "setuid", "permission", "mainModule", "_events", "_eventsCount", "_exiting", "_maxListeners", "_debugEnd", "_debugProcess", "_fatalException", "_getActiveHandles", "_getActiveRequests", "_kill", "_preload_modules", "_rawDebug", "_startProfilerIdleNotifier", "_stopProfilerIdleNotifier", "_tickCallback", "_disconnect", "_handleQueue", "_pendingMessage", "_channel", "_send", "_linkedBinding", "_process", "process_default", "process_default", "compose", "__name", "middleware", "onError", "onNotFound", "context", "next", "index", "dispatch", "i", "res", "isError", "handler", "err", "GET_MATCH_RESULT", "parseBody", "__name", "request", "options", "all", "dot", "contentType", "HonoRequest", "parseFormData", "formData", "convertFormDataToBodyData", "form", "value", "key", "handleParsingAllValues", "handleParsingNestedValues", "nestedForm", "keys", "key2", "index", "splitPath", "__name", "path", "paths", "splitRoutingPath", "routePath", "groups", "extractGroupsFromPath", "replaceGroupMarks", "match", "index", "mark", "i", "j", "patternCache", "getPattern", "label", "next", "cacheKey", "tryDecode", "str", "decoder", "tryDecodeURI", "getPath", "request", "url", "start", "charCode", "queryIndex", "getPathNoStrict", "__name", "request", "result", "getPath", "mergePath", "base", "sub", "rest", "checkOptionalParameter", "path", "segments", "results", "basePath", "segment", "optionalSegment", "v", "_decodeURI", "value", "tryDecode", "decodeURIComponent_", "_getQueryParam", "url", "key", "multiple", "encoded", "Line truncated
}
+40
View File
@@ -11,6 +11,7 @@
- ✈️ 支持邮件收发
- ✨ 支持保存密码,找回邮箱
- 😄 支持多域名后缀
- 🔌 **开放 RESTful API**,支持程序化调用
- 🚀 快速部署,纯 Cloudflare 方案,无需服务器
原理:
@@ -20,6 +21,45 @@
- 邮件存储 (Cloudflare D1)
- 发信使用 MailChannels API
## 📖 API 文档
Vmail 提供完整的 RESTful API,支持通过程序化方式创建临时邮箱、查询收件箱。
### 获取 API Key
访问 [API 文档页面](https://vmail.dev/api-docs) 创建免费的 API Key。
### API 端点
| 方法 | 端点 | 说明 |
|------|------|------|
| `POST` | `/api/v1/mailboxes` | 创建临时邮箱 |
| `GET` | `/api/v1/mailboxes/:id` | 获取邮箱信息 |
| `GET` | `/api/v1/mailboxes/:id/messages` | 获取收件箱(支持分页) |
| `GET` | `/api/v1/mailboxes/:id/messages/:messageId` | 获取邮件详情 |
| `DELETE` | `/api/v1/mailboxes/:id/messages/:messageId` | 删除邮件 |
### 快速开始
```bash
# 1. 创建临时邮箱
curl -X POST https://vmail.dev/api/v1/mailboxes \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json"
# 响应: { "data": { "id": "abc123", "address": "random@domain.com", ... } }
# 2. 查询收件箱
curl https://vmail.dev/api/v1/mailboxes/abc123/messages \
-H "X-API-Key: your-api-key"
# 3. 获取邮件详情
curl https://vmail.dev/api/v1/mailboxes/abc123/messages/msg_001 \
-H "X-API-Key: your-api-key"
```
完整文档请访问:[https://vmail.dev/api-docs](https://vmail.dev/api-docs)
## 👋 自部署教程
本项目已完全基于 Cloudflare Pages 和 Cloudflare D1 构建,大大简化了部署流程。您只需要一个托管在 Cloudflare 上的域名即可。
File diff suppressed because it is too large. Load diff
-116
View File
@@ -1,116 +0,0 @@
## Email receiving tutorial
**1.Register a [turso](https://turso.tech) account, create a database, and create an emails table**
After registration, you will be prompted to create a database. I named it `vmail` here,
![](https://imgv2.wr.do/file/3773b481c78c9087140b1.png)
Select your database, you will see the "Edit Table" button, click and enter, continue to click the "SQL Runner" button in the upper left corner, and insert the [SQL Script](https://github.com/oiov/vmail/blob/main/packages/database/drizzle/0000_sturdy_arclight.sql) Copy to Terminal Run:
```bash
# Copy sql script to run on the terminal (packages/database/drizzle/0000_sturdy_arclight.sql)
CREATE TABLE `emails` (
`id` text PRIMARY KEY NOT NULL,
`message_from` text NOT NULL,
`message_to` text NOT NULL,
`headers` text NOT NULL,
`from` text NOT NULL,
`sender` text,
`reply_to` text,
`delivered_to` text,
`return_path` text,
`to` text,
`cc` text,
`bcc` text,
`subject` text,
`message_id` text NOT NULL,
`in_reply_to` text,
`references` text,
`date` text,
`html` text,
`text` text,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
```
**2.Deploy email workers**
```bash
git clone https://github.com/oiov/vmail
cd vmail
# Install dependencies
pnpm install
```
Fill in the necessary environment variables in `vmail/apps/email-worker/wrangler.toml` file.
- TURSO_DB_AUTH_TOKEN (turso table info from step 1,click `Generate Token`)
- TURSO_DB_URL (e.g. libsql://db-name.turso.io)
- EMAIL_DOMAIN (e.g. vmail.dev)
> If you don't do this step, you can add environment variables in the worker settings of Cloudflare
Then run cmds:
```bash
cd apps/email-worker
# Node environment required, and your need to install wrangler cli and login first, see https://developers.cloudflare.com/workers/wrangler/install-and-update
pnpm run deploy
```
**3.Configure email routing rules**
Set `Catch-all` action to Send to Worker
![](https://imgv2.wr.do/file/fa39163411cd35fad0a7f.png)
**4.Deploy Remix app on Vercel or fly.io**
Ensure that the following environment variables (`.env.example`) are prepared and filled in during deployment:
| Variable | Description | example |
| ---------------------- | ------------------------------------------------------------------ | -------------------------------------- |
| COOKIES_SECRET | The encryption secret of the cookie, a random string is sufficient | `s3cr3t` |
| TURSO_DB_RO_AUTH_TOKEN | Obtain database credentials from turso | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9` |
| TURSO_DB_URL | Obtain database credentials from turso | `libsql://db-name.turso.io` |
| EMAIL_DOMAIN | email domains | `vmail.dev,meetu.dev` |
| EXPIRY_TIME | Optional. default `86400` | `86400` |
| TURNSTILE_KEY | Optional. Obtained from Cloudflare for website verification | `1234567890` |
| TURNSTILE_SECRET | Optional. Obtained from Cloudflare for website verification | `s3cr3t` |
Get `TURNSTILE_KEY`、`TURNSTILE_SECRET` from https://dash.cloudflare.com/?to=/:account/turnstile
**For Vercel:**
Deploy your own version of email to Vercel with one click:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
Or push the code to your Github repository and create a new project in Vercel. Choose `New project`, then import the corresponding Github repository, fill in the environment variables, select the `Remix` framework, and click `Deploy`. Wait for the deployment to complete.
Click Couninue to Dashboard -> Settings -> General:
![](https://imgv2.wr.do/file/573f842ccbefdf8daf319.png)
![](https://imgv2.wr.do/file/36c1566d8c27735bb097d.png)
**For fly.io:**
```bash
cd vmail/apps/remix
fly launch
```
**5.Add DNS records (A record) to the corresponding platform in Cloudflare**
e.g. vercel:
![](https://imgv2.wr.do/file/245b71636cd16afcf93c7.png)
![](https://imgv2.wr.do/file/e10af19334fd6a13b7d2e.png)
Done!
-150
View File
@@ -1,150 +0,0 @@
## 接收邮件部署教程
**1.注册一个 [turso](https://turso.tech) 账户,创建数据库,并创建一个`emails`表**
注册后,系统会提示您创建一个数据库。在这里我将其命名为 `vmail`,
![](https://imgv2.wr.do/file/3773b481c78c9087140b1.png)
然后,创建一个名为 `emails` 的表。
选择您的数据库,您会看到“编辑表”按钮,点击并进入,继续点击左上角的 `SQL runner` 按钮,将[sql脚本](https://github.com/oiov/vmail/blob/main/packages/database/drizzle/0000_sturdy_arclight.sql)复制到终端运行:
<details>
<summary>查看脚本内容</summary>
<pre ><code>CREATE TABLE `emails` (
`id` text PRIMARY KEY NOT NULL,
`message_from` text NOT NULL,
`message_to` text NOT NULL,
`headers` text NOT NULL,
`from` text NOT NULL,
`sender` text,
`reply_to` text,
`delivered_to` text,
`return_path` text,
`to` text,
`cc` text,
`bcc` text,
`subject` text,
`message_id` text NOT NULL,
`in_reply_to` text,
`references` text,
`date` text,
`html` text,
`text` text,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
</code></pre>
</details>
<details>
<summary>手动创建表(旧版方法)</summary>
Cli 文档:https://docs.turso.tech/cli/introduction
Linux (或 mac/windows) 终端执行:
# 安装(安装后记得重启终端生效)
curl -sSfL https://get.tur.so/install.sh | bash
# 登录账户
turso auth login
# 连接到您的Turso数据库
turso db shell <database-name>
</details>
**2.部署 email worker**
需要准备 Node 环境(推荐 18.x 及以上),并且需要安装 wrangler cli 并在本地登录,参考 https://developers.cloudflare.com/workers/wrangler/install-and-update (登录时建议开启VPN)
```bash
# 安装 pnpm
npm install -g pnpm
```
```bash
git clone https://github.com/oiov/vmail
cd vmail
# 安装依赖
pnpm install
```
在 `vmail/apps/email-worker/wrangler.toml` 文件中填写必要的环境变量。
- TURSO_DB_AUTH_TOKEN(第1步中的turso表信息,点击“Generate Token”)
- TURSO_DB_URL(例如 libsql://db-name.turso.io)
- EMAIL_DOMAIN (域名,如 vmail.dev)
> 如果您不执行此步骤,可以在Cloudflare的 worker settings 中添加环境变量
然后运行命令:
```bash
cd apps/email-worker
pnpm run deploy
```
**3.配置电子邮件路由规则**
设置“Catch-all”操作为发送到 email worker:
![](https://imgv2.wr.do/file/fa39163411cd35fad0a7f.png)
**4.在 Vercel 或 fly.io 上部署 Remix 应用程序**
确保在部署时准备并填写以下环境变量(`.env.example`):
| 变量名 | 说明 | 示例 |
| ---------------------- | ------------------------------------- | --------------------------- |
| COOKIES_SECRET | 必填,cookie加密密钥,随机字符串 | `12345abcde` |
| TURSO_DB_RO_AUTH_TOKEN | 必填,turso数据库只读凭据 | `my-turso-db-ro-auth-token` |
| TURSO_DB_URL | 必填,turso数据库URL | `libsql://db-name.turso.io` |
| EMAIL_DOMAIN | 必填,域名后缀,支持多个 | `vmail.dev,meetu.dev` |
| EXPIRY_TIME | 可选,邮箱过期时间,单位秒,默认86400 | `86400` |
| TURNSTILE_KEY | 可选,网站验证所需的 Turnstile Key | `my-turnstile-key` |
| TURNSTILE_SECRET | 可选,网站验证所需的 Turnstile Secret | `my-turnstile-secret` |
获取 `TURNSTILE_KEY`、`TURNSTILE_SECRET` 请前往 cloudflare 控制台 https://dash.cloudflare.com/?to=/:account/turnstile
**Vercel:**
推荐使用一键部署按钮(此操作会在你的github账户中自动创建vmail仓库并关联部署到vercel):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Foiov%2Fvmail&env=COOKIES_SECRET&env=TURNSTILE_KEY&env=TURNSTILE_SECRET&env=TURSO_DB_RO_AUTH_TOKEN&env=TURSO_DB_URL&env=EMAIL_DOMAIN&project-name=vmail&repository-name=vmail)
或手动将代码推送到你的 Github 仓库,并在 Vercel 面板中创建项目。选择 `New project`,然后导入对应的 Github 仓库,填写环境变量,选择 `Remix` 框架,点击 `Deploy`,等待部署完成。
部署完后继续点击 Countinu to Dashboard,进入 Settings -> General,修改下面设置:
![](https://imgv2.wr.do/file/573f842ccbefdf8daf319.png)
注意一定要修改目录为 `apps/remix`,否则部署后访问网站会出现`404`错误:
![](https://imgv2.wr.do/file/36c1566d8c27735bb097d.png)
**然后进入 Deployments 重新部署一次,或向 github 推送代码重新触发部署**。
**fly.io:**
```bash
cd vmail/apps/remix
fly launch
```
**5.部署成功后在 cloudflare 添加域名解析(A记录)到对应平台**
vercel 演示如何解析:
![](https://imgv2.wr.do/file/245b71636cd16afcf93c7.png)
![](https://imgv2.wr.do/file/e10af19334fd6a13b7d2e.png)
**6.在CF域名控制台修改加密模式为完全(或严格)**
> 若不修改,访问网站会出现`重定向次数过多`错误
![](https://img.wr.do/api/img/KK8Qwp)
以上,完成!
-119
View File
@@ -1,119 +0,0 @@
## Email Sending Tutorial
### Preparation Work
- Continue to use the domain hosted on cf from the email receiving tutorial.
- DKIM (optional)
### 1. Create a Sending Worker
Here we will manually create it:
- Go to the Cloudflare dashboard at `https://dash.cloudflare.com/`, click on `Workers and Pages` in the sidebar.
- Click `Create an app` -> `Create a worker` -> Name it as you wish, for example, `sender` -> Click `Deploy`.
- Enter the worker and click `Edit code`. Paste the following [code](/docs/send-worker.js)
- In the worker's `Settings` -> `Variables`, add the following variables:
| Variable Name | Description | Example |
| ---------------- | ------------------------------------ | --------------------- |
| DKIM_DOMAIN | Optional, domain suffix | `vmail.dev` |
| DKIM_PRIVATE_KEY | Optional, DKIM private key | `MIIEpQIBAAKCAQEA...` |
| DKIM_SELECTOR | Optional, fixed value `mailchannels` | `mailchannels` |
The `DKIM_PRIVATE_KEY` will be explained later on how to obtain it.
Remember the address assigned to the worker, i.e., `https://<worker-name>.<your-name>.workers.dev`, which will be used later.
### 2. Prepare DKIM Private Key (optional)
> DKIM is an email authentication technology that can verify the identity of the email sender.
Execute the following command in the terminal to generate a DKIM private key, refer to [Adding a DKIM Signature](https://support.mailchannels.com/hc/en-us/articles/7122849237389-Adding-a-DKIM-Signature):
```bash
openssl genrsa 2048 | tee private_key.pem | openssl rsa -outform der | openssl base64 -A > private_key.txt
echo -n "v=DKIM1;p=" > dkim_record.txt && openssl rsa -in private_key.pem -pubout -outform der | openssl base64 -A >> dkim_record.txt
```
These two commands will generate 3 files:
- `private_key.pem`: Private key file.
- `private_key.txt`: Private key file in base64 encoding.
- `dkim_record.txt`: DKIM record.
The content of the `private_key.txt` file is the value for the `DKIM_PRIVATE_KEY` variable in the previous step.
### 3. Configure DNS
Enter the Cloudflare domain control console, select your domain -> Click `DNS`, next, you need to **add 3 TXT records** and **modify 1 TXT record**.
The new ones are as follows:
| Type | Name | Value | Remarks |
| ---- | ------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------ |
| TXT | `_dmarc` | `v=DMARC1; p=reject; adkim=s; aspf=s; rua=mailto:YYY; ruf=mailto:YYY pct=100; fo=1;` | Fixed value |
| TXT | `mailchannels._domainkey` | `v=DKIM1;p=MIIEpQIBAAKCAQEA...` | The value is the content of the `dkim_record.txt` file |
| TXT | `_mailchannels` | `v=mc1 cfid=yesmore.workers.dev` | Replace yesmore with your account name |
The one that needs modification (the TXT record value is `example.com`, i.e., your domain name):
| Type | Name | Value | Remarks |
| ---- | ------------- | --------------------------------------------------------------------------- | ----------------------------------------------------- |
| TXT | `example.com` | `v=spf1 include:_spf.mx.cloudflare.net include:relay.mailchannels.net ~all` | Replace the value with this, leave the rest unchanged |
In the end, there will be a total of 4 TXT records:
![](https://img.inke.app/file/b7422917c667de620ae95.png)
Verify if the DKIM record is configured successfully at [dkim-record-checker](https://dmarcly.com/tools/dkim-record-checker).
### 4. Verify Sending
Method one: Open the webpage `https://<sender-name>.<your-name>.workers.dev/submit` to verify if sending is normal.
Method two: Send via API
- Request URL `https://<sender-name>.<your-name>.workers.dev`
- Request Method `POST`
- Request Body:
```json
{
"from": {
"email": "sender@vmail.dev",
"name": "Sender"
},
"personalizations": [
{
"to": [
{
"email": "example@gmail.com",
"name": "Recipient"
}
]
}
],
"subject": "Email Subject",
"content": [
{
"type": "text/plain",
"value": "Email Content"
}
]
}
```
Example:
![](https://img.inke.app/file/1f6f3ab53aff9a1855475.png)
### 5. Add Environment Variables
This project uses the method two from step four to send emails via API.
In the Vercel project console, go to `Settings` -> `Environment Variables`, and add the following variable:
- SEND_WORKER_URL: The value should be `https://<sender-name>.<your-name>.workers.dev`
After adding, trigger a redeployment.
-120
View File
@@ -1,120 +0,0 @@
## 发送邮件部署教程
### 准备工作
- 继续使用收件教程中托管到 cf 的域名
- DKIM(可选)
### 1. 创建发件 worker
这里使用手动创建的方式:
- 进入 Cloudflare 控制台 `https://dash.cloudflare.com/`,点击侧边栏 `Workers 和 Pages`
- 点击`创建应用程序` -> `创建 worker` -> 名称随意,比如 `sender` -> 点击 `部署`
- 进入到该 worker,点击 `编辑代码`,将代码 [send-worker.js](/docs/send-worker.js) 粘贴进去并保存部署
- 在 worker 的 `设置` -> `变量` 中添加以下变量:
| 变量名 | 说明 | 示例 |
| ---------------- | --------------------------- | --------------------- |
| DKIM_DOMAIN | 可选,域名后缀 | `vmail.dev` |
| DKIM_PRIVATE_KEY | 可选,DKIM 私钥 | `MIIEpQIBAAKCAQEA...` |
| DKIM_SELECTOR | 可选,固定值 `mailchannels` | `mailchannels` |
`DKIM_PRIVATE_KEY` 后续会提到如何获取。
记住 worker 分配的地址,即 `https://<worker-name>.<your-name>.workers.dev`,后面会用到。
### 2. 准备 DKIM 私钥(可选)
> DKIM 是一种电子邮件认证技术,可以验证邮件的发送者身份。
在终端执行下面的命令,生成 DKIM 私钥,参考 [Adding-a-DKIM-Signature](https://support.mailchannels.com/hc/en-us/articles/7122849237389-Adding-a-DKIM-Signature):
```bash
openssl genrsa 2048 | tee private_key.pem | openssl rsa -outform der | openssl base64 -A > private_key.txt
echo -n "v=DKIM1;p=" > dkim_record.txt && openssl rsa -in private_key.pem -pubout -outform der | openssl base64 -A >> dkim_record.txt
```
这两条命令会生成3个文件:
- `private_key.pem`:私钥文件
- `private_key.txt`:私钥文件,base64 编码
- `dkim_record.txt`:DKIM 记录
其中 `private_key.txt` 文件中的内容就是上一步 `DKIM_PRIVATE_KEY` 变量的值。
### 3. 配置 DNS
进入 Cloudflare 托管域名控制台,选择你的域名 -> 点击 `DNS`,接下来,需要**添加3条TXT记录**并**修改1条TXT记录**。
新增的如下:
| 类型 | 名称 | 值 | 备注 |
| ---- | ------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------- |
| TXT | `_dmarc` | `v=DMARC1; p=reject; adkim=s; aspf=s; rua=mailto:YYY; ruf=mailto:YYY pct=100; fo=1;` | 固定值 |
| TXT | `mailchannels._domainkey` | `v=DKIM1;p=MIIEpQIBAAKCAQEA...` | 值为 `dkim_record.txt` 文件的内容 |
| TXT | `_mailchannels` | `v=mc1 cfid=yesmore.workers.dev` | 将其中的 yesmore 修改为你的账号名称 |
需要修改的如下(TXT记录值为 `example.com` 即你的域名的那条):
| 类型 | 名称 | 值 | 备注 |
| ---- | ------------- | --------------------------------------------------------------------------- | ------------------------ |
| TXT | `example.com` | `v=spf1 include:_spf.mx.cloudflare.net include:relay.mailchannels.net ~all` | 把值替换为这个,其他不动 |
最后一共4条TXT记录:
![](https://img.inke.app/file/b7422917c667de620ae95.png)
在 [dkim-record-checker](https://dmarcly.com/tools/dkim-record-checker) 验证 DKIM 记录是否配置成功。
### 4. 验证发送
方法一:打开网页 `https://<sender-name>.<your-name>.workers.dev/submit` 验证是否可以正常发送
方法二:使用 API 发送
- 请求地址 `https://<sender-name>.<your-name>.workers.dev`
- 请求方法 `POST`
- 请求体:
```json
{
"from": {
"email": "sender@vmail.dev",
"name": "发送者"
},
"personalizations": [
{
"to": [
{
"email": "example@gmail.com",
"name": "接收者"
}
]
}
],
"subject": "邮件标题",
"content": [
{
"type": "text/plain",
"value": "邮件内容"
}
]
}
```
示例:
![](https://img.inke.app/file/1f6f3ab53aff9a1855475.png)
### 5. 添加环境变量
此项目使用第4步中的方法二通过 API 发送邮件。
在 Vercel 项目控制台中,进入 `Settings` -> `Environment Variables`,添加以下变量:
- SEND_WORKER_URL:值为 `https://<sender-name>.<your-name>.workers.dev`
添加后重新触发部署一次即可。
-93
View File
@@ -1,93 +0,0 @@
/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "npm run deploy" to publish your worker
*
* Learn more at https://developers.cloudflare.com/workers/
*/
async function readRequestBody(request, env) {
const { headers } = request;
const contentType = headers.get("content-type") || "";
if (contentType.includes("application/json")) {
return JSON.stringify(await request.json());
} else if (contentType.includes("form")) {
const formData = await request.formData();
const body = {};
for (const entry of formData.entries()) {
body[entry[0]] = entry[1];
}
let data = JSON.parse(JSON.stringify(body));
let combine = `{"personalizations":[{"to":[{"email":"${data.to}","name":"${data.ton}"}],"dkim_domain":"${env.DKIM_DOMAIN}","dkim_selector":"${env.DKIM_SELECTOR}","dkim_private_key":"${env.DKIM_PRIVATE_KEY}"}],"from":{"email":"${data.from}","name":"${data.fromn}"},"reply_to":{"email":"${data.rep}","name":"${data.repn}"},"subject":"${data.sbj}","content":[{"type":"${data.type}","value":"${data.body}"}]}`;
return combine;
} else {
return '{"success":false}';
}
}
async function handleRequest(request, env) {
let start = Date.now();
let reqBody = await readRequestBody(request, env);
let send_request = new Request("https://api.mailchannels.net/tx/v1/send", {
method: "POST",
headers: {
"content-type": "application/json",
},
body: reqBody,
});
let resp = await fetch(send_request);
let respText = await resp.text();
let end = Date.now();
let total = end - start;
return new Response(respText, {
headers: {
"X-MC-Status": resp.status,
"X-Response-Time": total,
},
});
}
const htmlForm = `<!DOCTYPE html>
<html>
<head>
<meta content="width=device-width,initial-scale=1" name="viewport">
<title>Submit your email</title>
<body>
(*) is required
<form action="/" method="POST" autocomplete="on">
<input name="from" type="email" placeholder="sender@example.com *" required><br>
<input name="fromn" type="text" placeholder="Sender Name"><br>
<input name="to" type="email" placeholder="receiver@example.com *" required><br>
<input name="ton" type="text" placeholder="Receiver Name"><br>
<input name="rep" type="email" placeholder="reply-to@example.com"><br>
<input name="repn" type="text" placeholder="Replier Name"><br>
<select name="type">
<option value="text/html; charset=utf-8">HTML</option>
<option value="text/plain; charset=utf-8" selected>Plain</option>
</select><br>
<input name="sbj" type="text" placeholder="Email Subject *" required><br>
<textarea name="body" rows="7" cols="23" placeholder="Email Body *" required></textarea><br>
<input type="submit" value="submit">
</form>
</body>
</html>`;
export default {
async fetch(request, env, ctx) {
const { url } = request;
if (url.includes("submit")) {
return new Response(htmlForm, {
headers: { "Content-Type": "text/html" },
});
}
if (request.method === "POST") {
return handleRequest(request, env);
} else if (request.method === "GET") {
return new Response(`The request was a GET`);
}
},
};
@@ -1 +0,0 @@
*,: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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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}*,: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: }::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: }.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}.bottom-0{bottom:0}.right-4{right:1rem}.top-0{top:0}.top-4{top:1rem}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-1{margin-bottom:-.25rem}.-mr-1{margin-right:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1Line truncated
@@ -1,264 +0,0 @@
var Yx=Object.defineProperty;var Rh=e=>{throw TypeError(e)};var Gx=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var jh=(e,t,n)=>Gx(e,typeof t!="symbol"?t+"":t,n),ru=(e,t,n)=>t.has(e)||Rh("Cannot "+n);var P=(e,t,n)=>(ru(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?Rh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(ru(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(ru(e,t,"access private method"),n);var Ao=(e,t,n,r)=>({set _(i){I(e,t,i,n)},get _(){return P(e,t,r)}});function Ty(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ry={exports:{}},bl={},jy={exports:{}},G={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wo=Symbol.for("react.element"),Xx=Symbol.for("react.portal"),Jx=Symbol.for("react.fragment"),Zx=Symbol.for("react.strict_mode"),e2=Symbol.for("react.profiler"),t2=Symbol.for("react.provider"),n2=Symbol.for("react.context"),r2=Symbol.for("react.forward_ref"),i2=Symbol.for("react.suspense"),s2=Symbol.for("react.memo"),o2=Symbol.for("react.lazy"),Nh=Symbol.iterator;function a2(e){return e===null||typeof e!="object"?null:(e=Nh&&e[Nh]||e["@@iterator"],typeof e=="function"?e:null)}var Ny={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ly=Object.assign,Dy={};function Ki(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ny}Ki.prototype.isReactComponent={};Ki.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ki.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function My(){}My.prototype=Ki.prototype;function Uf(e,t,n){this.props=e,this.context=t,this.refs=Dy,this.updater=n||Ny}var Bf=Uf.prototype=new My;Bf.constructor=Uf;Ly(Bf,Ki.prototype);Bf.isPureReactComponent=!0;var Lh=Array.isArray,Ay=Object.prototype.hasOwnProperty,zf={current:null},Fy={key:!0,ref:!0,__self:!0,__source:!0};function Iy(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ay.call(t,r)&&!Fy.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:wo,type:e,key:s,ref:o,props:i,_owner:zf.current}}function l2(e,t){return{$$typeof:wo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wf(e){return typeof e=="object"&&e!==null&&e.$$typeof===wo}function u2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dh=/\/+/g;function iu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?u2(""+e.key):t.toString(36)}function ua(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case wo:case Xx:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+iu(o,0):r,Lh(i)?(n="",e!=null&&(n=e.replace(Dh,"$&/")+"/"),ua(i,t,n,"",function(u){return u})):i!=null&&(Wf(i)&&(i=l2(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Dh,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Lh(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+iu(s,a);o+=ua(s,t,n,l,i)}else if(l=a2(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+iu(s,a++),o+=ua(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Fo(e,t,n){if(e==null)return e;var r=[],i=0;return ua(e,r,"","",function(s){return t.call(n,s,i++)}),r}function c2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Qe={current:null},ca={transition:null},f2={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:ca,ReactCurrentOwner:zf};G.Children={map:Fo,forEach:function(e,t,n){Fo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fo(e,function(){t++}),t},toArray:function(e){return Fo(e,function(t){return t})||[]},only:function(e){if(!Wf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=Ki;G.Fragment=Jx;G.Profiler=e2;G.PureComponent=Uf;G.StrictMode=Zx;G.Suspense=i2;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f2;G.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ly({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=zf.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Ay.call(t,l)&&!Fy.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:wo,type:e.type,key:i,ref:s,props:r,_owner:o}};G.createContext=function(e){return e={$$typeof:n2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:t2,_context:e},e.Line truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var h2=S,p2=Symbol.for("react.element"),m2=Symbol.for("react.fragment"),g2=Object.prototype.hasOwnProperty,y2=h2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v2={key:!0,ref:!0,__self:!0,__source:!0};function _y(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)g2.call(t,r)&&!v2.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:p2,type:e,key:s,ref:o,props:i,_owner:y2.current}}bl.Fragment=m2;bl.jsx=_y;bl.jsxs=_y;Ry.exports=bl;var p=Ry.exports,Zu={},Vy={exports:{}},dt={},$y={exports:{}},Uy={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(j,M){var D=j.length;j.push(M);e:for(;0<D;){var A=D-1>>>1,U=j[A];if(0<i(U,M))j[A]=M,j[D]=U,D=A;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var M=j[0],D=j.pop();if(D!==M){j[0]=D;e:for(var A=0,U=j.length,K=U>>>1;A<K;){var ve=2*(A+1)-1,pt=j[ve],W=ve+1,Ne=j[W];if(0>i(pt,D))W<U&&0>i(Ne,pt)?(j[A]=Ne,j[W]=D,A=W):(j[A]=pt,j[ve]=D,A=ve);else if(W<U&&0>i(Ne,D))j[A]=Ne,j[W]=D,A=W;else break e}}return M}function i(j,M){var D=j.sortIndex-M.sortIndex;return D!==0?D:j.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,m=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(j){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=j)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function b(j){if(w=!1,v(j),!m)if(n(l)!==null)m=!0,N(C);else{var M=n(u);M!==null&&_(b,M.startTime-j)}}function C(j,M){m=!1,w&&(w=!1,y(O),O=-1),h=!0;var D=d;try{for(v(M),f=n(l);f!==null&&(!(f.expirationTime>M)||j&&!B());){var A=f.callback;if(typeof A=="function"){f.callback=null,d=f.priorityLevel;var U=A(f.expirationTime<=M);M=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(l)&&r(l),v(M)}else r(l);f=n(l)}if(f!==null)var K=!0;else{var ve=n(u);ve!==null&&_(b,ve.startTime-M),K=!1}return K}finally{f=null,d=D,h=!1}}var T=!1,k=null,O=-1,F=5,$=-1;function B(){return!(e.unstable_now()-$<F)}function X(){if(k!==null){var j=e.unstable_now();$=j;var M=!0;try{M=k(!0,j)}finally{M?me():(T=!1,k=null)}}else T=!1}var me;if(typeof g=="function")me=function(){g(X)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,E=J.port2;J.port1.onmessage=X,me=function(){E.postMessage(null)}}else me=function(){x(X,0)};function N(j){k=j,T||(T=!0,me())}function _(j,M){O=x(function(){j(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,N(C))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(d){case 1:case 2:case 3:var M=3;break;default:M=d}var D=d;d=M;try{return j()}finally{d=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,M){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=d;d=j;try{return M()}finally{d=D}},e.unstable_scheduleCallback=function(j,M,D){var A=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?A+D:A):D=A,j){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=D+U,j={id:c++,callback:M,priorityLevel:j,startTime:D,expirationTime:U,sortIndex:-1},D>A?(j.sortIndex=D,t(u,j),n(l)===null&&j===n(u)&&(w?(y(O),O=-1):w=!0,_(b,D-A))):(j.sortIndex=U,t(l,j),m||h||(m=!0,N(C))),j},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(j){var M=d;return function(){var D=d;d=M;try{return j.apply(this,arguments)}finally{d=D}}}})(Uy);$y.exports=Uy;var w2=$y.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var By=S,ct=w2;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var zy=new Set,_s={};function $r(e,t){Di(e,t),Di(e+"Capture",t)}function Di(e,t){for(_s[e]=t,e=0;e<t.length;e++)zy.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=Object.prototype.hasOwnProperty,x2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mh={},Ah={};function S2(e){return ec.call(Ah,e)?!0:ec.call(Mh,e)?!1:x2.test(e)?Ah[e]=!0:(Mh[e]=!0,!1)}function b2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P2(e,t,n,r){if(t===null||typeof t>"u"||b2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ye(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new Ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new Ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new Ye(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ae[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new Ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new Ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new Ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hf=/[\-:]([a-z])/g;function Kf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Hf,Kf);Ae[t]=new Ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new Ye(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new Ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function qf(e,t,n,r){var i=Ae.hasOwnProperty(t)?Ae[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+su+e}var ou=!1;function au(e,t){if(!e||ou)return"";ou=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),s=r.stack.split(`
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{ou=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function C2(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=au(e.type,!1),e;case 11:return e=au(e.type.render,!1),e;case 1:return e=au(e.type,!0),e;default:return""}}function ic(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Gr:return"Fragment";case Yr:return"Portal";case tc:return"Profiler";case Qf:return"StrictMode";case nc:return"Suspense";case rc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hy:return(e.displayName||"Context")+".Consumer";case Wy:return(e._context.displayName||"Context")+".Provider";case Yf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gf:return t=e.displayName||null,t!==null?t:ic(e.type)||"Memo";case Cn:t=e._payload,e=e._init;try{return ic(e(t))}catch{}}return null}function E2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ic(t);case 8:return t===Qf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k2(e){var t=qy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _o(e){e._valueTracker||(e._valueTracker=k2(e))}function Qy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function La(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function sc(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ih(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yy(e,t){t=t.checked,t!=null&&qf(e,"checked",t,!1)}function oc(e,t){Yy(e,t);var n=Yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ac(e,t.type,n):t.hasOwnProperty("defaultValue")&&ac(e,t.type,Yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _h(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ac(e,t,n){(t!=="number"||La(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ms=Array.isArray;function di(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Yn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function lc(e,t){if(t.dan Line truncated
`).replace(FS,"")}function Ko(e,t,n){if(t=ap(t),ap(e)!==t&&n)throw Error(L(425))}function $a(){}var Sc=null,bc=null;function Pc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cc=typeof setTimeout=="function"?setTimeout:void 0,IS=typeof clearTimeout=="function"?clearTimeout:void 0,lp=typeof Promise=="function"?Promise:void 0,_S=typeof queueMicrotask=="function"?queueMicrotask:typeof lp<"u"?function(e){return lp.resolve(null).then(e).catch(VS)}:Cc;function VS(e){setTimeout(function(){throw e})}function xu(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),zs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);zs(t)}function zn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function up(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qi=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Qi,Qs="__reactProps$"+Qi,pn="__reactContainer$"+Qi,Ec="__reactEvents$"+Qi,$S="__reactListeners$"+Qi,US="__reactHandles$"+Qi;function hr(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=up(e);e!==null;){if(n=e[Ht])return n;e=up(e)}return t}e=n,n=e.parentNode}return null}function bo(e){return e=e[Ht]||e[pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ei(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Tl(e){return e[Qs]||null}var kc=[],ti=-1;function tr(e){return{current:e}}function le(e){0>ti||(e.current=kc[ti],kc[ti]=null,ti--)}function ie(e,t){ti++,kc[ti]=e.current,e.current=t}var Gn={},Be=tr(Gn),Ze=tr(!1),jr=Gn;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Gn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function Ua(){le(Ze),le(Be)}function cp(e,t,n){if(Be.current!==Gn)throw Error(L(168));ie(Be,t),ie(Ze,n)}function I0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,E2(e)||"Unknown",i));return pe({},n,r)}function Ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gn,jr=Be.current,ie(Be,e),ie(Ze,Ze.current),!0}function fp(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=I0(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,le(Ze),le(Be),ie(Be,e)):le(Ze),ie(Ze,n)}var rn=null,Ol=!1,Su=!1;function _0(e){rn===null?rn=[e]:rn.push(e)}function BS(e){Ol=!0,_0(e)}function nr(){if(!Su&&rn!==null){Su=!0;var e=0,t=re;try{var n=rn;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rn=null,Ol=!1}catch(i){throw rn!==null&&(rn=rn.slice(e+1)),u0(Jf,nr),i}finally{re=t,Su=!1}}return null}var ni=[],ri=0,za=null,Wa=0,St=[],bt=0,Nr=null,an=1,ln="";function lr(e,t){ni[ri++]=Wa,ni[ri++]=za,za=e,Wa=t}function V0(e,t,n){St[bt++]=an,St[bt++]=ln,St[bt++]=Nr,Nr=e;var r=an;e=ln;var i=32-Lt(r)-1;r&=~(1<<i),n+=1;var s=32-Lt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,an=1<<32-Lt(t)+i|n<<i|r,ln=s+e}else an=1<<s|n<<i|r,ln=e}function ad(e){e.return!==null&&(lr(e,1),V0(e,1,0))}function ld(e){for(;e===za;)za=ni[--ri],ni[ri]=null,Wa=ni[--ri],ni[ri]=null;for(;e===Nr;)Nr=St[--bt],St[bt]=null,ln=St[--bt],St[bt]=null,an=St[--bt],St[bt]=null}var lt=null,at=null,ce=!1,Nt=null;function $0(e,t){var n=Pt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function dp(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,at=zn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Nr!==null?{id:an,overflow:ln}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Pt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lt=e,at=null,!0):!1;default:return!1}}function Tc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Oc(e){if(ce){var t=at;if(t){var n=t;if(!dp(e,t)){if(Tc(e))throw Error(L(418));t=zn(n.nextSibling);var r=lt;t&&dp(e,t)?$0(r,n):(e.flags=e.flags&-4097|2,ce=!1,lt=e)}}else{if(Tc(e))throw Error(L(418));e.flags=e.flags&-4097|2,ce=!1,lt=e}}}function hp(e){for(e=e Line truncated
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function ku(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Lc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var XS=typeof WeakMap=="function"?WeakMap:Map;function pv(e,t,n){n=un(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ja||(Ja=!0,Bc=r),Lc(e,t)},n}function mv(e,t,n){n=un(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Lc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Lc(e,t),typeof r!="function"&&(Hn===null?Hn=new Set([this]):Hn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Sp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new XS;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=fb.bind(null,e,t,n),t.then(e,e))}function bp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Pp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=un(-1,1),t.tag=2,Wn(n,t,1))),n.lanes|=1),e)}var JS=wn.ReactCurrentOwner,Je=!1;function He(e,t,n,r){t.child=e===null?q0(t,null,n,r):Fi(t,e.child,n,r)}function Cp(e,t,n,r,i){n=n.render;var s=t.ref;return gi(t,i),r=wd(e,t,n,r,s,i),n=xd(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gn(e,t,i)):(ce&&n&&ad(t),t.flags|=1,He(e,t,r,i),t.child)}function Ep(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!jd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gv(e,t,s,r,i)):(e=xa(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Hs,n(o,r)&&e.ref===t.ref)return gn(e,t,i)}return t.flags|=1,e=qn(s,r),e.ref=t.ref,e.return=t,t.child=e}function gv(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Hs(s,r)&&e.ref===t.ref)if(Je=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Je=!0);else return t.lanes=e.lanes,gn(e,t,i)}return Dc(e,t,n,r,i)}function yv(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(oi,ot),ot|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(oi,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ie(oi,ot),ot|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ie(oi,ot),ot|=r;return He(e,t,i,n),t.child}function vv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dc(e,t,n,r,i){var s=et(n)?jr:Be.current;return s=Mi(t,s),gi(t,i),n=wd(e,t,n,r,s,i),r=xd(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,gn(e,t,i)):(ce&&r&&ad(t),t.flags|=1,He(e,t,n,i),t.child)}function kp(e,t,n,r,i){if(et(n)){var s=!0;Ba(t)}else s=!1;if(gi(t,i),t.stateNode===null)ya(e,t),H0(t,n,r),Nc(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Et(u):(u=et(n)?jr:Be.current,u=Mi(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&yp(t,o,r,u),En=!1;var d=t.memoizedState;o.state=d,qa(t,r,o,i),l=t.memoizedState,a!==r||d!==l||Ze.current||En?(typeof c=="function"&&(jc(t,n,c,r),l=t.memoizedState),(a=En||gp(t,n,a,r,d,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,z0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Rt(t.type,a),o.props=u,f=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=et(n)?jr:Be.current,l=Mi(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==l)&&yp(t,o,r,l),En=!1,d=t.memoizedState,o.state=d,qa(t,r,o,i);var m=t.memoizedS Line truncated
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&sC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Xp=Symbol("internals");function us(e){return e&&String(e).trim().toLowerCase()}function Ca(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ca):String(e)}function aC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const lC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nu(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function uC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cC(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let rt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=us(l);if(!c)throw new Error("header name must be a non-empty string");const f=R.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Ca(a))}const o=(a,l)=>R.forEach(a,(u,c)=>s(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(R.isString(t)&&(t=t.trim())&&!lC(t))o(oC(t),n);else if(R.isObject(t)&&R.isIterable(t)){let a={},l,u;for(const c of t){if(!R.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?R.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=us(t),t){const r=R.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return aC(i);if(R.isFunction(n))return n.call(this,i,r);if(R.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=us(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=us(o),o){const a=R.findKey(r,o);a&&(!n||Nu(r,r[a],a,n))&&(delete r[a],i=!0)}}return R.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Nu(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return R.forEach(this,(i,s)=>{const o=R.findKey(r,s);if(o){n[o]=Ca(i),delete n[s];return}const a=t?uC(s):String(s).trim();a!==s&&delete n[s],n[a]=Ca(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Xp]=this[Xp]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=us(o);r[a]||(cC(i,o),r[a]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}};rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(rt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(rt);function Lu(e,t){const n=this||To,r=t||n,i=rt.from(r.headers);let s=r.data;return R.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function h1(e){return!!(e&&e.__CANCEL__)}function Xi(e,t,n){Y.call(this,e??"canceled",Y.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Xi,Y,{__CANCEL__:!0});function p1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(d*1e3/h):void 0}}function hC(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const sl=(e,t,n=3)=>{let r=0;const i=dC(50,250);return hC(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Jp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Zp=e=>(...t)=>R.asap(()=>e(...t)),pC=$e.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$e.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($e.origin),$e.navigator&&/(msie|trident)/i.test($e.navigator.userAgent)):()=>!0,mC=$e.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),R.isString(r)&&o.push("path="+r),R.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function m1(e,t,n){let r=!gC(t);return e&&(r||n==!1)?yC(e,t):t}const em=e=>e instanceof rt?{...e}:e;function Fr(e,t){t=t||{};const n={};function r(u,c,f,d){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:d},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(u,c,f,d){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u,f,d)}else return r(u,c,f,d)}function s(u,c){if(!R.isUndefined(c))return r(void 0,c)}function o(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,f)=>i(em(u),em(c),f,!0)};return R.forEach(Object.keys({...e,...t}),function(c){const f=l[c]||i,d=f(e[c],t[c],c);R.isUndefined(d)&&f!==a||(n[c]=d)}),n}const g1=e=>{const t=Fr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;if(t.headers=o=rt.from(o),t.url=c1(m1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),R.isFormData(n)){if($e.hasStandardBrowserEnv||$e.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(R.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,f])=>{u.includes(c.toLowerCase())&&o.set(c,f)})}}if($e.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&pC(t.url))){const Line truncated
`+o.map(om).join(`
`):" "+om(o[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:lf};function Du(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xi(null,e)}function am(e){return Du(e),e.headers=rt.from(e.headers),e.data=Lu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),v1.getAdapter(e.adapter||To.adapter,e)(e).then(function(r){return Du(e),r.data=Lu.call(e,e.transformResponse,r),r.headers=rt.from(r.headers),r},function(r){return h1(r)||(Du(e),r&&r.response&&(r.response.data=Lu.call(e,e.transformResponse,r.response),r.response.headers=rt.from(r.response.headers))),Promise.reject(r)})}const w1="1.12.2",zl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lm={};zl.transitional=function(t,n,r){function i(s,o){return"[Axios v"+w1+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new Y(i(o," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!lm[o]&&(lm[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};zl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function OC(e,t,n){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new Y("option "+s+" must be "+l,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const Ea={assertOptions:OC,validators:zl},_t=Ea.validators;let Tr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Gp,response:new Gp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ea.assertOptions(r,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:Ea.assertOptions(i,{encode:_t.function,serialize:_t.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ea.assertOptions(n,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=rt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(l=l&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let c,f=0,d;if(!l){const m=[am.bind(this),void 0];for(m.unshift(...a),m.push(...u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=a.length;let h=n;for(;f<d;){const m=a[f++],w=a[f++];try{h=m(h)}catch(x){w.call(this,x);break}}try{c=am.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=Fr(this.defaults,t);const n=m1(t.baseURL,t.url,t.allowAbsoluteUrls);return c1(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Tr.prototype[t]=function(n,r){return this.request(Fr(r||{},{method:t,url:n,data:(r||{}).data}))}});R.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Fr(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Tr.prototype[t]=n(),Tr.prototype[t+"Form"]=n(!0)});let RC=class x1{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Xi(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new x1(function(i){t=i}),cancel:t}}};function jC(e){return function(n){return e.apply(null,n)}}function NC(e){return R.isObject(e)&&e.isAxiosError===!0}const uf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uf).forEach(([e,t])=>{uf[t]=e});function S1(e){const t=new Tr(e),n=Jv(Tr.prototype.request,t);return R.extend(n,Tr.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return S1(Fr(e,i))},n}const Se=S1(To);Se.Axios=Tr;Se.CanceledError=Xi;Se.CancelToken=RC;Se.isCancel=h1;Se.VERSION=w1;Se.toFormData=Bl;Se.AxiosError=Y;Se.Cancel=Se.CanceledError;Se.all=function(t){return Promise.all(t)};Se.spread=jC;Se.isAxiosError=NC;Se.mergeConfig=Fr;Se.AxiosHeaders=rt;Se.formToJSON=e=>d1(R.isHTMLForm(e)?new FormData(e):e);Se.getAdapter=v1.getAdapter;Se.HttpStatusCode=uf;Se.default=Se;const{Axi Line truncated
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(this,arguments)}var Vn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vn||(Vn={}));const um="popstate";function LC(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return cf("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ol(i)}return MC(t,n,null,e)}function Pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function b1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DC(){return Math.random().toString(36).substr(2,8)}function cm(e,t){return{usr:e.state,key:e.key,idx:t}}function cf(e,t,n,r){return n===void 0&&(n=null),no({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:n,key:t&&t.key||r||DC()})}function ol(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ji(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function MC(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Vn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(no({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Vn.Pop;let x=c(),y=x==null?null:x-u;u=x,l&&l({action:a,location:w.location,delta:y})}function d(x,y){a=Vn.Push;let g=cf(w.location,x,y);u=c()+1;let v=cm(g,u),b=w.createHref(g);try{o.pushState(v,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(b)}s&&l&&l({action:a,location:w.location,delta:1})}function h(x,y){a=Vn.Replace;let g=cf(w.location,x,y);u=c();let v=cm(g,u),b=w.createHref(g);o.replaceState(v,"",b),s&&l&&l({action:a,location:w.location,delta:0})}function m(x){let y=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof x=="string"?x:ol(x);return g=g.replace(/ $/,"%20"),Pe(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let w={get action(){return a},get location(){return e(i,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(um,f),l=x,()=>{i.removeEventListener(um,f),l=null}},createHref(x){return t(i,x)},createURL:m,encodeLocation(x){let y=m(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(x){return o.go(x)}};return w}var fm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fm||(fm={}));function AC(e,t,n){return n===void 0&&(n="/"),FC(e,t,n)}function FC(e,t,n,r){let i=typeof t=="string"?Ji(t):t,s=Ud(i.pathname||"/",n);if(s==null)return null;let o=P1(e);IC(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=YC(s);a=KC(o[l],u)}return a}function P1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Pe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Qn([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(Pe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),P1(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:WC(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of C1(s.path))i(s,o,l)}),t}function C1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=C1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function IC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:HC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const _C=/^:[\w-]+$/,VC=3,$C=2,UC=1,BC=10,zC=-2,dm=e=>e==="*";function WC(e,t){let n=e.split("/"),r=n.length;return n.some(dm)&&(r+=zC),t&&(r+=$C),n.filter(i=>!dm(i)).reduce((i,s)=>i+(_C.test(s)?VC:s===""?UC:BC),r)}function HC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function KC(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",f=qC({path:l.relativePath,caseSensitive:l.caseSeLine truncated
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ro.apply(this,arguments)}const Bd=S.createContext(null),iE=S.createContext(null),Br=S.createContext(null),Wl=S.createContext(null),rr=S.createContext({outlet:null,matches:[],isDataRoute:!1}),O1=S.createContext(null);function sE(e,t){let{relative:n}=t===void 0?{}:t;Oo()||Pe(!1);let{basename:r,navigator:i}=S.useContext(Br),{hash:s,pathname:o,search:a}=j1(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qn([r,o])),i.createHref({pathname:l,search:a,hash:s})}function Oo(){return S.useContext(Wl)!=null}function Hl(){return Oo()||Pe(!1),S.useContext(Wl).location}function R1(e){S.useContext(Br).static||S.useLayoutEffect(e)}function oE(){let{isDataRoute:e}=S.useContext(rr);return e?SE():aE()}function aE(){Oo()||Pe(!1);let e=S.useContext(Bd),{basename:t,future:n,navigator:r}=S.useContext(Br),{matches:i}=S.useContext(rr),{pathname:s}=Hl(),o=JSON.stringify(E1(i,n.v7_relativeSplatPath)),a=S.useRef(!1);return R1(()=>{a.current=!0}),S.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=k1(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Qn([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,s,e])}const lE=S.createContext(null);function uE(e){let t=S.useContext(rr).outlet;return t&&S.createElement(lE.Provider,{value:e},t)}function j1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=S.useContext(Br),{matches:i}=S.useContext(rr),{pathname:s}=Hl(),o=JSON.stringify(E1(i,r.v7_relativeSplatPath));return S.useMemo(()=>k1(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function cE(e,t){return fE(e,t)}function fE(e,t,n,r){Oo()||Pe(!1);let{navigator:i}=S.useContext(Br),{matches:s}=S.useContext(rr),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Hl(),c;if(t){var f;let x=typeof t=="string"?Ji(t):t;l==="/"||(f=x.pathname)!=null&&f.startsWith(l)||Pe(!1),c=x}else c=u;let d=c.pathname||"/",h=d;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=AC(e,{pathname:h}),w=gE(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Qn([l,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Qn([l,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,n,r);return t&&w?S.createElement(Wl.Provider,{value:{location:ro({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vn.Pop}},w):w}function dE(){let e=xE(),t=nE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,null)}const hE=S.createElement(dE,null);class pE extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(rr.Provider,{value:this.props.routeContext},S.createElement(O1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mE(e){let{routeContext:t,match:n,children:r}=e,i=S.useContext(Bd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(rr.Provider,{value:t},r)}function gE(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Pe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:d,errors:h}=n,m=f.route.loader&&d[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let h,m=!1,w=nuLine truncated
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hf.apply(this,arguments)}function TE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function OE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RE(e,t){return e.button===0&&(!t||t==="_self")&&!OE(e)}const jE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],NE="6";try{window.__reactRouterVersion=NE}catch{}const LE="startTransition",pm=d2[LE];function DE(e){let{basename:t,children:n,future:r,window:i}=e,s=S.useRef();s.current==null&&(s.current=LC({window:i,v5Compat:!0}));let o=s.current,[a,l]=S.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=S.useCallback(f=>{u&&pm?pm(()=>l(f)):l(f)},[l,u]);return S.useLayoutEffect(()=>o.listen(c),[o,c]),S.useEffect(()=>PE(r),[r]),S.createElement(EE,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const ME=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,M1=S.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,d=TE(t,jE),{basename:h}=S.useContext(Br),m,w=!1;if(typeof u=="string"&&AE.test(u)&&(m=u,ME))try{let v=new URL(window.location.href),b=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Ud(b.pathname,h);b.origin===v.origin&&C!=null?u=C+b.search+b.hash:w=!0}catch{}let x=sE(u,{relative:i}),y=FE(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:f});function g(v){r&&r(v),v.defaultPrevented||y(v)}return S.createElement("a",hf({},d,{href:m||x,onClick:w||s?r:g,ref:n,target:l}))});var mm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mm||(mm={}));var gm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gm||(gm={}));function FE(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,l=oE(),u=Hl(),c=j1(e,{relative:o});return S.useCallback(f=>{if(RE(f,n)){f.preventDefault();let d=r!==void 0?r:ol(u)===ol(c);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,r,i,n,e,s,o,a])}var IE=({as:e="div",...t},n)=>p.jsx(e,{...t,ref:n}),_E=S.forwardRef(IE),VE="https://challenges.cloudflare.com/turnstile/v0/api.js",zd="cf-turnstile-script",$E="cf-turnstile",Wd="onloadTurnstileCallback",A1=e=>!!document.getElementById(e),UE=({render:e="explicit",onLoadCallbackName:t=Wd,scriptOptions:{nonce:n="",defer:r=!0,async:i=!0,id:s="",appendTo:o,onError:a,crossOrigin:l=""}={}})=>{let u=s||zd;if(A1(u))return;let c=document.createElement("script");c.id=u,c.src=`${VE}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${c.src}"]`)&&(c.defer=!!r,c.async=!!i,n&&(c.nonce=n),l&&(c.crossOrigin=l),a&&(c.onerror=a,delete window[t]),(o==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(c))},or={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function BE(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function zE(e=zd){let[t,n]=S.useState(!1);return S.useEffect(()=>{let r=()=>{A1(e)&&n(!0)},i=new MutationObserver(r);return i.observe(document,{childList:!0,subtree:!0}),r(),()=>{i.disconnect()}},[e]),t}var Ls="unloaded",F1,WE=new Promise((e,t)=>{F1={resolve:e,reject:t},Ls==="ready"&&e(void 0)}),HE=(e=Wd)=>(Ls==="unloaded"&&(Ls="loading",window[e]=()=>{F1.resolve(),Ls="ready",delete window[e]}),WE),I1=S.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:i,onWidgetLoad:s,onSuccess:o,onExpire:a,onError:l,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d,onLoadScript:h,id:m,style:w,as:x="div",injectScript:y=!0,rerenderOnCallbackChange:g=!1,...v}=e,b=r.size,C=S.useCallback(()=>typeof b>"u"?{}:r.execution==="execute"?or.invisible:r.appearance==="interaction-only"?or.interactionOnly:or[b],[r.execution,b,r.appearance]),[T,k]=S.useState(C()),O=S.useRef(null),[F,$]=S.useState(!1),B=S.useRef(),X=S.useRef(!1),me=m||$E,J=S.useRef({onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d});S.useEffect(()=>{g||(J.current={onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:f,onTimeout:d})});let E=(n==null?void 0:n.id)||zd,N=zE(E),_=(n==null?void 0:n.onLoadCallbackName)||Wd,j=r.appearance||"always",M=S.uLine truncated
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,Tk=yn`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,Ok=yn`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,Rk=ir("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${kk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${Tk} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${Ok} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,jk=yn`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,Nk=ir("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${jk} 1s linear infinite;
`,Lk=yn`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,Dk=yn`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,Mk=ir("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${Lk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${Dk} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,Ak=ir("div")`
position: absolute;
`,Fk=ir("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,Ik=yn`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,_k=ir("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${Ik} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,Vk=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?S.createElement(_k,null,t):t:n==="blank"?null:S.createElement(Fk,null,S.createElement(Nk,{...r}),n!=="loading"&&S.createElement(Ak,null,n==="error"?S.createElement(Rk,{...r}):S.createElement(Mk,{...r})))},$k=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,Uk=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,Bk="0%{opacity:0;} 100%{opacity:1;}",zk="0%{opacity:1;} 100%{opacity:0;}",Wk=ir("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,Hk=ir("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,Kk=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=W1()?[Bk,zk]:[$k(n),Uk(n)];return{animation:t?`${yn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${yn(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},qk=S.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Kk(e.position||t||"top-center",e.visible):{opacity:0},s=S.createElement(Vk,{toast:e}),o=S.createElement(Hk,{...e.ariaProps},al(e.message,e));return S.createElement(Wk,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:s,message:o}):S.createElement(S.Fragment,null,s,o))});gk(S.createElement);var Qk=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let s=S.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return S.createElement("div",{ref:s,className:t,style:n},i)},Yk=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:W1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Gk=Kl`
z-index: 9999;
> * {
pointer-events: auto;
}
`,ta=16,Xk=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:s,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:u}=Ek(n,s);return S.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:ta,left:ta,right:ta,bottom:ta,pointerEvents:"none",...o},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(c=>{let f=c.position||t,d=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),h=Yk(f,d);return S.createElement(Qk,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?Gk:"",style:h},c.type==="custom"?al(c.message,c):i?i(c):S.createElement(qk,{toast:c,position:f}))}))},Jk=Z;function se(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ir(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Y1=6048e5,Zk=864e5,na=43200,Pm=1440;let eT={};function jo(){return eT}function _r(e,t){var a,l,u,c;const n=jo(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=se(e),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ll(e){return _r(e,{weekStartsOn:1})}function G1(e){const t=se(e),n=t.getFullYear(),r=Ir(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=ll(r),s=Ir(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const o=ll(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Cm(e){const t=se(e);return t.setHours(0,0,0,0),t}function ul(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function tT(e,t){const n=Cm(e),r=Cm(t),i=n.getTime()-ul(n),s=r.getTime()-ul(r);return Math.round((i-s)/Zk)}function nT(e){const t=G1(e),n=Ir(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ll(n)}function Ta(e,t){const n=se(e),r=se(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function rT(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iT(e){if(!rT(e)&&typeof e!="number")return!1;const t=se(e);return!isNaN(Number(t))}function sT(e,t){const n=se(e),r=se(t),i=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();return i*12+s}function oT(e){return e?Math[e]:Math.trunc}function aT(e,t){return se(e).getTime()-se(t).getTime()}function lT(e){const t=se(e);return t.setHours(23,59,59,999),t}function uT(e){const t=se(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function cT(e){const t=se(e);return+lT(t)==+uT(t)}function fT(e,t){const n=se(e),r=se(t),i=Ta(n,r),s=Math.abs(sT(n,r));let o;if(s<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*s);let a=Ta(n,r)===-i;cT(se(e))&&s===1&&Ta(e,r)===1&&(a=!1),o=i*(s-Number(a))}return o===0?0:o}function dT(e,t,n){const r=aT(e,t)/1e3;return oT(n==null?void 0:n.roundingMethod)(r)}function hT(e){const t=se(e),n=Ir(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const pT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mT=(e,t,n)=>{let r;const i=pT[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function vi(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const gT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wT={date:vi({formats:gT,defaultWidth:"full"}),time:vi({formats:yT,defaultWidth:"full"}),d Line truncated
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${l}px !important;
left: ${u}px !important;
}
`),()=>{document.head.removeChild(c)}},[t]),p.jsx(sO,{isPresent:t,childRef:r,sizeRef:i,children:S.cloneElement(e,{ref:r})})}const aO=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Yl(lO),l=S.useId(),u=S.useCallback(f=>{a.set(f,!0);for(const d of a.values())if(!d)return;r&&r()},[a,r]),c=S.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),s?[Math.random(),u]:[n,u]);return S.useMemo(()=>{a.forEach((f,d)=>a.set(d,!1))},[n]),S.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=p.jsx(oO,{isPresent:n,children:e})),p.jsx(Gl.Provider,{value:c,children:e})};function lO(){return new Map}function ow(e=!0){const t=S.useContext(Gl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=S.useId();S.useEffect(()=>{e&&i(s)},[e]);const o=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const ra=e=>e.key||"";function Dm(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Qd=typeof window<"u",Yd=Qd?S.useLayoutEffect:S.useEffect,uO=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1})=>{const[a,l]=ow(o),u=S.useMemo(()=>Dm(e),[e]),c=o&&!a?[]:u.map(ra),f=S.useRef(!0),d=S.useRef(u),h=Yl(()=>new Map),[m,w]=S.useState(u),[x,y]=S.useState(u);Yd(()=>{f.current=!1,d.current=u;for(let b=0;b<x.length;b++){const C=ra(x[b]);c.includes(C)?h.delete(C):h.get(C)!==!0&&h.set(C,!1)}},[x,c.length,c.join("-")]);const g=[];if(u!==m){let b=[...u];for(let C=0;C<x.length;C++){const T=x[C],k=ra(T);c.includes(k)||(b.splice(C,0,T),g.push(T))}s==="wait"&&g.length&&(b=g),y(Dm(b)),w(u);return}const{forceRender:v}=S.useContext(Kd);return p.jsx(p.Fragment,{children:x.map(b=>{const C=ra(b),T=o&&!a?!1:u===x||c.includes(C),k=()=>{if(h.has(C))h.set(C,!0);else return;let O=!0;h.forEach(F=>{F||(O=!1)}),O&&(v==null||v(),y(d.current),o&&(l==null||l()),r&&r())};return p.jsx(aO,{isPresent:T,initial:!f.current||n?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:i,mode:s,onExitComplete:T?void 0:k,children:b},C)})})},ut=e=>e;let aw=ut;function Gd(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},cn=e=>e*1e3,fn=e=>e/1e3,cO={useManualTiming:!1};function fO(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&r?t:n;return c&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(u))}};return l}const ia=["read","resolveKeyframes","update","preRender","render","postRender"],dO=40;function lw(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=ia.reduce((y,g)=>(y[g]=fO(s),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=o,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,dO),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ia.reduce((y,g)=>{const v=o[g];return y[g]=(b,C=!1,T=!1)=>(n||m(),v.schedule(b,C,T)),y},{}),cancel:y=>{for(let g=0;g<ia.length;g++)o[ia[g]].cancel(y)},state:i,steps:o}}const{schedule:ue,cancel:Xn,state:De,steps:Au}=lw(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0),uw=S.createContext({strict:!1}),Mm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zi={};for(const e in Mm)zi[e]={isEnabled:t=>Mm[e].some(n=>!!t[n])};function hO(e){for(const t in e)zi[t]={...zi[t],...e[t]}}const pO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pO.has(e)}let cw=e=>!cl(e);function mO(e){e&&(cw=t=>t.startsWith("on")?!cl(t):e(t))}try{mO(require("@emotion/is-prop-valid").default)}catch{}function gO(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.v Line truncated
M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z;
M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z;
M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z;
M1 2h2.5L18.5 22h-2.5zM5.5 2h2.5L23 22h-2.5zM3 2h5v2h-5zM16 20h5v2h-5zM18.5 2h3.5L5 22h-3.5z`})})})}function G4({className:e}){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"512",height:"512",viewBox:"0 0 24 24",className:"h-6 w-6",fill:"currentColor",children:p.jsx("path",{d:"M1 150c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z",children:p.jsx("animate",{fill:"freeze",attributeName:"d",dur:"0.4s",keyTimes:"0;0.3;0.5;1",values:`M4 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z;
M8 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z;
M10 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z;
M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z`})})})}function X4(e){return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{color:"#0070f3",strokeWidth:"3",d:"m12 14 4-4"}),p.jsx("defs",{children:p.jsxs("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p.jsx("stop",{offset:"0%",style:{stopColor:"rgb(35, 35, 35)",stopOpacity:"1"}}),p.jsx("stop",{offset:"100%",style:{stopColor:"rgb(100,100,100)",stopOpacity:"1"}})]})}),p.jsx("path",{d:"M3.34 19a10 10 0 1 1 17.32 0",stroke:"url(#gradient)",strokeWidth:"3"})]})}function J4(){return p.jsxs("div",{className:"text-white w-full mt-auto flex flex-col items-center justify-between px-5 pt-16 mb-10 md:px-10 mx-auto sm:flex-row",children:[p.jsx(M1,{to:"/",className:"text-xl font-black leading-none select-none logo",children:"VMAIL.DEV"})," ",p.jsxs("p",{className:"mt-4 text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l sm:border-gray-200 sm:mt-0",children:["© 2024 Products of"," ",p.jsx("a",{className:"font-semibold underline hover:text-gray-600",href:"https://www.oiov.dev",target:"_blank",rel:"noopener noreferrer",children:"oiov"}),"."]}),p.jsxs("div",{className:"inline-flex justify-center mt-4 space-x-5 sm:ml-auto sm:mt-0 sm:justify-start",children:[p.jsx("a",{href:"https://wr.do",target:"_blank",rel:"noopener noreferrer",title:"WR.DO",className:"text-gray-400 hover:text-gray-500 scale-[1.2]",children:p.jsx(X4,{className:"w-6 h-6"})}),p.jsx("a",{href:"mailto:hi@oiov.dev",title:"Email",className:"text-gray-400 hover:text-gray-500",children:p.jsx(nw,{className:"w-6 h-6"})}),p.jsx("a",{href:"https://twitter.com/yesmoree",target:"_blank",rel:"noopener noreferrer",title:"Twitter",className:"text-gray-400 hover:text-gray-500",children:p.jsx(Y4,{})}),p.jsx("a",{href:"https://github.com/oiov/vmail",target:"_blank",rel:"noopener noreferrer",title:"Github",className:"text-gray-400 hover:text-gray-500",children:p.jsx(G4,{})})]})]})}function Z4(){return p.jsxs("div",{className:"mx-auto min-h-screen flex flex-col bg-[#1f2023]",children:[p.jsx(Q4,{}),p.jsx(CE,{}),p.jsx(J4,{}),p.jsx(Xk,{position:"bottom-right",toastOptions:{style:{background:"#333",color:"#fff"}}})]})}const eN=new _b;function tN(){const[e,t]=S.useState(null);return S.useEffect(()=>{Se.get("/config").then(n=>{t(n.data)})},[]),e?p.jsx(sw.Provider,{value:e,children:p.jsx(zb,{client:eN,children:p.jsx(DE,{children:p.jsx(kE,{children:p.jsx(ff,{element:p.jsx(Z4,{}),children:p.jsx(ff,{path:"/",element:p.jsx(B4,{})})})})})})}):p.jsx("div",{className:"bg-[#1f2023] text-white w-screen h-screen flex items-center justify-center",children:"Loading..."})}const q=e=>typeof e=="string",fs=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Yg=e=>e==null?"":""+e,nN=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},rN=/###/g,Gg=e=>e&&e.indexOf("###")>-1?e.replace(rN,"."):e,Xg=e=>!e||q(e),Is=(e,t,n)=>{const r=q(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Xg(e))return{};const s=Gg(r[i]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++i}return Xg(e)?{}:{obj:e,k:Gg(r[i])}},Jg=(e,t,n)=>{const{obj:r,k:i}=Is(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),a=Is(e,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=Is(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=n},iN=(e,t,n,r)=>{const{obj:i,k:s}=Is(e,t,Object);i[s]=i[s]||[],i[s].push(n)},yl=(e,t)=>{const{obj:n,k:r}=Is(e,t);if(n)return n[r]},sN=(e,t,n)=>{const r=yl(e,n);return r!==void 0?r:yl(t,n)},Ix=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ix(e[r],t[r],n):e[r]=t[r]);return e},qr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var oN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const aN=e=>q(e)?e.replace(/[&<>"'\/]/g,t=>oN[t]):e;class lN{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);re Line truncated
`)===0?j.substr(1,j.length):j}).forEach(function(j){var M=j.split(":"),D=M.shift().trim();if(D){var A=M.join(":").trim();N.append(D,A)}}),N}T.call(F.prototype);function X(E,N){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText=N.statusText===void 0?"":""+N.statusText,this.headers=new w(N.headers),this.url=N.url||"",this._initBody(E)}T.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},X.error=function(){var E=new X(null,{status:0,statusText:""});return E.type="error",E};var me=[301,302,303,307,308];X.redirect=function(E,N){if(me.indexOf(N)===-1)throw new RangeError("Invalid status code");return new X(null,{status:N,headers:{location:E}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,_){this.message=N,this.name=_;var j=Error(N);this.stack=j.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function J(E,N){return new Promise(function(_,j){var M=new F(E,N);if(M.signal&&M.signal.aborted)return j(new o.DOMException("Aborted","AbortError"));var D=new XMLHttpRequest;function A(){D.abort()}D.onload=function(){var K={status:D.status,statusText:D.statusText,headers:B(D.getAllResponseHeaders()||"")};K.url="responseURL"in D?D.responseURL:K.headers.get("X-Request-URL");var ve="response"in D?D.response:D.responseText;setTimeout(function(){_(new X(ve,K))},0)},D.onerror=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.ontimeout=function(){setTimeout(function(){j(new TypeError("Network request failed"))},0)},D.onabort=function(){setTimeout(function(){j(new o.DOMException("Aborted","AbortError"))},0)};function U(K){try{return K===""&&a.location.href?a.location.href:K}catch{return K}}D.open(M.method,U(M.url),!0),M.credentials==="include"?D.withCredentials=!0:M.credentials==="omit"&&(D.withCredentials=!1),"responseType"in D&&(l.blob?D.responseType="blob":l.arrayBuffer&&M.headers.get("Content-Type")&&M.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(D.responseType="arraybuffer")),N&&typeof N.headers=="object"&&!(N.headers instanceof w)?Object.getOwnPropertyNames(N.headers).forEach(function(K){D.setRequestHeader(K,h(N.headers[K]))}):M.headers.forEach(function(K,ve){D.setRequestHeader(ve,K)}),M.signal&&(M.signal.addEventListener("abort",A),D.onreadystatechange=function(){D.readyState===4&&M.signal.removeEventListener("abort",A)}),D.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return J.polyfill=!0,a.fetch||(a.fetch=J,a.Headers=w,a.Request=F,a.Response=X),o.Headers=w,o.Request=F,o.Response=X,o.fetch=J,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(la,la.exports)),la.exports}(function(e,t){var n=typeof fetch=="function"?fetch:void 0;if(typeof bs<"u"&&bs.fetch?n=bs.fetch:typeof window<"u"&&window.fetch&&(n=window.fetch),typeof HN<"u"&&typeof window>"u"){var r=n||KN();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Vf,Vf.exports);var Wx=Vf.exports;const Hx=Oy(Wx),fy=Ty({__proto__:null,default:Hx},[Wx]);function dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dy(Object(n),!0).forEach(function(r){qN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qN(e,t,n){return(t=QN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QN(e){var t=YN(e,"string");return Vr(t)=="symbol"?t:t+""}function YN(e,t){if(Vr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vr(e){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vr(e)}var Zn=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Zn=global.fetch:typeof window<"u"&&window.fetch&&(Zn=window.fetch);var ho;zx()&&(typeof global<"u"&&global.XMLHttpRequest?ho=global.XMLHttpRequest:typeof window<"u"&&win Line truncated
@@ -0,0 +1,341 @@
var Yw=Object.defineProperty;var Ah=e=>{throw TypeError(e)};var Xw=(e,t,n)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Lh=(e,t,n)=>Xw(e,typeof t!="symbol"?t+"":t,n),su=(e,t,n)=>t.has(e)||Ah("Cannot "+n);var P=(e,t,n)=>(su(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?Ah("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(su(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(su(e,t,"access private method"),n);var Mo=(e,t,n,r)=>({set _(s){I(e,t,s,n)},get _(){return P(e,t,r)}});function Ny(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ry={exports:{}},Pl={},Ay={exports:{}},X={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xo=Symbol.for("react.element"),Jw=Symbol.for("react.portal"),Zw=Symbol.for("react.fragment"),e2=Symbol.for("react.strict_mode"),t2=Symbol.for("react.profiler"),n2=Symbol.for("react.provider"),r2=Symbol.for("react.context"),s2=Symbol.for("react.forward_ref"),i2=Symbol.for("react.suspense"),o2=Symbol.for("react.memo"),a2=Symbol.for("react.lazy"),Dh=Symbol.iterator;function l2(e){return e===null||typeof e!="object"?null:(e=Dh&&e[Dh]||e["@@iterator"],typeof e=="function"?e:null)}var Ly={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dy=Object.assign,My={};function Ks(e,t,n){this.props=e,this.context=t,this.refs=My,this.updater=n||Ly}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fy(){}Fy.prototype=Ks.prototype;function $d(e,t,n){this.props=e,this.context=t,this.refs=My,this.updater=n||Ly}var Bd=$d.prototype=new Fy;Bd.constructor=$d;Dy(Bd,Ks.prototype);Bd.isPureReactComponent=!0;var Mh=Array.isArray,Iy=Object.prototype.hasOwnProperty,zd={current:null},_y={key:!0,ref:!0,__self:!0,__source:!0};function Vy(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Iy.call(t,r)&&!_y.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:xo,type:e,key:i,ref:o,props:s,_owner:zd.current}}function u2(e,t){return{$$typeof:xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wd(e){return typeof e=="object"&&e!==null&&e.$$typeof===xo}function c2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fh=/\/+/g;function iu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?c2(""+e.key):t.toString(36)}function ua(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xo:case Jw:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+iu(o,0):r,Mh(s)?(n="",e!=null&&(n=e.replace(Fh,"$&/")+"/"),ua(s,t,n,"",function(u){return u})):s!=null&&(Wd(s)&&(s=u2(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Fh,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Mh(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+iu(i,a);o+=ua(i,t,n,l,s)}else if(l=l2(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+iu(i,a++),o+=ua(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Fo(e,t,n){if(e==null)return e;var r=[],s=0;return ua(e,r,"","",function(i){return t.call(n,i,s++)}),r}function d2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Qe={current:null},ca={transition:null},f2={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:ca,ReactCurrentOwner:zd};X.Children={map:Fo,forEach:function(e,t,n){Fo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fo(e,function(){t++}),t},toArray:function(e){return Fo(e,function(t){return t})||[]},only:function(e){if(!Wd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Ks;X.Fragment=Zw;X.Profiler=t2;X.PureComponent=$d;X.StrictMode=e2;X.Suspense=i2;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f2;X.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dy({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=zd.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Iy.call(t,l)&&!_y.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:xo,type:e.type,key:s,ref:i,props:r,_owner:o}};X.createContext=function(e){return e={$$typeof:r2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:n2,_context:e},e.Line truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var p2=b,m2=Symbol.for("react.element"),g2=Symbol.for("react.fragment"),y2=Object.prototype.hasOwnProperty,v2=p2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,x2={key:!0,ref:!0,__self:!0,__source:!0};function Uy(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)y2.call(t,r)&&!x2.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:m2,type:e,key:i,ref:o,props:s,_owner:v2.current}}Pl.Fragment=g2;Pl.jsx=Uy;Pl.jsxs=Uy;Ry.exports=Pl;var h=Ry.exports,ec={},$y={exports:{}},ft={},By={exports:{}},zy={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(O,D){var L=O.length;O.push(D);e:for(;0<L;){var M=L-1>>>1,$=O[M];if(0<s($,D))O[M]=D,O[L]=$,L=M;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var D=O[0],L=O.pop();if(L!==D){O[0]=L;e:for(var M=0,$=O.length,K=$>>>1;M<K;){var ve=2*(M+1)-1,pt=O[ve],W=ve+1,Re=O[W];if(0>s(pt,L))W<$&&0>s(Re,pt)?(O[M]=Re,O[W]=L,M=W):(O[M]=pt,O[ve]=L,M=ve);else if(W<$&&0>s(Re,L))O[M]=Re,O[W]=L,M=W;else break e}}return D}function s(O,D){var L=O.sortIndex-D.sortIndex;return L!==0?L:O.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,p=!1,m=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=O)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function S(O){if(x=!1,v(O),!m)if(n(l)!==null)m=!0,R(C);else{var D=n(u);D!==null&&_(S,D.startTime-O)}}function C(O,D){m=!1,x&&(x=!1,y(j),j=-1),p=!0;var L=f;try{for(v(D),d=n(l);d!==null&&(!(d.expirationTime>D)||O&&!B());){var M=d.callback;if(typeof M=="function"){d.callback=null,f=d.priorityLevel;var $=M(d.expirationTime<=D);D=e.unstable_now(),typeof $=="function"?d.callback=$:d===n(l)&&r(l),v(D)}else r(l);d=n(l)}if(d!==null)var K=!0;else{var ve=n(u);ve!==null&&_(S,ve.startTime-D),K=!1}return K}finally{d=null,f=L,p=!1}}var T=!1,E=null,j=-1,F=5,U=-1;function B(){return!(e.unstable_now()-U<F)}function J(){if(E!==null){var O=e.unstable_now();U=O;var D=!0;try{D=E(!0,O)}finally{D?me():(T=!1,E=null)}}else T=!1}var me;if(typeof g=="function")me=function(){g(J)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,k=Z.port2;Z.port1.onmessage=J,me=function(){k.postMessage(null)}}else me=function(){w(J,0)};function R(O){E=O,T||(T=!0,me())}function _(O,D){j=w(function(){O(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,R(C))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var D=3;break;default:D=f}var L=f;f=D;try{return O()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,D){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var L=f;f=O;try{return D()}finally{f=L}},e.unstable_scheduleCallback=function(O,D,L){var M=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?M+L:M):L=M,O){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=L+$,O={id:c++,callback:D,priorityLevel:O,startTime:L,expirationTime:$,sortIndex:-1},L>M?(O.sortIndex=L,t(u,O),n(l)===null&&O===n(u)&&(x?(y(j),j=-1):x=!0,_(S,L-M))):(O.sortIndex=$,t(l,O),m||p||(m=!0,R(C))),O},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(O){var D=f;return function(){var L=f;f=D;try{return O.apply(this,arguments)}finally{f=L}}}})(zy);By.exports=zy;var w2=By.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wy=b,ct=w2;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hy=new Set,_i={};function $r(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){for(_i[e]=t,e=0;e<t.length;e++)Hy.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tc=Object.prototype.hasOwnProperty,b2=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ih={},_h={};function S2(e){return tc.call(_h,e)?!0:tc.call(Ih,e)?!1:b2.test(e)?_h[e]=!0:(Ih[e]=!0,!1)}function P2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C2(e,t,n,r){if(t===null||typeof t>"u"||P2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Me[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Me[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Me[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Me[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Me[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Me[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Me[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Me[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Me[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hd=/[\-:]([a-z])/g;function Kd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Hd,Kd);Me[t]=new Ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Hd,Kd);Me[t]=new Ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Hd,Kd);Me[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Me[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Me.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Me[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function qd(e,t,n,r){var s=Me.hasOwnProperty(t)?Me[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+ou+e}var au=!1;function lu(e,t){if(!e||au)return"";au=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
`),i=r.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{au=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pi(e):""}function k2(e){switch(e.tag){case 5:return pi(e.type);case 16:return pi("Lazy");case 13:return pi("Suspense");case 19:return pi("SuspenseList");case 0:case 2:case 15:return e=lu(e.type,!1),e;case 11:return e=lu(e.type.render,!1),e;case 1:return e=lu(e.type,!0),e;default:return""}}function ic(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yr:return"Fragment";case Gr:return"Portal";case nc:return"Profiler";case Qd:return"StrictMode";case rc:return"Suspense";case sc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qy:return(e.displayName||"Context")+".Consumer";case Ky:return(e._context.displayName||"Context")+".Provider";case Gd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yd:return t=e.displayName||null,t!==null?t:ic(e.type)||"Memo";case Cn:t=e._payload,e=e._init;try{return ic(e(t))}catch{}}return null}function E2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ic(t);case 8:return t===Qd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T2(e){var t=Gy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _o(e){e._valueTracker||(e._valueTracker=T2(e))}function Yy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Gy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function La(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function oc(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xy(e,t){t=t.checked,t!=null&&qd(e,"checked",t,!1)}function ac(e,t){Xy(e,t);var n=Gn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?lc(e,t.type,n):t.hasOwnProperty("defaultValue")&&lc(e,t.type,Gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $h(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function lc(e,t,n){(t!=="number"||La(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mi=Array.isArray;function fs(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Gn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function uc(e,t){if(t.dan Line truncated
`).replace(Ib,"")}function Ko(e,t,n){if(t=cp(t),cp(e)!==t&&n)throw Error(A(425))}function $a(){}var Sc=null,Pc=null;function Cc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var kc=typeof setTimeout=="function"?setTimeout:void 0,_b=typeof clearTimeout=="function"?clearTimeout:void 0,dp=typeof Promise=="function"?Promise:void 0,Vb=typeof queueMicrotask=="function"?queueMicrotask:typeof dp<"u"?function(e){return dp.resolve(null).then(e).catch(Ub)}:kc;function Ub(e){setTimeout(function(){throw e})}function bu(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),zi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);zi(t)}function zn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function fp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Qs=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Qs,Qi="__reactProps$"+Qs,pn="__reactContainer$"+Qs,Ec="__reactEvents$"+Qs,$b="__reactListeners$"+Qs,Bb="__reactHandles$"+Qs;function pr(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fp(e);e!==null;){if(n=e[Ht])return n;e=fp(e)}return t}e=n,n=e.parentNode}return null}function So(e){return e=e[Ht]||e[pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function es(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(A(33))}function jl(e){return e[Qi]||null}var Tc=[],ts=-1;function tr(e){return{current:e}}function le(e){0>ts||(e.current=Tc[ts],Tc[ts]=null,ts--)}function se(e,t){ts++,Tc[ts]=e.current,e.current=t}var Yn={},Be=tr(Yn),Ze=tr(!1),Rr=Yn;function Ds(e,t){var n=e.type.contextTypes;if(!n)return Yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function et(e){return e=e.childContextTypes,e!=null}function Ba(){le(Ze),le(Be)}function hp(e,t,n){if(Be.current!==Yn)throw Error(A(168));se(Be,t),se(Ze,n)}function V0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(A(108,E2(e)||"Unknown",s));return pe({},n,r)}function za(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yn,Rr=Be.current,se(Be,e),se(Ze,Ze.current),!0}function pp(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=V0(e,t,Rr),r.__reactInternalMemoizedMergedChildContext=e,le(Ze),le(Be),se(Be,e)):le(Ze),se(Ze,n)}var rn=null,Nl=!1,Su=!1;function U0(e){rn===null?rn=[e]:rn.push(e)}function zb(e){Nl=!0,U0(e)}function nr(){if(!Su&&rn!==null){Su=!0;var e=0,t=re;try{var n=rn;for(re=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rn=null,Nl=!1}catch(s){throw rn!==null&&(rn=rn.slice(e+1)),d0(Jd,nr),s}finally{re=t,Su=!1}}return null}var ns=[],rs=0,Wa=null,Ha=0,bt=[],St=0,Ar=null,an=1,ln="";function ur(e,t){ns[rs++]=Ha,ns[rs++]=Wa,Wa=e,Ha=t}function $0(e,t,n){bt[St++]=an,bt[St++]=ln,bt[St++]=Ar,Ar=e;var r=an;e=ln;var s=32-At(r)-1;r&=~(1<<s),n+=1;var i=32-At(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,an=1<<32-At(t)+s|n<<s|r,ln=i+e}else an=1<<i|n<<s|r,ln=e}function lf(e){e.return!==null&&(ur(e,1),$0(e,1,0))}function uf(e){for(;e===Wa;)Wa=ns[--rs],ns[rs]=null,Ha=ns[--rs],ns[rs]=null;for(;e===Ar;)Ar=bt[--St],bt[St]=null,ln=bt[--St],bt[St]=null,an=bt[--St],bt[St]=null}var lt=null,at=null,ce=!1,Rt=null;function B0(e,t){var n=Pt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mp(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,at=zn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ar!==null?{id:an,overflow:ln}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Pt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lt=e,at=null,!0):!1;default:return!1}}function jc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Nc(e){if(ce){var t=at;if(t){var n=t;if(!mp(e,t)){if(jc(e))throw Error(A(418));t=zn(n.nextSibling);var r=lt;t&&mp(e,t)?B0(r,n):(e.flags=e.flags&-4097|2,ce=!1,lt=e)}}else{if(jc(e))throw Error(A(418));e.flags=e.flags&-4097|2,ce=!1,lt=e}}}function gp(e){for(e=e Line truncated
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Tu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Lc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jb=typeof WeakMap=="function"?WeakMap:Map;function gv(e,t,n){n=un(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Za||(Za=!0,zc=r),Lc(e,t)},n}function yv(e,t,n){n=un(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Lc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Lc(e,t),typeof r!="function"&&(Hn===null?Hn=new Set([this]):Hn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Cp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jb;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=fS.bind(null,e,t,n),t.then(e,e))}function kp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ep(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=un(-1,1),t.tag=2,Wn(n,t,1))),n.lanes|=1),e)}var Zb=xn.ReactCurrentOwner,Je=!1;function He(e,t,n,r){t.child=e===null?G0(t,null,n,r):Fs(t,e.child,n,r)}function Tp(e,t,n,r,s){n=n.render;var i=t.ref;return gs(t,s),r=wf(e,t,n,r,i,s),n=bf(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gn(e,t,s)):(ce&&n&&lf(t),t.flags|=1,He(e,t,r,s),t.child)}function jp(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Rf(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,vv(e,t,i,r,s)):(e=wa(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Hi,n(o,r)&&e.ref===t.ref)return gn(e,t,s)}return t.flags|=1,e=qn(i,r),e.ref=t.ref,e.return=t,t.child=e}function vv(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Hi(i,r)&&e.ref===t.ref)if(Je=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Je=!0);else return t.lanes=e.lanes,gn(e,t,s)}return Dc(e,t,n,r,s)}function xv(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(os,ot),ot|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(os,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(os,ot),ot|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(os,ot),ot|=r;return He(e,t,s,n),t.child}function wv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dc(e,t,n,r,s){var i=et(n)?Rr:Be.current;return i=Ds(t,i),gs(t,s),n=wf(e,t,n,r,i,s),r=bf(),e!==null&&!Je?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gn(e,t,s)):(ce&&r&&lf(t),t.flags|=1,He(e,t,n,s),t.child)}function Np(e,t,n,r,s){if(et(n)){var i=!0;za(t)}else i=!1;if(gs(t,s),t.stateNode===null)ya(e,t),q0(t,n,r),Ac(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=kt(u):(u=et(n)?Rr:Be.current,u=Ds(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&wp(t,o,r,u),kn=!1;var f=t.memoizedState;o.state=f,Qa(t,r,o,s),l=t.memoizedState,a!==r||f!==l||Ze.current||kn?(typeof c=="function"&&(Rc(t,n,c,r),l=t.memoizedState),(a=kn||xp(t,n,a,r,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,H0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),o.props=u,d=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=kt(l):(l=et(n)?Rr:Be.current,l=Ds(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&wp(t,o,r,l),kn=!1,f=t.memoizedState,o.state=f,Qa(t,r,o,s);var m=t.memoizedS Line truncated
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&oC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},em=Symbol("internals");function ui(e){return e&&String(e).trim().toLowerCase()}function Ca(e){return e===!1||e==null?e:N.isArray(e)?e.map(Ca):String(e)}function lC(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const uC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Au(e,t,n,r,s){if(N.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function cC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dC(e,t){const n=N.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let rt=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=ui(l);if(!c)throw new Error("header name must be a non-empty string");const d=N.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=Ca(a))}const o=(a,l)=>N.forEach(a,(u,c)=>i(u,c,l));if(N.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(N.isString(t)&&(t=t.trim())&&!uC(t))o(aC(t),n);else if(N.isObject(t)&&N.isIterable(t)){let a={},l,u;for(const c of t){if(!N.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?N.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ui(t),t){const r=N.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return lC(s);if(N.isFunction(n))return n.call(this,s,r);if(N.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ui(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Au(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ui(o),o){const a=N.findKey(r,o);a&&(!n||Au(r,r[a],a,n))&&(delete r[a],s=!0)}}return N.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Au(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return N.forEach(this,(s,i)=>{const o=N.findKey(r,i);if(o){n[o]=Ca(s),delete n[i];return}const a=t?cC(i):String(i).trim();a!==i&&delete n[i],n[a]=Ca(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return N.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&N.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[em]=this[em]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ui(o);r[a]||(dC(s,o),r[a]=!0)}return N.isArray(t)?t.forEach(i):i(t),this}};rt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(rt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});N.freezeMethods(rt);function Lu(e,t){const n=this||To,r=t||n,s=rt.from(r.headers);let i=r.data;return N.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function m1(e){return!!(e&&e.__CANCEL__)}function Xs(e,t,n){G.call(this,e??"canceled",G.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(Xs,G,{__CANCEL__:!0});function g1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function fC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function hC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function pC(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const ol=(e,t,n=3)=>{let r=0;const s=hC(50,250);return pC(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},tm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nm=e=>(...t)=>N.asap(()=>e(...t)),mC=Ue.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ue.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,gC=Ue.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];N.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),N.isString(r)&&o.push("path="+r),N.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function yC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function y1(e,t,n){let r=!yC(t);return e&&(r||n==!1)?vC(e,t):t}const rm=e=>e instanceof rt?{...e}:e;function Ir(e,t){t=t||{};const n={};function r(u,c,d,f){return N.isPlainObject(u)&&N.isPlainObject(c)?N.merge.call({caseless:f},u,c):N.isPlainObject(c)?N.merge({},c):N.isArray(c)?c.slice():c}function s(u,c,d,f){if(N.isUndefined(c)){if(!N.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!N.isUndefined(c))return r(void 0,c)}function o(u,c){if(N.isUndefined(c)){if(!N.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(rm(u),rm(c),d,!0)};return N.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||s,f=d(e[c],t[c],c);N.isUndefined(f)&&d!==a||(n[c]=f)}),n}const v1=e=>{const t=Ir({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=rt.from(o),t.url=f1(y1(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),N.isFormData(n)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(N.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&o.set(c,d)})}}if(Ue.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&mC(t.url))){const Line truncated
`+o.map(um).join(`
`):" "+um(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:ld};function Du(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xs(null,e)}function cm(e){return Du(e),e.headers=rt.from(e.headers),e.data=Lu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),w1.getAdapter(e.adapter||To.adapter,e)(e).then(function(r){return Du(e),r.data=Lu.call(e,e.transformResponse,r),r.headers=rt.from(r.headers),r},function(r){return m1(r)||(Du(e),r&&r.response&&(r.response.data=Lu.call(e,e.transformResponse,r.response),r.response.headers=rt.from(r.response.headers))),Promise.reject(r)})}const b1="1.12.2",Wl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dm={};Wl.transitional=function(t,n,r){function s(i,o){return"[Axios v"+b1+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new G(s(o," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!dm[o]&&(dm[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Wl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function NC(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new G("option "+i+" must be "+l,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+i,G.ERR_BAD_OPTION)}}const ka={assertOptions:NC,validators:Wl},_t=ka.validators;let jr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Zp,response:new Zp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ir(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ka.assertOptions(r,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),s!=null&&(N.isFunction(s)?n.paramsSerializer={serialize:s}:ka.assertOptions(s,{encode:_t.function,serialize:_t.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ka.assertOptions(n,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&N.merge(i.common,i[n.method]);i&&N.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=rt.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,d=0,f;if(!l){const m=[cm.bind(this),void 0];for(m.unshift(...a),m.push(...u),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=a.length;let p=n;for(;d<f;){const m=a[d++],x=a[d++];try{p=m(p)}catch(w){x.call(this,w);break}}try{c=cm.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Ir(this.defaults,t);const n=y1(t.baseURL,t.url,t.allowAbsoluteUrls);return f1(n,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){jr.prototype[t]=function(n,r){return this.request(Ir(r||{},{method:t,url:n,data:(r||{}).data}))}});N.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(Ir(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}jr.prototype[t]=n(),jr.prototype[t+"Form"]=n(!0)});let OC=class S1{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Xs(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new S1(function(s){t=s}),cancel:t}}};function RC(e){return function(n){return e.apply(null,n)}}function AC(e){return N.isObject(e)&&e.isAxiosError===!0}const ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ud).forEach(([e,t])=>{ud[t]=e});function P1(e){const t=new jr(e),n=e1(jr.prototype.request,t);return N.extend(n,jr.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return P1(Ir(e,s))},n}const be=P1(To);be.Axios=jr;be.CanceledError=Xs;be.CancelToken=OC;be.isCancel=m1;be.VERSION=b1;be.toFormData=zl;be.AxiosError=G;be.Cancel=be.CanceledError;be.all=function(t){return Promise.all(t)};be.spread=RC;be.isAxiosError=AC;be.mergeConfig=Ir;be.AxiosHeaders=rt;be.formToJSON=e=>p1(N.isHTMLForm(e)?new FormData(e):e);be.getAdapter=w1.getAdapter;be.HttpStatusCode=ud;be.default=be;const{Axi Line truncated
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(this,arguments)}var Vn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vn||(Vn={}));const fm="popstate";function LC(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return cd("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:al(s)}return MC(t,n,null,e)}function Pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function C1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DC(){return Math.random().toString(36).substr(2,8)}function hm(e,t){return{usr:e.state,key:e.key,idx:t}}function cd(e,t,n,r){return n===void 0&&(n=null),no({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Js(t):t,{state:n,key:t&&t.key||r||DC()})}function al(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Js(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function MC(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Vn.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(no({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=Vn.Pop;let w=c(),y=w==null?null:w-u;u=w,l&&l({action:a,location:x.location,delta:y})}function f(w,y){a=Vn.Push;let g=cd(x.location,w,y);u=c()+1;let v=hm(g,u),S=x.createHref(g);try{o.pushState(v,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(S)}i&&l&&l({action:a,location:x.location,delta:1})}function p(w,y){a=Vn.Replace;let g=cd(x.location,w,y);u=c();let v=hm(g,u),S=x.createHref(g);o.replaceState(v,"",S),i&&l&&l({action:a,location:x.location,delta:0})}function m(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof w=="string"?w:al(w);return g=g.replace(/ $/,"%20"),Pe(y,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,y)}let x={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(fm,d),l=w,()=>{s.removeEventListener(fm,d),l=null}},createHref(w){return t(s,w)},createURL:m,encodeLocation(w){let y=m(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(w){return o.go(w)}};return x}var pm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pm||(pm={}));function FC(e,t,n){return n===void 0&&(n="/"),IC(e,t,n)}function IC(e,t,n,r){let s=typeof t=="string"?Js(t):t,i=Bf(s.pathname||"/",n);if(i==null)return null;let o=k1(e);_C(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=YC(i);a=qC(o[l],u)}return a}function k1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Pe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Qn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Pe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),k1(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:HC(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of E1(i.path))s(i,o,l)}),t}function E1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=E1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function _C(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:KC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const VC=/^:[\w-]+$/,UC=3,$C=2,BC=1,zC=10,WC=-2,mm=e=>e==="*";function HC(e,t){let n=e.split("/"),r=n.length;return n.some(mm)&&(r+=WC),t&&(r+=$C),n.filter(s=>!mm(s)).reduce((s,i)=>s+(VC.test(i)?UC:i===""?BC:zC),r)}function KC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function qC(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=QC({path:l.relativePath,caseSensitive:l.caseSeLine truncated
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function ro(){return ro=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ro.apply(this,arguments)}const zf=b.createContext(null),ik=b.createContext(null),zr=b.createContext(null),Hl=b.createContext(null),rr=b.createContext({outlet:null,matches:[],isDataRoute:!1}),O1=b.createContext(null);function ok(e,t){let{relative:n}=t===void 0?{}:t;jo()||Pe(!1);let{basename:r,navigator:s}=b.useContext(zr),{hash:i,pathname:o,search:a}=A1(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Qn([r,o])),s.createHref({pathname:l,search:a,hash:i})}function jo(){return b.useContext(Hl)!=null}function Kl(){return jo()||Pe(!1),b.useContext(Hl).location}function R1(e){b.useContext(zr).static||b.useLayoutEffect(e)}function ak(){let{isDataRoute:e}=b.useContext(rr);return e?Sk():lk()}function lk(){jo()||Pe(!1);let e=b.useContext(zf),{basename:t,future:n,navigator:r}=b.useContext(zr),{matches:s}=b.useContext(rr),{pathname:i}=Kl(),o=JSON.stringify(T1(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return R1(()=>{a.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=j1(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Qn([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,i,e])}const uk=b.createContext(null);function ck(e){let t=b.useContext(rr).outlet;return t&&b.createElement(uk.Provider,{value:e},t)}function A1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(zr),{matches:s}=b.useContext(rr),{pathname:i}=Kl(),o=JSON.stringify(T1(s,r.v7_relativeSplatPath));return b.useMemo(()=>j1(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function dk(e,t){return fk(e,t)}function fk(e,t,n,r){jo()||Pe(!1);let{navigator:s}=b.useContext(zr),{matches:i}=b.useContext(rr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Kl(),c;if(t){var d;let w=typeof t=="string"?Js(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Pe(!1),c=w}else c=u;let f=c.pathname||"/",p=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=FC(e,{pathname:p}),x=yk(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Qn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Qn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&x?b.createElement(Hl.Provider,{value:{location:ro({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vn.Pop}},x):x}function hk(){let e=bk(),t=rk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:s},n):null,null)}const pk=b.createElement(hk,null);class mk extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?b.createElement(rr.Provider,{value:this.props.routeContext},b.createElement(O1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gk(e){let{routeContext:t,match:n,children:r}=e,s=b.useContext(zf);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(rr.Provider,{value:t},r)}function yk(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Pe(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:p}=n,m=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let p,m=!1,x=nuLine truncated
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function fd(){return fd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fd.apply(this,arguments)}function jk(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Nk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ok(e,t){return e.button===0&&(!t||t==="_self")&&!Nk(e)}const Rk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ak="6";try{window.__reactRouterVersion=Ak}catch{}const Lk="startTransition",ym=h2[Lk];function Dk(e){let{basename:t,children:n,future:r,window:s}=e,i=b.useRef();i.current==null&&(i.current=LC({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=b.useCallback(d=>{u&&ym?ym(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>Ck(r),[r]),b.createElement(Ek,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Mk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wf=b.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,f=jk(t,Rk),{basename:p}=b.useContext(zr),m,x=!1;if(typeof u=="string"&&Fk.test(u)&&(m=u,Mk))try{let v=new URL(window.location.href),S=u.startsWith("//")?new URL(v.protocol+u):new URL(u),C=Bf(S.pathname,p);S.origin===v.origin&&C!=null?u=C+S.search+S.hash:x=!0}catch{}let w=ok(u,{relative:s}),y=Ik(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function g(v){r&&r(v),v.defaultPrevented||y(v)}return b.createElement("a",fd({},f,{href:m||w,onClick:x||i?r:g,ref:n,target:l}))});var vm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vm||(vm={}));var xm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(xm||(xm={}));function Ik(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=ak(),u=Kl(),c=A1(e,{relative:o});return b.useCallback(d=>{if(Ok(d,n)){d.preventDefault();let f=r!==void 0?r:al(u)===al(c);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}var _k=({as:e="div",...t},n)=>h.jsx(e,{...t,ref:n}),Vk=b.forwardRef(_k),Uk="https://challenges.cloudflare.com/turnstile/v0/api.js",Hf="cf-turnstile-script",$k="cf-turnstile",Kf="onloadTurnstileCallback",F1=e=>!!document.getElementById(e),Bk=({render:e="explicit",onLoadCallbackName:t=Kf,scriptOptions:{nonce:n="",defer:r=!0,async:s=!0,id:i="",appendTo:o,onError:a,crossOrigin:l=""}={}})=>{let u=i||Hf;if(F1(u))return;let c=document.createElement("script");c.id=u,c.src=`${Uk}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${c.src}"]`)&&(c.defer=!!r,c.async=!!s,n&&(c.nonce=n),l&&(c.crossOrigin=l),a&&(c.onerror=a,delete window[t]),(o==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(c))},ar={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function zk(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function Wk(e=Hf){let[t,n]=b.useState(!1);return b.useEffect(()=>{let r=()=>{F1(e)&&n(!0)},s=new MutationObserver(r);return s.observe(document,{childList:!0,subtree:!0}),r(),()=>{s.disconnect()}},[e]),t}var Ai="unloaded",I1,Hk=new Promise((e,t)=>{I1={resolve:e,reject:t},Ai==="ready"&&e(void 0)}),Kk=(e=Kf)=>(Ai==="unloaded"&&(Ai="loading",window[e]=()=>{I1.resolve(),Ai="ready",delete window[e]}),Hk),qf=b.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:s,onWidgetLoad:i,onSuccess:o,onExpire:a,onError:l,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:d,onTimeout:f,onLoadScript:p,id:m,style:x,as:w="div",injectScript:y=!0,rerenderOnCallbackChange:g=!1,...v}=e,S=r.size,C=b.useCallback(()=>typeof S>"u"?{}:r.execution==="execute"?ar.invisible:r.appearance==="interaction-only"?ar.interactionOnly:ar[S],[r.execution,S,r.appearance]),[T,E]=b.useState(C()),j=b.useRef(null),[F,U]=b.useState(!1),B=b.useRef(),J=b.useRef(!1),me=m||$k,Z=b.useRef({onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:d,onTimeout:f});b.useEffect(()=>{g||(Z.current={onSuccess:o,onError:l,onExpire:a,onBeforeInteractive:u,onAfterInteractive:c,onUnsupported:d,onTimeout:f})});let k=(n==null?void 0:n.id)||Hf,R=Wk(k),_=(n==null?void 0:n.onLoadCallbackName)||Kf,O=r.appearance||"always",D=b.uLine truncated
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,jE=yn`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`,NE=yn`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`,OE=ir("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${TE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${jE} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary||"#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${NE} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`,RE=yn`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`,AE=ir("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary||"#e0e0e0"};
border-right-color: ${e=>e.primary||"#616161"};
animation: ${RE} 1s linear infinite;
`,LE=yn`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`,DE=yn`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`,ME=ir("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary||"#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${LE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${DE} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary||"#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`,FE=ir("div")`
position: absolute;
`,IE=ir("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`,_E=yn`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`,VE=ir("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${_E} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`,UE=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?b.createElement(VE,null,t):t:n==="blank"?null:b.createElement(IE,null,b.createElement(AE,{...r}),n!=="loading"&&b.createElement(FE,null,n==="error"?b.createElement(OE,{...r}):b.createElement(ME,{...r})))},$E=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,BE=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,zE="0%{opacity:0;} 100%{opacity:1;}",WE="0%{opacity:1;} 100%{opacity:0;}",HE=ir("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`,KE=ir("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`,qE=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=W1()?[zE,WE]:[$E(n),BE(n)];return{animation:t?`${yn(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${yn(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},QE=b.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?qE(e.position||t||"top-center",e.visible):{opacity:0},i=b.createElement(UE,{toast:e}),o=b.createElement(KE,{...e.ariaProps},ll(e.message,e));return b.createElement(HE,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:i,message:o}):b.createElement(b.Fragment,null,i,o))});yE(b.createElement);var GE=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let i=b.useCallback(o=>{if(o){let a=()=>{let l=o.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return b.createElement("div",{ref:i,className:t,style:n},s)},YE=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:W1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},XE=ql`
z-index: 9999;
> * {
pointer-events: auto;
}
`,ta=16,JE=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,toasterId:i,containerStyle:o,containerClassName:a})=>{let{toasts:l,handlers:u}=EE(n,i);return b.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:ta,left:ta,right:ta,bottom:ta,pointerEvents:"none",...o},className:a,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(c=>{let d=c.position||t,f=u.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),p=YE(d,f);return b.createElement(GE,{id:c.id,key:c.id,onHeightUpdate:u.updateHeight,className:c.visible?XE:"",style:p},c.type==="custom"?ll(c.message,c):s?s(c):b.createElement(QE,{toast:c,position:d}))}))},ZE=Y;function ie(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function _r(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const G1=6048e5,e3=864e5,na=43200,Em=1440;let t3={};function Oo(){return t3}function Vr(e,t){var a,l,u,c;const n=Oo(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,s=ie(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function ul(e){return Vr(e,{weekStartsOn:1})}function Y1(e){const t=ie(e),n=t.getFullYear(),r=_r(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=ul(r),i=_r(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=ul(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Tm(e){const t=ie(e);return t.setHours(0,0,0,0),t}function cl(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function n3(e,t){const n=Tm(e),r=Tm(t),s=n.getTime()-cl(n),i=r.getTime()-cl(r);return Math.round((s-i)/e3)}function r3(e){const t=Y1(e),n=_r(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ul(n)}function ja(e,t){const n=ie(e),r=ie(t),s=n.getTime()-r.getTime();return s<0?-1:s>0?1:s}function s3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function i3(e){if(!s3(e)&&typeof e!="number")return!1;const t=ie(e);return!isNaN(Number(t))}function o3(e,t){const n=ie(e),r=ie(t),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function a3(e){return e?Math[e]:Math.trunc}function l3(e,t){return ie(e).getTime()-ie(t).getTime()}function u3(e){const t=ie(e);return t.setHours(23,59,59,999),t}function c3(e){const t=ie(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function d3(e){const t=ie(e);return+u3(t)==+c3(t)}function f3(e,t){const n=ie(e),r=ie(t),s=ja(n,r),i=Math.abs(o3(n,r));let o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-s*i);let a=ja(n,r)===-s;d3(ie(e))&&i===1&&ja(e,r)===1&&(a=!1),o=s*(i-Number(a))}return o===0?0:o}function h3(e,t,n){const r=l3(e,t)/1e3;return a3(n==null?void 0:n.roundingMethod)(r)}function p3(e){const t=ie(e),n=_r(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const m3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},g3=(e,t,n)=>{let r;const s=m3[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function vs(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const y3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},v3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},x3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},w3={date:vs({formats:y3,defaultWidth:"full"}),time:vs({formats:v3,defaultWidth:"full"}),d Line truncated
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${l}px !important;
left: ${u}px !important;
}
`),()=>{document.head.removeChild(c)}},[t]),h.jsx(ij,{isPresent:t,childRef:r,sizeRef:s,children:b.cloneElement(e,{ref:r})})}const aj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=Yl(lj),l=b.useId(),u=b.useCallback(d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},[a,r]),c=b.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:d=>(a.set(d,!1),()=>a.delete(d))}),i?[Math.random(),u]:[n,u]);return b.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),b.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=h.jsx(oj,{isPresent:n,children:e})),h.jsx(Xl.Provider,{value:c,children:e})};function lj(){return new Map}function ax(e=!0){const t=b.useContext(Xl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=b.useId();b.useEffect(()=>{e&&s(i)},[e]);const o=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const ra=e=>e.key||"";function Mm(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Xf=typeof window<"u",Jf=Xf?b.useLayoutEffect:b.useEffect,uj=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=ax(o),u=b.useMemo(()=>Mm(e),[e]),c=o&&!a?[]:u.map(ra),d=b.useRef(!0),f=b.useRef(u),p=Yl(()=>new Map),[m,x]=b.useState(u),[w,y]=b.useState(u);Jf(()=>{d.current=!1,f.current=u;for(let S=0;S<w.length;S++){const C=ra(w[S]);c.includes(C)?p.delete(C):p.get(C)!==!0&&p.set(C,!1)}},[w,c.length,c.join("-")]);const g=[];if(u!==m){let S=[...u];for(let C=0;C<w.length;C++){const T=w[C],E=ra(T);c.includes(E)||(S.splice(C,0,T),g.push(T))}i==="wait"&&g.length&&(S=g),y(Mm(S)),x(u);return}const{forceRender:v}=b.useContext(Gf);return h.jsx(h.Fragment,{children:w.map(S=>{const C=ra(S),T=o&&!a?!1:u===w||c.includes(C),E=()=>{if(p.has(C))p.set(C,!0);else return;let j=!0;p.forEach(F=>{F||(j=!1)}),j&&(v==null||v(),y(f.current),o&&(l==null||l()),r&&r())};return h.jsx(aj,{isPresent:T,initial:!d.current||n?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:T?void 0:E,children:S},C)})})},ut=e=>e;let lx=ut;function Zf(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bs=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},cn=e=>e*1e3,dn=e=>e/1e3,cj={useManualTiming:!1};function dj(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const sa=["read","resolveKeyframes","update","preRender","render","postRender"],fj=40;function ux(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=sa.reduce((y,g)=>(y[g]=dj(i),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=o,p=()=>{const y=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(y-s.timestamp,fj),1),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:sa.reduce((y,g)=>{const v=o[g];return y[g]=(S,C=!1,T=!1)=>(n||m(),v.schedule(S,C,T)),y},{}),cancel:y=>{for(let g=0;g<sa.length;g++)o[sa[g]].cancel(y)},state:s,steps:o}}const{schedule:ue,cancel:Xn,state:Le,steps:Fu}=ux(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0),cx=b.createContext({strict:!1}),Fm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zs={};for(const e in Fm)zs[e]={isEnabled:t=>Fm[e].some(n=>!!t[n])};function hj(e){for(const t in e)zs[t]={...zs[t],...e[t]}}const pj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function dl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pj.has(e)}let dx=e=>!dl(e);function mj(e){e&&(dx=t=>t.startsWith("on")?!dl(t):e(t))}try{mj(require("@emotion/is-prop-valid").default)}catch{}function gj(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.v Line truncated
M8 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z;
M10 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z;
M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z`})})})}function BR(e){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 280 117",children:[h.jsx("path",{fill:"#FBAD41",d:"M205.52 50.813c-.858 0-1.705.03-2.551.058c-.137.007-.272.04-.398.094a1.424 1.424 0 0 0-.92.994l-3.628 12.672c-1.565 5.449-.983 10.48 1.646 14.174c2.41 3.416 6.42 5.421 11.289 5.655l19.679 1.194c.585.03 1.092.312 1.4.776a1.92 1.92 0 0 1 .2 1.692a2.496 2.496 0 0 1-2.134 1.662l-20.448 1.193c-11.11.515-23.062 9.58-27.255 20.633l-1.474 3.9a1.092 1.092 0 0 0 .967 1.49h70.425a1.872 1.872 0 0 0 1.81-1.365A51.172 51.172 0 0 0 256 101.828c0-28.16-22.582-50.984-50.449-50.984"}),h.jsx("path",{fill:"#F6821F",d:"m174.782 115.362l1.303-4.583c1.568-5.449.987-10.48-1.639-14.173c-2.418-3.417-6.424-5.422-11.296-5.656l-92.312-1.193a1.822 1.822 0 0 1-1.459-.776a1.919 1.919 0 0 1-.203-1.693a2.496 2.496 0 0 1 2.154-1.662l93.173-1.193c11.063-.511 23.015-9.58 27.208-20.633l5.313-14.04c.214-.596.27-1.238.156-1.86C191.126 20.51 166.91 0 137.96 0C111.269 0 88.626 17.403 80.5 41.596a26.996 26.996 0 0 0-19.156-5.359C48.549 37.524 38.25 47.946 36.979 60.88a27.905 27.905 0 0 0 .702 9.642C16.773 71.145 0 88.454 0 109.726c0 1.923.137 3.818.413 5.667c.115.897.879 1.57 1.783 1.568h170.48a2.223 2.223 0 0 0 2.106-1.63"})]})}function zR(){const e=ox(),{t}=sr(),n=_f(),[r,s]=b.useState(()=>Vt.get("userMailbox")),[i,o]=b.useState(()=>{const W=Vt.get("emailExpiry");return W?parseInt(W,10):void 0}),[a,l]=b.useState(""),[u,c]=b.useState([]),[d,f]=b.useState(!1),[p,m]=b.useState(null),[x,w]=b.useState(e.emailDomain[0]),[y,g]=b.useState(!1),{PasswordModal:v,setShowPasswordModal:S}=IR(),[C,T]=b.useState(!1),[E,j]=b.useState(!1),{data:F=[],isLoading:U,isFetching:B,refetch:J}=nP({queryKey:["emails",r],queryFn:()=>JT(r),enabled:!!r,refetchInterval:2e4,onError:W=>{Y.error(`${t("Failed to get emails")}: ${W.message}`,{duration:5e3})},retry:!1}),me=b.useCallback(W=>{Y(Re=>h.jsxs("div",{className:"w-full max-w-lg p-4 bg-slate-800 text-white rounded-lg shadow-lg border border-slate-700",children:[h.jsxs("div",{className:"flex items-center justify-between pb-2 mb-3 border-b border-slate-700",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(vd,{className:"h-6 w-6 text-cyan-400"}),h.jsx("h3",{className:"text-lg font-semibold",children:t("View password")})]}),h.jsx("button",{onClick:()=>Y.dismiss(Re.id),className:"p-1 rounded-full text-gray-400 hover:bg-slate-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-cyan-500","aria-label":"Close",children:h.jsx(Oh,{className:"h-5 w-5"})})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-sm text-gray-300",children:t("Save your password and continue using this email in 1 day")}),h.jsxs("div",{className:"mt-2 flex items-center text-sm bg-slate-700 px-2 py-1 rounded",children:[h.jsx("span",{className:"flex-1 font-mono break-all text-gray-100",children:W}),h.jsx(xd,{text:W,className:"p-1"})]}),h.jsx("p",{className:"mt-3 text-xs text-yellow-400",children:t("Remember your password, otherwise your email will expire and cannot be retrieved")})]})]}),{id:"password-notification",duration:5e3,position:"top-center",style:{background:"transparent",border:"none",padding:0,boxShadow:"none"}})},[t]),Z=b.useRef(F.length);b.useEffect(()=>{if(F.length>0&&!E&&j(!0),!r)j(!1),o(void 0),Y.dismiss("password-notification");else{const W=Vt.get("emailExpiry");W&&!i&&o(parseInt(W,10))}Z.current=F.length},[F,r,E,i]);const k=async()=>{if(!a){Y.error(t("No captcha response"));return}try{await ZT(a),f(!0);const W=`${_1("",nj())}@${x}`,Ft=Date.now()+24*60*60*1e3;Vt.set("userMailbox",W,{expires:1}),Vt.set("emailExpiry",Ft.toString(),{expires:1}),s(W),o(Ft),j(!1),Y.success(t("Email created successfully"))}catch(W){Y.error(t("Failed to verify captcha")),console.error("Turnstile verification failed:",W)}},R=()=>{Vt.remove("userMailbox"),Vt.remove("emailExpiry"),s(void 0),j(!1),m(null),o(void 0),n.invalidateQueries({queryKey:["emails"]})},_=()=>{J(),Y.success(t("Mailbox refreshed"))},O=b.useCallback(()=>{const W=Date.now()+864e5,Re=new Date(Date.now()+24*60*60*1e3);Vt.set("emailExpiry",W.toString(),{expires:Re}),o(W),Y.success(t("Validity reset successfully"))},[t]),D=rP({mutationFn:W=>ej(W),onSuccess:()=>{Y.success(t("Emails deleted successful Line truncated
"localPart": "mytest", // Optional: custom local part
"domain": "example.com", // Optional: email domain
"expiresIn": 86400 // Optional: expiry in seconds (default: 24h)
}`})}),h.jsxs("h4",{className:"text-cyan-200 font-semibold mb-2",children:[e("Response")," ",h.jsx("span",{className:"text-green-400",children:"201 Created"})]}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`{
"data": {
"id": "abc123xyz",
"address": "mytest@example.com",
"domain": "example.com",
"expiresAt": "2024-02-12T12:00:00.000Z",
"createdAt": "2024-02-11T12:00:00.000Z"
}
}`})})]}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[h.jsx("span",{className:"bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono",children:"GET"}),h.jsx("code",{className:"text-white font-mono",children:"/mailboxes/:id"})]}),h.jsx("p",{className:"text-gray-300 mb-4",children:e("Get mailbox information")}),h.jsxs("h4",{className:"text-cyan-200 font-semibold mb-2",children:[e("Response")," ",h.jsx("span",{className:"text-green-400",children:"200 OK"})]}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`{
"data": {
"id": "abc123xyz",
"address": "mytest@example.com",
"domain": "example.com",
"expiresAt": "2024-02-12T12:00:00.000Z",
"createdAt": "2024-02-11T12:00:00.000Z",
"messageCount": 5
}
}`})})]}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[h.jsx("span",{className:"bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono",children:"GET"}),h.jsx("code",{className:"text-white font-mono",children:"/mailboxes/:id/messages"})]}),h.jsx("p",{className:"text-gray-300 mb-4",children:e("Get inbox messages with pagination")}),h.jsx("h4",{className:"text-cyan-200 font-semibold mb-2",children:e("Query Parameters")}),h.jsx("div",{className:"overflow-x-auto mb-4",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"text-left text-gray-400 border-b border-gray-700",children:[h.jsx("th",{className:"pb-2 pr-4",children:e("Parameter")}),h.jsx("th",{className:"pb-2 pr-4",children:e("Type")}),h.jsx("th",{className:"pb-2 pr-4",children:e("Default")}),h.jsx("th",{className:"pb-2",children:e("Description")})]})}),h.jsxs("tbody",{className:"text-gray-300",children:[h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-yellow-400",children:"page"}),h.jsx("td",{className:"py-2 pr-4",children:"number"}),h.jsx("td",{className:"py-2 pr-4",children:"1"}),h.jsx("td",{className:"py-2",children:e("Page number")})]}),h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-yellow-400",children:"limit"}),h.jsx("td",{className:"py-2 pr-4",children:"number"}),h.jsx("td",{className:"py-2 pr-4",children:"20"}),h.jsx("td",{className:"py-2",children:e("Items per page (max 100)")})]}),h.jsxs("tr",{children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-yellow-400",children:"sort"}),h.jsx("td",{className:"py-2 pr-4",children:"string"}),h.jsx("td",{className:"py-2 pr-4",children:"desc"}),h.jsx("td",{className:"py-2",children:e("Sort order (asc/desc)")})]})]})]})}),h.jsxs("h4",{className:"text-cyan-200 font-semibold mb-2",children:[e("Response")," ",h.jsx("span",{className:"text-green-400",children:"200 OK"})]}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`{
"data": [
{
"id": "msg_001",
"from": { "address": "sender@example.com", "name": "Sender" },
"subject": "Hello World",
"preview": "This is a preview...",
"receivedAt": "2024-02-11T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 42,
"totalPages": 3,
"hasMore": true
}
}`})})]}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[h.jsx("span",{className:"bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono",children:"GET"}),h.jsx("code",{className:"text-white font-mono",children:"/mailboxes/:id/messages/:messageId"})]}),h.jsx("p",{className:"text-gray-300 mb-4",children:e("Get full message details")}),h.jsxs("h4",{className:"text-cyan-200 font-semibold mb-2",children:[e("Response")," ",h.jsx("span",{className:"text-green-400",children:"200 OK"})]}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`{
"data": {
"id": "msg_001",
"messageId": "<unique-id@sender.com>",
"from": { "address": "sender@example.com", "name": "Sender" },
"to": [{ "address": "mytest@example.com", "name": "" }],
"cc": [],
"bcc": [],
"replyTo": [],
"subject": "Hello World",
"text": "Plain text content...",
"html": "<html>...</html>",
"headers": [{ "name": "X-Custom", "value": "value" }],
"receivedAt": "2024-02-11T10:30:00.000Z"
}
}`})})]}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4 mb-6",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[h.jsx("span",{className:"bg-red-600 text-white px-2 py-1 rounded text-sm font-mono",children:"DELETE"}),h.jsx("code",{className:"text-white font-mono",children:"/mailboxes/:id/messages/:messageId"})]}),h.jsx("p",{className:"text-gray-300 mb-4",children:e("Delete a specific message")}),h.jsxs("h4",{className:"text-cyan-200 font-semibold mb-2",children:[e("Response")," ",h.jsx("span",{className:"text-green-400",children:"200 OK"})]}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`{
"data": {
"deleted": true,
"id": "msg_001"
}
}`})})]})]}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"text-2xl font-semibold text-cyan-300 mb-4",children:e("Error Responses")}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4",children:[h.jsx("p",{className:"text-gray-300 mb-4",children:e("All errors follow a consistent format:")}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm mb-4",children:h.jsx("code",{className:"text-gray-300",children:`{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message"
}
}`})}),h.jsx("h4",{className:"text-cyan-200 font-semibold mb-2",children:e("Error Codes")}),h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"text-left text-gray-400 border-b border-gray-700",children:[h.jsx("th",{className:"pb-2 pr-4",children:"Code"}),h.jsx("th",{className:"pb-2 pr-4",children:"HTTP Status"}),h.jsx("th",{className:"pb-2",children:e("Description")})]})}),h.jsxs("tbody",{className:"text-gray-300",children:[h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-red-400",children:"UNAUTHORIZED"}),h.jsx("td",{className:"py-2 pr-4",children:"401"}),h.jsx("td",{className:"py-2",children:e("Missing or invalid API Key")})]}),h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-red-400",children:"FORBIDDEN"}),h.jsx("td",{className:"py-2 pr-4",children:"403"}),h.jsx("td",{className:"py-2",children:e("API Key disabled/expired or no access")})]}),h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-red-400",children:"NOT_FOUND"}),h.jsx("td",{className:"py-2 pr-4",children:"404"}),h.jsx("td",{className:"py-2",children:e("Resource not found")})]}),h.jsxs("tr",{className:"border-b border-gray-700/50",children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-red-400",children:"VALIDATION_ERROR"}),h.jsx("td",{className:"py-2 pr-4",children:"400"}),h.jsx("td",{className:"py-2",children:e("Invalid request parameters")})]}),h.jsxs("tr",{children:[h.jsx("td",{className:"py-2 pr-4 font-mono text-red-400",children:"CONFLICT"}),h.jsx("td",{className:"py-2 pr-4",children:"409"}),h.jsx("td",{className:"py-2",children:e("Resource already exists")})]})]})]})})]})]}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"text-2xl font-semibold text-cyan-300 mb-4",children:e("Example Usage")}),h.jsxs("div",{className:"bg-gray-800 rounded-lg p-4",children:[h.jsx("h4",{className:"text-cyan-200 font-semibold mb-2",children:e("Create mailbox and check for messages")}),h.jsx("pre",{className:"bg-gray-900 p-3 rounded overflow-x-auto text-sm",children:h.jsx("code",{className:"text-gray-300",children:`# Create a new mailbox
curl -X POST https://vmail.dev/api/v1/mailboxes \\
-H "X-API-Key: your-api-key" \\
-H "Content-Type: application/json" \\
-d '{"domain": "example.com"}'
# Response: { "data": { "id": "abc123", "address": "...", ... } }
# Check inbox
curl https://vmail.dev/api/v1/mailboxes/abc123/messages \\
-H "X-API-Key: your-api-key"
# Get specific message
curl https://vmail.dev/api/v1/mailboxes/abc123/messages/msg_001 \\
-H "X-API-Key: your-api-key"`})})]})]}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"text-2xl font-semibold text-cyan-300 mb-4",children:e("Rate Limits")}),h.jsx("div",{className:"bg-gray-800 rounded-lg p-4",children:h.jsx("p",{className:"text-gray-300",children:e("API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.")})})]})]})})}function HR(){return h.jsxs("svg",{id:"iconce.com",width:"32",height:"32",viewBox:"0 0 256 256",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"r5",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(45)",style:{transformOrigin:"center center"},children:[h.jsx("stop",{stopColor:"#5C5C5C"}),h.jsx("stop",{offset:"1",stopColor:"#0F1015"})]}),h.jsxs("radialGradient",{id:"r6",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(256) rotate(90) scale(512)",children:[h.jsx("stop",{stopColor:"white"}),h.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"0"})]})]}),h.jsx("rect",{id:"r4",width:"256",height:"256",x:"0",y:"0",rx:"48",fill:"url(#r5)",stroke:"#FFFFFF",strokeWidth:"0",strokeOpacity:"100%",paintOrder:"stroke"}),h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"170",height:"170",viewBox:"0 0 24 24",fill:"none",stroke:"#FFFFFF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-white",alignmentBaseline:"middle",x:"43",y:"43",children:[h.jsx("path",{d:"M22 17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.5C2 7 4 5 6.5 5H18c2.2 0 4 1.8 4 4v8Z"}),h.jsx("polyline",{points:"15,9 18,9 18,11"}),h.jsx("path",{d:"M6.5 5C9 5 11 7 11 9.5V17a2 2 0 0 1-2 2v0"}),h.jsx("line",{x1:"6",x2:"7",y1:"10",y2:"10"})]})]})}function KR({className:e}){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"mb-[1px]",children:h.jsx("path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"})})}function qR(){return h.jsx("div",{children:h.jsxs("div",{className:"max-w-[1400px] ",children:[h.jsxs("p",{className:"mt-8",children:[h.jsx("strong",{children:"Vmail.DEV "})," is a Virtual temporary email service."," "]}),h.jsxs("p",{className:"mt-4",children:["You can get a temporary email without revealing any personal information, which greatly protects your privacy."," "]}),h.jsxs("p",{className:"mt-4",children:["It supports selecting one domain names, making it convenient for you to use in different scenarios."," "]}),h.jsxs("p",{className:"mt-4",children:["100% running on the ",h.jsx("strong",{children:"Cloudflare "})," network, providing you with a super-fast experience."," "]}),h.jsx("p",{className:"mt-4",children:"Misuse of the temporary email service not only violates our terms of service but can also impact the normal use of other users. We encourage each user to use our services responsibly to ensure that resources are allocated and used appropriately."}),h.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"copyrights",children:h.jsx("a",{href:"#copyrights",children:"Copyrights "})}),h.jsxs("p",{className:"mt-4",children:["All copyrights belong to"," ",h.jsxs("a",{href:"https://vmail.dev",rel:"nofollow",children:[h.jsx("strong",{children:"Vmail.DEV "})," "]}),"."," "]})]})})}function QR(){return h.jsx("div",{children:h.jsxs("div",{className:"max-w-[1400px] ",children:[h.jsx("p",{className:"mt-8",children:"At Vmail.DEV, we value the privacy of our users and are committed to protecting their personal information. This Privacy Policy outlines the practices we follow regarding the collection, use, storage, and deletion of data on our one-time email website."}),h.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Collection of Information",children:"1. Collection of Information"}),h.jsx("p",{className:"mt-4",children:"We only collect and store an email name for the duration of the session. This information is necessary to facilitate the functioning of our one-time email service."}),h.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Storage of Emails",children:"2. Storage of Emails"}),h.jsx("p",{className:"mt-4",children:"All emails sent and received through our one-time email service are temporarily stored in Cloudflare data centers. This storage is essential for the proper delivery and retrieval of emails during the active session."}),h.jsx("h2",{className:"mt-8 text-2xl font-bold",id:"Deletion of Emails",children:"3. Deletion of Emails"}),h.jsx("p",{className:"mt-4",children:"Once an email expires, we ensure the complete deletion of the email from our system. This means that all associated Line truncated
M8.5 2h2.5L11 2h-2.5zM13 2h2.5L15.5 2h-2.5zM10.5 2h5v0h-5zM8.5 2h5v0h-5zM10 2h3.5L13.5 2h-3.5z;
M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z;
M8.5 2h2.5L11 22h-2.5zM13 2h2.5L15.5 22h-2.5zM10.5 2h5v2h-5zM8.5 20h5v2h-5zM10 2h3.5L13.5 22h-3.5z;
M1 2h2.5L18.5 22h-2.5zM5.5 2h2.5L23 22h-2.5zM3 2h5v2h-5zM16 20h5v2h-5zM18.5 2h3.5L5 22h-3.5z`})})})}function JR(e){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[h.jsx("path",{color:"#0070f3",strokeWidth:"3",d:"m12 14 4-4"}),h.jsx("defs",{children:h.jsxs("linearGradient",{id:"gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[h.jsx("stop",{offset:"0%",style:{stopColor:"rgb(35, 35, 35)",stopOpacity:"1"}}),h.jsx("stop",{offset:"100%",style:{stopColor:"rgb(100,100,100)",stopOpacity:"1"}})]})}),h.jsx("path",{d:"M3.34 19a10 10 0 1 1 17.32 0",stroke:"url(#gradient)",strokeWidth:"3"})]})}function ZR(){return h.jsxs("div",{className:"text-white w-full mt-auto flex flex-col items-center justify-between px-5 pt-16 mb-10 md:px-10 mx-auto sm:flex-row",children:[h.jsx(Wf,{to:"/",className:"text-xl font-black leading-none select-none logo",children:"VMAIL.DEV"})," ",h.jsxs("p",{className:"mt-4 text-sm text-gray-400 sm:ml-4 sm:pl-4 sm:border-l sm:border-gray-200 sm:mt-0",children:["© 2024 Products of"," ",h.jsx("a",{className:"font-semibold underline hover:text-gray-600",href:"https://www.oiov.dev",target:"_blank",rel:"noopener noreferrer",children:"oiov"}),"."]}),h.jsxs("div",{className:"inline-flex justify-center mt-4 space-x-5 sm:ml-auto sm:mt-0 sm:justify-start",children:[h.jsx("a",{href:"https://like.do",target:"_blank",rel:"noopener noreferrer",title:"LikeDo",className:"text-gray-400 hover:text-gray-500 scale-[1.2]",children:h.jsx(JR,{className:"w-6 h-6"})}),h.jsx("a",{href:"mailto:hi@oiov.dev",title:"Email",className:"text-gray-400 hover:text-gray-500",children:h.jsx(nx,{className:"w-6 h-6"})}),h.jsx("a",{href:"https://twitter.com/yesmoree",target:"_blank",rel:"noopener noreferrer",title:"Twitter",className:"text-gray-400 hover:text-gray-500",children:h.jsx(XR,{})}),h.jsx("a",{href:"https://github.com/oiov/vmail",target:"_blank",rel:"noopener noreferrer",title:"Github",className:"text-gray-400 hover:text-gray-500",children:h.jsx(Iw,{})})]})]})}function e5(){return h.jsxs("div",{className:"mx-auto min-h-screen flex flex-col bg-[#1f2023]",children:[h.jsx(YR,{}),h.jsx(kk,{}),h.jsx(ZR,{}),h.jsx(JE,{position:"bottom-right",toastOptions:{style:{background:"#333",color:"#fff"}}})]})}const t5=new VS;function n5(){const[e,t]=b.useState(null);return b.useEffect(()=>{be.get("/config").then(n=>{t(n.data)})},[]),e?h.jsx(ix.Provider,{value:e,children:h.jsx(WS,{client:t5,children:h.jsx(Dk,{children:h.jsx(Tk,{children:h.jsxs(Ea,{element:h.jsx(e5,{}),children:[h.jsx(Ea,{path:"/",element:h.jsx(zR,{})}),h.jsx(Ea,{path:"/api-docs",element:h.jsx(WR,{})})]})})})})}):h.jsx("div",{className:"bg-[#1f2023] text-white w-screen h-screen flex items-center justify-center",children:"Loading..."})}const q=e=>typeof e=="string",di=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Xg=e=>e==null?"":""+e,r5=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},s5=/###/g,Jg=e=>e&&e.indexOf("###")>-1?e.replace(s5,"."):e,Zg=e=>!e||q(e),Ii=(e,t,n)=>{const r=q(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(Zg(e))return{};const i=Jg(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return Zg(e)?{}:{obj:e,k:Jg(r[s])}},ey=(e,t,n)=>{const{obj:r,k:s}=Ii(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=Ii(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Ii(e,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},i5=(e,t,n,r)=>{const{obj:s,k:i}=Ii(e,t,Object);s[i]=s[i]||[],s[i].push(n)},vl=(e,t)=>{const{obj:n,k:r}=Ii(e,t);if(n)return n[r]},o5=(e,t,n)=>{const r=vl(e,n);return r!==void 0?r:vl(t,n)},_w=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):_w(e[r],t[r],n):e[r]=t[r]);return e},qr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var a5={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const l5=e=>q(e)?e.replace(/[&<>"'\/]/g,t=>a5[t]):e;class u5{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 c5=[" ",",","?","!",";"],d5=new u5(20),f5=(e,t,n)=>{t=t||"",n=n||"";const r=c5.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=d5.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},Id=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])retur Line truncated
`)===0?O.substr(1,O.length):O}).forEach(function(O){var D=O.split(":"),L=D.shift().trim();if(L){var M=D.join(":").trim();R.append(L,M)}}),R}T.call(F.prototype);function J(k,R){if(!(this instanceof J))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new x(R.headers),this.url=R.url||"",this._initBody(k)}T.call(J.prototype),J.prototype.clone=function(){return new J(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new x(this.headers),url:this.url})},J.error=function(){var k=new J(null,{status:0,statusText:""});return k.type="error",k};var me=[301,302,303,307,308];J.redirect=function(k,R){if(me.indexOf(R)===-1)throw new RangeError("Invalid status code");return new J(null,{status:R,headers:{location:k}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(R,_){this.message=R,this.name=_;var O=Error(R);this.stack=O.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Z(k,R){return new Promise(function(_,O){var D=new F(k,R);if(D.signal&&D.signal.aborted)return O(new o.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function M(){L.abort()}L.onload=function(){var K={status:L.status,statusText:L.statusText,headers:B(L.getAllResponseHeaders()||"")};K.url="responseURL"in L?L.responseURL:K.headers.get("X-Request-URL");var ve="response"in L?L.response:L.responseText;setTimeout(function(){_(new J(ve,K))},0)},L.onerror=function(){setTimeout(function(){O(new TypeError("Network request failed"))},0)},L.ontimeout=function(){setTimeout(function(){O(new TypeError("Network request failed"))},0)},L.onabort=function(){setTimeout(function(){O(new o.DOMException("Aborted","AbortError"))},0)};function $(K){try{return K===""&&a.location.href?a.location.href:K}catch{return K}}L.open(D.method,$(D.url),!0),D.credentials==="include"?L.withCredentials=!0:D.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&(l.blob?L.responseType="blob":l.arrayBuffer&&D.headers.get("Content-Type")&&D.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(L.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof x)?Object.getOwnPropertyNames(R.headers).forEach(function(K){L.setRequestHeader(K,p(R.headers[K]))}):D.headers.forEach(function(K,ve){L.setRequestHeader(ve,K)}),D.signal&&(D.signal.addEventListener("abort",M),L.onreadystatechange=function(){L.readyState===4&&D.signal.removeEventListener("abort",M)}),L.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return Z.polyfill=!0,a.fetch||(a.fetch=Z,a.Headers=x,a.Request=F,a.Response=J),o.Headers=x,o.Request=F,o.Response=J,o.fetch=Z,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=n.fetch?n:r;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}(la,la.exports)),la.exports}(function(e,t){var n=typeof fetch=="function"?fetch:void 0;if(typeof Si<"u"&&Si.fetch?n=Si.fetch:typeof window<"u"&&window.fetch&&(n=window.fetch),typeof K5<"u"&&typeof window>"u"){var r=n||q5();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Vd,Vd.exports);var Hw=Vd.exports;const Kw=Oy(Hw),hy=Ny({__proto__:null,default:Kw},[Hw]);function py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?py(Object(n),!0).forEach(function(r){Q5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q5(e,t,n){return(t=G5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G5(e){var t=Y5(e,"string");return Ur(t)=="symbol"?t:t+""}function Y5(e,t){if(Ur(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ur(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ur(e){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ur(e)}var Zn=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Zn=global.fetch:typeof window<"u"&&window.fetch&&(Zn=window.fetch);var ho;Ww()&&(typeof global<"u"&&global.XMLHttpRequest?ho=global.XMLHttpRequest:typeof window<"u"&&win Line truncated
@@ -0,0 +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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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}*,: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: }::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: }.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}.bottom-0{bottom:0}.right-4{right:1rem}.top-0{top:0}.top-4{top:1rem}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-1{margin-bottom:-.25rem}.-mr-1{margin-right:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1Line truncated
+3 -3
View File
@@ -4,9 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vmail - 临时邮箱</title>
<script type="module" crossorigin src="/assets/main-Cj20Dz1y.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-B3RYd5Io.css">
<title>VMAIL - 临时邮箱</title>
<script type="module" crossorigin src="/assets/main-MaFOzO4x.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-fe5He4OT.css">
</head>
<body>
<div id="root"></div>
+54 -2
View File
@@ -5,6 +5,10 @@
"Valid for 1 Day": "Valid for 1 Day",
"AD friendly": "AD friendly",
"100% Run on Cloudflare": "100% Run on Cloudflare",
"Open Source": "Open Source",
"Stable - 1M+ emails processed": "Stable - 1M+ emails processed",
"Open RESTful API": "Open RESTful API",
"Multi-domain configurable": "Multi-domain configurable",
"Email address": "Email address",
"Stop": "Stop",
"Validater": "Validater",
@@ -63,6 +67,54 @@
"Email Detail": "Email Detail",
"Expires in": "Expires in",
"Email expired": "Email expired",
"Reset validity": "Reset validity",
"Validity reset successfully": "Validity reset successfully"
"Reset validity": "Reset validity",
"Validity reset successfully": "Validity reset successfully",
"RESTful API for programmatic access to temporary email services": "RESTful API for programmatic access to temporary email services",
"Authentication": "Authentication",
"All API requests require an API Key. Include it in the request header:": "All API requests require an API Key. Include it in the request header:",
"Or use Authorization header:": "Or use Authorization header:",
"Endpoints": "Endpoints",
"Create a new temporary mailbox": "Create a new temporary mailbox",
"Request Body": "Request Body",
"Response": "Response",
"Get mailbox information": "Get mailbox information",
"Get inbox messages with pagination": "Get inbox messages with pagination",
"Query Parameters": "Query Parameters",
"Parameter": "Parameter",
"Type": "Type",
"Default": "Default",
"Description": "Description",
"Page number": "Page number",
"Items per page (max 100)": "Items per page (max 100)",
"Sort order (asc/desc)": "Sort order (asc/desc)",
"Get full message details": "Get full message details",
"Delete a specific message": "Delete a specific message",
"Error Responses": "Error Responses",
"All errors follow a consistent format:": "All errors follow a consistent format:",
"Error Codes": "Error Codes",
"Missing or invalid API Key": "Missing or invalid API Key",
"API Key disabled/expired or no access": "API Key disabled/expired or no access",
"Resource not found": "Resource not found",
"Invalid request parameters": "Invalid request parameters",
"Resource already exists": "Resource already exists",
"Example Usage": "Example Usage",
"Create mailbox and check for messages": "Create mailbox and check for messages",
"Rate Limits": "Rate Limits",
"API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.": "API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.",
"Need an API Key? Contact the administrator.": "Need an API Key? Contact the administrator.",
"Get API Key": "Get API Key",
"Created": "Created",
"Important: Save your API Key now!": "Important: Save your API Key now!",
"This is the only time you will see the full API Key. It cannot be retrieved later.": "This is the only time you will see the full API Key. It cannot be retrieved later.",
"Create another API Key": "Create another API Key",
"Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.": "Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.",
"Key Name": "Key Name",
"optional": "optional",
"e.g., My Project": "e.g., My Project",
"Verification": "Verification",
"Creating...": "Creating...",
"Create API Key": "Create API Key",
"Please complete the verification first": "Please complete the verification first",
"API Key created successfully": "API Key created successfully",
"Failed to create API Key": "Failed to create API Key"
}
+54 -2
View File
@@ -5,6 +5,10 @@
"Valid for 1 Day": "有效期 1 天",
"AD friendly": "支持多域名后缀",
"100% Run on Cloudflare": "累计接收10万封邮件",
"Open Source": "开源项目",
"Stable - 1M+ emails processed": "稳定 - 累计接收100万封邮件",
"Open RESTful API": "开放 RESTful API",
"Multi-domain configurable": "多域名后缀可配置",
"Email address": "电子邮件地址",
"Stop": "停止",
"Validater": "人机验证",
@@ -39,7 +43,7 @@
"Log out": "登出",
"Terms": "条款",
"Domain": "邮箱后缀",
"How to get a password? Click to create a temporary email and receive at least one email to generate a password": "如何获取密码?点击“创建临时邮箱”,且至少收到一封邮件即可生成密码",
"How to get a password? Click to create a temporary email and receive at least one email to generate a password": "如何获取密码?点击"创建临时邮箱",且至少收到一封邮件即可生成密码",
"Blog": "博客",
"Emails deleted": "邮件已删除",
"Deletion failed": "删除失败",
@@ -64,5 +68,53 @@
"Expires in": "有效期剩余",
"Email expired": "邮箱已过期",
"Reset validity": "重置有效期",
"Validity reset successfully": "有效期重置成功"
"Validity reset successfully": "有效期重置成功",
"RESTful API for programmatic access to temporary email services": "通过程序化方式访问临时邮箱服务的 RESTful API",
"Authentication": "认证",
"All API requests require an API Key. Include it in the request header:": "所有 API 请求都需要 API Key,请在请求头中包含:",
"Or use Authorization header:": "或使用 Authorization 头:",
"Endpoints": "接口",
"Create a new temporary mailbox": "创建新的临时邮箱",
"Request Body": "请求体",
"Response": "响应",
"Get mailbox information": "获取邮箱信息",
"Get inbox messages with pagination": "获取收件箱邮件(分页)",
"Query Parameters": "查询参数",
"Parameter": "参数",
"Type": "类型",
"Default": "默认值",
"Description": "描述",
"Page number": "页码",
"Items per page (max 100)": "每页数量(最大100)",
"Sort order (asc/desc)": "排序方式(asc/desc)",
"Get full message details": "获取邮件详情",
"Delete a specific message": "删除指定邮件",
"Error Responses": "错误响应",
"All errors follow a consistent format:": "所有错误遵循统一格式:",
"Error Codes": "错误码",
"Missing or invalid API Key": "缺少或无效的 API Key",
"API Key disabled/expired or no access": "API Key 已禁用/过期或无权访问",
"Resource not found": "资源不存在",
"Invalid request parameters": "请求参数无效",
"Resource already exists": "资源已存在",
"Example Usage": "使用示例",
"Create mailbox and check for messages": "创建邮箱并检查邮件",
"Rate Limits": "速率限制",
"API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.": "API 请求根据您的 API Key 配置进行速率限制,默认限制为每分钟100次请求。",
"Need an API Key? Contact the administrator.": "需要 API Key?请联系管理员。",
"Get API Key": "获取 API Key",
"Created": "已创建",
"Important: Save your API Key now!": "重要:请立即保存您的 API Key!",
"This is the only time you will see the full API Key. It cannot be retrieved later.": "这是您唯一一次看到完整 API Key 的机会,之后将无法再次获取。",
"Create another API Key": "创建另一个 API Key",
"Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.": "免费创建 API Key 以访问接口。每个 Key 的速率限制为每分钟 100 次请求。",
"Key Name": "Key 名称",
"optional": "可选",
"e.g., My Project": "例如:我的项目",
"Verification": "人机验证",
"Creating...": "创建中...",
"Create API Key": "创建 API Key",
"Please complete the verification first": "请先完成人机验证",
"API Key created successfully": "API Key 创建成功",
"Failed to create API Key": "创建 API Key 失败"
}
+54 -2
View File
@@ -5,6 +5,10 @@
"Valid for 1 Day": "Valid for 1 Day",
"AD friendly": "AD friendly",
"100% Run on Cloudflare": "100% Run on Cloudflare",
"Open Source": "Open Source",
"Stable - 1M+ emails processed": "Stable - 1M+ emails processed",
"Open RESTful API": "Open RESTful API",
"Multi-domain configurable": "Multi-domain configurable",
"Email address": "Email address",
"Stop": "Stop",
"Validater": "Validater",
@@ -63,6 +67,54 @@
"Email Detail": "Email Detail",
"Expires in": "Expires in",
"Email expired": "Email expired",
"Reset validity": "Reset validity",
"Validity reset successfully": "Validity reset successfully"
"Reset validity": "Reset validity",
"Validity reset successfully": "Validity reset successfully",
"RESTful API for programmatic access to temporary email services": "RESTful API for programmatic access to temporary email services",
"Authentication": "Authentication",
"All API requests require an API Key. Include it in the request header:": "All API requests require an API Key. Include it in the request header:",
"Or use Authorization header:": "Or use Authorization header:",
"Endpoints": "Endpoints",
"Create a new temporary mailbox": "Create a new temporary mailbox",
"Request Body": "Request Body",
"Response": "Response",
"Get mailbox information": "Get mailbox information",
"Get inbox messages with pagination": "Get inbox messages with pagination",
"Query Parameters": "Query Parameters",
"Parameter": "Parameter",
"Type": "Type",
"Default": "Default",
"Description": "Description",
"Page number": "Page number",
"Items per page (max 100)": "Items per page (max 100)",
"Sort order (asc/desc)": "Sort order (asc/desc)",
"Get full message details": "Get full message details",
"Delete a specific message": "Delete a specific message",
"Error Responses": "Error Responses",
"All errors follow a consistent format:": "All errors follow a consistent format:",
"Error Codes": "Error Codes",
"Missing or invalid API Key": "Missing or invalid API Key",
"API Key disabled/expired or no access": "API Key disabled/expired or no access",
"Resource not found": "Resource not found",
"Invalid request parameters": "Invalid request parameters",
"Resource already exists": "Resource already exists",
"Example Usage": "Example Usage",
"Create mailbox and check for messages": "Create mailbox and check for messages",
"Rate Limits": "Rate Limits",
"API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.": "API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.",
"Need an API Key? Contact the administrator.": "Need an API Key? Contact the administrator.",
"Get API Key": "Get API Key",
"Created": "Created",
"Important: Save your API Key now!": "Important: Save your API Key now!",
"This is the only time you will see the full API Key. It cannot be retrieved later.": "This is the only time you will see the full API Key. It cannot be retrieved later.",
"Create another API Key": "Create another API Key",
"Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.": "Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.",
"Key Name": "Key Name",
"optional": "optional",
"e.g., My Project": "e.g., My Project",
"Verification": "Verification",
"Creating...": "Creating...",
"Create API Key": "Create API Key",
"Please complete the verification first": "Please complete the verification first",
"API Key created successfully": "API Key created successfully",
"Failed to create API Key": "Failed to create API Key"
}
+54 -2
View File
@@ -5,6 +5,10 @@
"Valid for 1 Day": "有效期 1 天",
"AD friendly": "支持多域名后缀",
"100% Run on Cloudflare": "累计接收10万封邮件",
"Open Source": "开源项目",
"Stable - 1M+ emails processed": "稳定 - 累计接收100万封邮件",
"Open RESTful API": "开放 RESTful API",
"Multi-domain configurable": "多域名后缀可配置",
"Email address": "电子邮件地址",
"Stop": "停止",
"Validater": "人机验证",
@@ -39,7 +43,7 @@
"Log out": "登出",
"Terms": "条款",
"Domain": "邮箱后缀",
"How to get a password? Click to create a temporary email and receive at least one email to generate a password": "如何获取密码?点击“创建临时邮箱”,且至少收到一封邮件即可生成密码",
"How to get a password? Click to create a temporary email and receive at least one email to generate a password": "如何获取密码?点击"创建临时邮箱",且至少收到一封邮件即可生成密码",
"Blog": "博客",
"Emails deleted": "邮件已删除",
"Deletion failed": "删除失败",
@@ -64,5 +68,53 @@
"Expires in": "有效期剩余",
"Email expired": "邮箱已过期",
"Reset validity": "重置有效期",
"Validity reset successfully": "有效期重置成功"
"Validity reset successfully": "有效期重置成功",
"RESTful API for programmatic access to temporary email services": "通过程序化方式访问临时邮箱服务的 RESTful API",
"Authentication": "认证",
"All API requests require an API Key. Include it in the request header:": "所有 API 请求都需要 API Key,请在请求头中包含:",
"Or use Authorization header:": "或使用 Authorization 头:",
"Endpoints": "接口",
"Create a new temporary mailbox": "创建新的临时邮箱",
"Request Body": "请求体",
"Response": "响应",
"Get mailbox information": "获取邮箱信息",
"Get inbox messages with pagination": "获取收件箱邮件(分页)",
"Query Parameters": "查询参数",
"Parameter": "参数",
"Type": "类型",
"Default": "默认值",
"Description": "描述",
"Page number": "页码",
"Items per page (max 100)": "每页数量(最大100)",
"Sort order (asc/desc)": "排序方式(asc/desc)",
"Get full message details": "获取邮件详情",
"Delete a specific message": "删除指定邮件",
"Error Responses": "错误响应",
"All errors follow a consistent format:": "所有错误遵循统一格式:",
"Error Codes": "错误码",
"Missing or invalid API Key": "缺少或无效的 API Key",
"API Key disabled/expired or no access": "API Key 已禁用/过期或无权访问",
"Resource not found": "资源不存在",
"Invalid request parameters": "请求参数无效",
"Resource already exists": "资源已存在",
"Example Usage": "使用示例",
"Create mailbox and check for messages": "创建邮箱并检查邮件",
"Rate Limits": "速率限制",
"API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.": "API 请求根据您的 API Key 配置进行速率限制,默认限制为每分钟100次请求。",
"Need an API Key? Contact the administrator.": "需要 API Key?请联系管理员。",
"Get API Key": "获取 API Key",
"Created": "已创建",
"Important: Save your API Key now!": "重要:请立即保存您的 API Key!",
"This is the only time you will see the full API Key. It cannot be retrieved later.": "这是您唯一一次看到完整 API Key 的机会,之后将无法再次获取。",
"Create another API Key": "创建另一个 API Key",
"Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.": "免费创建 API Key 以访问接口。每个 Key 的速率限制为每分钟 100 次请求。",
"Key Name": "Key 名称",
"optional": "可选",
"e.g., My Project": "例如:我的项目",
"Verification": "人机验证",
"Creating...": "创建中...",
"Create API Key": "创建 API Key",
"Please complete the verification first": "请先完成人机验证",
"API Key created successfully": "API Key 创建成功",
"Failed to create API Key": "创建 API Key 失败"
}
+2
View File
@@ -3,6 +3,7 @@ import axios from "axios";
import { useEffect, useState } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { Home } from "./pages/Home.tsx";
import { ApiDocs } from "./pages/ApiDocs.tsx";
// MailDetail 组件不再作为独立页面,因此移除其路由
// import { MailDetail } from './pages/MailDetail.tsx';
// import { About } from './pages/About.tsx'; // 移除
@@ -44,6 +45,7 @@ function App() {
{/* 使用 Layout 组件作为所有页面的布局框架 */}
<Route element={<Layout />}>
<Route path="/" element={<Home />} />
<Route path="/api-docs" element={<ApiDocs />} />
{/* 移除 /mails/:id, /about, /privacy, /terms 路由 */}
</Route>
</Routes>
+33 -19
View File
@@ -1,12 +1,12 @@
import { Link } from 'react-router-dom';
import { VmailLogo } from './icons/vmail.tsx';
import { Link } from "react-router-dom";
import { VmailLogo } from "./icons/vmail.tsx";
import { useTranslation } from "react-i18next";
import GithubPlat from "./icons/GitHubPlat.tsx";
import { useState } from 'react';
import { InfoModal } from './InfoModal.tsx';
import { About } from '../pages/About.tsx';
import { Privacy } from '../pages/Privacy.tsx';
import { Terms } from '../pages/Terms.tsx';
import { useState } from "react";
import { InfoModal } from "./InfoModal.tsx";
import { About } from "../pages/About.tsx";
import { Privacy } from "../pages/Privacy.tsx";
import { Terms } from "../pages/Terms.tsx";
export function Header() {
const { t } = useTranslation();
@@ -17,7 +17,9 @@ export function Header() {
return (
<>
<header className="fixed top-0 z-20 h-20 w-full px-5 backdrop-blur-xl md:px-10 text-white flex items-center justify-between shadow-sm">
<Link to="/" className="font-bold flex items-center justify-center gap-3">
<Link
to="/"
className="font-bold flex items-center justify-center gap-3">
<VmailLogo />
<button className="cool-btn">
<span>VMAIL.DEV</span>
@@ -25,22 +27,26 @@ export function Header() {
</Link>
<nav className="flex items-center">
{/* 导航链接 */}
<a
className="ml-3 md:ml-8"
target="_blank"
rel="noopener noreferrer"
href="/api-docs">
API
</a>
<button
onClick={() => setShowAboutModal(true)}
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400"
>
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400">
{t("About")}
</button>
<button
onClick={() => setShowPrivacyModal(true)}
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400"
>
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400">
{t("Privacy")}
</button>
<button
onClick={() => setShowTermsModal(true)}
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400"
>
className="ml-3 md:ml-8 text-sm md:text-base hidden md:block hover:text-cyan-400">
{t("Terms")}
</button>
{/* GitHub 链接按钮 */}
@@ -48,8 +54,7 @@ export function Header() {
className="ml-3 md:ml-8"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/oiov/vmail"
>
href="https://github.com/oiov/vmail">
<button className="whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-transparent hover:bg-accent hover:text-accent-foreground text-md flex h-[32px] w-[85px] cursor-pointer items-center justify-center rounded-md border-2 p-2 font-semibold hover:opacity-50">
<GithubPlat />
<div className="ml-1.5 text-sm">Star</div>
@@ -58,13 +63,22 @@ export function Header() {
</nav>
</header>
<InfoModal showModal={showAboutModal} setShowModal={setShowAboutModal} title={t('About')}>
<InfoModal
showModal={showAboutModal}
setShowModal={setShowAboutModal}
title={t("About")}>
<About />
</InfoModal>
<InfoModal showModal={showPrivacyModal} setShowModal={setShowPrivacyModal} title={t('Privacy')}>
<InfoModal
showModal={showPrivacyModal}
setShowModal={setShowPrivacyModal}
title={t("Privacy")}>
<Privacy />
</InfoModal>
<InfoModal showModal={showTermsModal} setShowModal={setShowTermsModal} title={t('Terms')}>
<InfoModal
showModal={showTermsModal}
setShowModal={setShowTermsModal}
title={t("Terms")}>
<Terms />
</InfoModal>
</>
+18
View File
@@ -0,0 +1,18 @@
export default function ApiIcon({ className = "h-5 w-5" }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M14.25 9.75 16.5 12l-2.25 2.25m-4.5 0L7.5 12l2.25-2.25M6 20.25h12A2.25 2.25 0 0 0 20.25 18V6A2.25 2.25 0 0 0 18 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25Z"
/>
</svg>
);
}
@@ -0,0 +1,18 @@
export default function CodeBracketIcon({ className = "h-5 w-5" }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"
/>
</svg>
);
}
@@ -0,0 +1,18 @@
export default function GlobeAltIcon({ className = "h-5 w-5" }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5a17.92 17.92 0 0 1-8.716-2.247m0 0A8.966 8.966 0 0 1 3 12c0-1.97.633-3.794 1.708-5.273"
/>
</svg>
);
}
@@ -0,0 +1,18 @@
export default function ServerIcon({ className = "h-5 w-5" }: { className?: string }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={1.5}
stroke="currentColor"
className={className}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z"
/>
</svg>
);
}
+560
View File
@@ -0,0 +1,560 @@
import { useTranslation } from "react-i18next";
import { useEffect, useRef, useState } from "react";
import { Turnstile } from "@marsidev/react-turnstile";
import { toast } from "react-hot-toast";
import { useConfig } from "../hooks/useConfig";
import { CopyButton } from "../components/CopyButton";
interface ApiKeyResponse {
data: {
id: string;
key: string;
keyPrefix: string;
name: string | null;
createdAt: string;
};
message: string;
}
export function ApiDocs() {
const { t } = useTranslation();
const config = useConfig();
const contentRef = useRef<HTMLDivElement>(null);
// API Key 创建相关状态
const [turnstileToken, setTurnstileToken] = useState<string>("");
const [isCreating, setIsCreating] = useState(false);
const [createdApiKey, setCreatedApiKey] = useState<string | null>(null);
const [keyName, setKeyName] = useState("");
// 添加代码高亮样式
useEffect(() => {
if (contentRef.current) {
const codeBlocks = contentRef.current.querySelectorAll("pre code");
codeBlocks.forEach((block) => {
block.classList.add("language-json");
});
}
}, []);
// 创建 API Key
const handleCreateApiKey = async () => {
if (!turnstileToken) {
toast.error(t("Please complete the verification first"));
return;
}
setIsCreating(true);
try {
const response = await fetch("/api/api-keys", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
token: turnstileToken,
name: keyName || undefined,
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || "Failed to create API Key");
}
const result: ApiKeyResponse = await response.json();
setCreatedApiKey(result.data.key);
toast.success(t("API Key created successfully"));
} catch (error: any) {
toast.error(error.message || t("Failed to create API Key"));
} finally {
setIsCreating(false);
}
};
// 重置状态,允许创建新的 API Key
const handleCreateAnother = () => {
setCreatedApiKey(null);
setTurnstileToken("");
setKeyName("");
};
return (
<div className="min-h-screen bg-[#1f2023] text-white py-8 px-4 md:px-8 mt-16">
<div className="max-w-4xl mx-auto" ref={contentRef}>
{/* Header */}
<div className="mb-8 pb-6 border-b border-gray-700">
<h1 className="text-3xl font-bold text-cyan-400 mb-2">
API Documentation
</h1>
<p className="text-gray-400">
{t(
"RESTful API for programmatic access to temporary email services",
)}
</p>
</div>
{/* Get API Key Section */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Get API Key")}
</h2>
<div className="bg-gray-800 rounded-lg p-4">
{createdApiKey ? (
// 显示创建的 API Key
<div>
<div className="flex items-center gap-2 mb-3">
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
{t("Created")}
</span>
</div>
<div className="bg-yellow-900/30 border border-yellow-600/50 rounded-lg p-4 mb-4">
<div className="flex items-start gap-2">
<svg className="w-5 h-5 text-yellow-500 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
</svg>
<div>
<p className="text-yellow-200 font-semibold text-sm">
{t("Important: Save your API Key now!")}
</p>
<p className="text-yellow-300/80 text-xs mt-1">
{t("This is the only time you will see the full API Key. It cannot be retrieved later.")}
</p>
</div>
</div>
</div>
<div className="bg-gray-900 p-4 rounded-lg mb-4">
<div className="flex items-center justify-between gap-2">
<code className="text-green-400 text-sm break-all flex-1">
{createdApiKey}
</code>
<CopyButton text={createdApiKey} className="flex-shrink-0" />
</div>
</div>
<button
onClick={handleCreateAnother}
className="text-cyan-400 hover:text-cyan-300 text-sm underline"
>
{t("Create another API Key")}
</button>
</div>
) : (
// 创建 API Key 表单
<div>
<p className="text-gray-300 mb-4">
{t("Create a free API Key to access the API. Each key has a rate limit of 100 requests per minute.")}
</p>
<div className="space-y-4">
<div>
<label className="block text-sm text-gray-400 mb-2">
{t("Key Name")} ({t("optional")})
</label>
<input
type="text"
value={keyName}
onChange={(e) => setKeyName(e.target.value)}
placeholder={t("e.g., My Project")}
className="w-full md:w-1/2 px-3 py-2 bg-gray-900 border border-gray-700 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:border-cyan-500"
/>
</div>
<div>
<label className="block text-sm text-gray-400 mb-2">
{t("Verification")}
</label>
<div className="[&_iframe]:!w-full h-[65px] max-w-[300px] bg-gray-700 rounded">
<Turnstile
siteKey={config.turnstileKey}
onSuccess={setTurnstileToken}
options={{ theme: "dark" }}
/>
</div>
</div>
<button
onClick={handleCreateApiKey}
disabled={!turnstileToken || isCreating}
className="px-6 py-2.5 bg-cyan-600 hover:bg-cyan-700 disabled:bg-gray-600 disabled:cursor-not-allowed rounded-lg font-medium transition-colors"
>
{isCreating ? t("Creating...") : t("Create API Key")}
</button>
</div>
</div>
)}
</div>
</section>
{/* Authentication */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Authentication")}
</h2>
<div className="bg-gray-800 rounded-lg p-4 mb-4">
<p className="text-gray-300 mb-3">
{t(
"All API requests require an API Key. Include it in the request header:",
)}
</p>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto">
<code className="text-green-400">X-API-Key: your-api-key</code>
</pre>
<p className="text-gray-400 text-sm mt-2">
{t("Or use Authorization header:")}
</p>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto mt-2">
<code className="text-green-400">
Authorization: Bearer your-api-key
</code>
</pre>
</div>
</section>
{/* Base URL */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
Base URL
</h2>
<div className="bg-gray-800 rounded-lg p-4">
<pre className="bg-gray-900 p-3 rounded overflow-x-auto">
<code className="text-yellow-400">https://vmail.dev/api/v1</code>
</pre>
</div>
</section>
{/* Endpoints */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Endpoints")}
</h2>
{/* POST /mailboxes */}
<div className="bg-gray-800 rounded-lg p-4 mb-6">
<div className="flex items-center gap-3 mb-3">
<span className="bg-green-600 text-white px-2 py-1 rounded text-sm font-mono">
POST
</span>
<code className="text-white font-mono">/mailboxes</code>
</div>
<p className="text-gray-300 mb-4">
{t("Create a new temporary mailbox")}
</p>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Request Body")} (optional)
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto mb-4 text-sm">
<code className="text-gray-300">{`{
"localPart": "mytest", // Optional: custom local part
"domain": "example.com", // Optional: email domain
"expiresIn": 86400 // Optional: expiry in seconds (default: 24h)
}`}</code>
</pre>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Response")}{" "}
<span className="text-green-400">201 Created</span>
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`{
"data": {
"id": "abc123xyz",
"address": "mytest@example.com",
"domain": "example.com",
"expiresAt": "2024-02-12T12:00:00.000Z",
"createdAt": "2024-02-11T12:00:00.000Z"
}
}`}</code>
</pre>
</div>
{/* GET /mailboxes/:id */}
<div className="bg-gray-800 rounded-lg p-4 mb-6">
<div className="flex items-center gap-3 mb-3">
<span className="bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono">
GET
</span>
<code className="text-white font-mono">/mailboxes/:id</code>
</div>
<p className="text-gray-300 mb-4">{t("Get mailbox information")}</p>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Response")} <span className="text-green-400">200 OK</span>
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`{
"data": {
"id": "abc123xyz",
"address": "mytest@example.com",
"domain": "example.com",
"expiresAt": "2024-02-12T12:00:00.000Z",
"createdAt": "2024-02-11T12:00:00.000Z",
"messageCount": 5
}
}`}</code>
</pre>
</div>
{/* GET /mailboxes/:id/messages */}
<div className="bg-gray-800 rounded-lg p-4 mb-6">
<div className="flex items-center gap-3 mb-3">
<span className="bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono">
GET
</span>
<code className="text-white font-mono">
/mailboxes/:id/messages
</code>
</div>
<p className="text-gray-300 mb-4">
{t("Get inbox messages with pagination")}
</p>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Query Parameters")}
</h4>
<div className="overflow-x-auto mb-4">
<table className="w-full text-sm">
<thead>
<tr className="text-left text-gray-400 border-b border-gray-700">
<th className="pb-2 pr-4">{t("Parameter")}</th>
<th className="pb-2 pr-4">{t("Type")}</th>
<th className="pb-2 pr-4">{t("Default")}</th>
<th className="pb-2">{t("Description")}</th>
</tr>
</thead>
<tbody className="text-gray-300">
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-yellow-400">
page
</td>
<td className="py-2 pr-4">number</td>
<td className="py-2 pr-4">1</td>
<td className="py-2">{t("Page number")}</td>
</tr>
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-yellow-400">
limit
</td>
<td className="py-2 pr-4">number</td>
<td className="py-2 pr-4">20</td>
<td className="py-2">{t("Items per page (max 100)")}</td>
</tr>
<tr>
<td className="py-2 pr-4 font-mono text-yellow-400">
sort
</td>
<td className="py-2 pr-4">string</td>
<td className="py-2 pr-4">desc</td>
<td className="py-2">{t("Sort order (asc/desc)")}</td>
</tr>
</tbody>
</table>
</div>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Response")} <span className="text-green-400">200 OK</span>
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`{
"data": [
{
"id": "msg_001",
"from": { "address": "sender@example.com", "name": "Sender" },
"subject": "Hello World",
"preview": "This is a preview...",
"receivedAt": "2024-02-11T10:30:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 42,
"totalPages": 3,
"hasMore": true
}
}`}</code>
</pre>
</div>
{/* GET /mailboxes/:id/messages/:messageId */}
<div className="bg-gray-800 rounded-lg p-4 mb-6">
<div className="flex items-center gap-3 mb-3">
<span className="bg-blue-600 text-white px-2 py-1 rounded text-sm font-mono">
GET
</span>
<code className="text-white font-mono">
/mailboxes/:id/messages/:messageId
</code>
</div>
<p className="text-gray-300 mb-4">
{t("Get full message details")}
</p>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Response")} <span className="text-green-400">200 OK</span>
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`{
"data": {
"id": "msg_001",
"messageId": "<unique-id@sender.com>",
"from": { "address": "sender@example.com", "name": "Sender" },
"to": [{ "address": "mytest@example.com", "name": "" }],
"cc": [],
"bcc": [],
"replyTo": [],
"subject": "Hello World",
"text": "Plain text content...",
"html": "<html>...</html>",
"headers": [{ "name": "X-Custom", "value": "value" }],
"receivedAt": "2024-02-11T10:30:00.000Z"
}
}`}</code>
</pre>
</div>
{/* DELETE /mailboxes/:id/messages/:messageId */}
<div className="bg-gray-800 rounded-lg p-4 mb-6">
<div className="flex items-center gap-3 mb-3">
<span className="bg-red-600 text-white px-2 py-1 rounded text-sm font-mono">
DELETE
</span>
<code className="text-white font-mono">
/mailboxes/:id/messages/:messageId
</code>
</div>
<p className="text-gray-300 mb-4">
{t("Delete a specific message")}
</p>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Response")} <span className="text-green-400">200 OK</span>
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`{
"data": {
"deleted": true,
"id": "msg_001"
}
}`}</code>
</pre>
</div>
</section>
{/* Error Responses */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Error Responses")}
</h2>
<div className="bg-gray-800 rounded-lg p-4">
<p className="text-gray-300 mb-4">
{t("All errors follow a consistent format:")}
</p>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm mb-4">
<code className="text-gray-300">{`{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message"
}
}`}</code>
</pre>
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Error Codes")}
</h4>
<div className="overflow-x-auto">
<table className="w-full text-sm">
<thead>
<tr className="text-left text-gray-400 border-b border-gray-700">
<th className="pb-2 pr-4">Code</th>
<th className="pb-2 pr-4">HTTP Status</th>
<th className="pb-2">{t("Description")}</th>
</tr>
</thead>
<tbody className="text-gray-300">
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-red-400">
UNAUTHORIZED
</td>
<td className="py-2 pr-4">401</td>
<td className="py-2">{t("Missing or invalid API Key")}</td>
</tr>
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-red-400">
FORBIDDEN
</td>
<td className="py-2 pr-4">403</td>
<td className="py-2">
{t("API Key disabled/expired or no access")}
</td>
</tr>
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-red-400">
NOT_FOUND
</td>
<td className="py-2 pr-4">404</td>
<td className="py-2">{t("Resource not found")}</td>
</tr>
<tr className="border-b border-gray-700/50">
<td className="py-2 pr-4 font-mono text-red-400">
VALIDATION_ERROR
</td>
<td className="py-2 pr-4">400</td>
<td className="py-2">{t("Invalid request parameters")}</td>
</tr>
<tr>
<td className="py-2 pr-4 font-mono text-red-400">
CONFLICT
</td>
<td className="py-2 pr-4">409</td>
<td className="py-2">{t("Resource already exists")}</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
{/* Example Usage */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Example Usage")}
</h2>
<div className="bg-gray-800 rounded-lg p-4">
<h4 className="text-cyan-200 font-semibold mb-2">
{t("Create mailbox and check for messages")}
</h4>
<pre className="bg-gray-900 p-3 rounded overflow-x-auto text-sm">
<code className="text-gray-300">{`# Create a new mailbox
curl -X POST https://vmail.dev/api/v1/mailboxes \\
-H "X-API-Key: your-api-key" \\
-H "Content-Type: application/json" \\
-d '{"domain": "example.com"}'
# Response: { "data": { "id": "abc123", "address": "...", ... } }
# Check inbox
curl https://vmail.dev/api/v1/mailboxes/abc123/messages \\
-H "X-API-Key: your-api-key"
# Get specific message
curl https://vmail.dev/api/v1/mailboxes/abc123/messages/msg_001 \\
-H "X-API-Key: your-api-key"`}</code>
</pre>
</div>
</section>
{/* Rate Limits */}
<section className="mb-8">
<h2 className="text-2xl font-semibold text-cyan-300 mb-4">
{t("Rate Limits")}
</h2>
<div className="bg-gray-800 rounded-lg p-4">
<p className="text-gray-300">
{t(
"API requests are rate limited based on your API Key configuration. Default limit is 100 requests per minute.",
)}
</p>
</div>
</section>
</div>
</div>
);
}
+31 -21
View File
@@ -4,6 +4,7 @@ import { Turnstile } from "@marsidev/react-turnstile";
import randomName from "@scaleway/random-name";
import { useTranslation } from "react-i18next";
import Cookies from "js-cookie";
import { Link } from "react-router-dom";
// feat: 导入全局 toast
import { toast } from "react-hot-toast";
@@ -27,9 +28,10 @@ import Close from "../components/icons/Close.tsx"; // 导入关闭图标
// 图标导入
import ShieldCheck from "../components/icons/ShieldCheck.tsx";
import Cloudflare from "../components/icons/Cloudflare.tsx";
import Clock from "../components/icons/Clock.tsx";
import Info from "../components/icons/Info.tsx";
import CodeBracketIcon from "../components/icons/CodeBracket.tsx";
import ServerIcon from "../components/icons/ServerIcon.tsx";
import ApiIcon from "../components/icons/ApiIcon.tsx";
import GlobeAltIcon from "../components/icons/GlobeAltIcon.tsx";
// refactor: 将导入从 'database' 包更改为本地的类型定义文件
import type { Email } from "../database_types.ts";
@@ -37,6 +39,8 @@ import { InfoModal } from "../components/InfoModal.tsx";
import { MailDetail } from "./MailDetail.tsx";
// feat: 导入倒计时组件
import { CountdownTimer } from "../components/CountdownTimer.tsx";
import Github from "../components/icons/GitHub.tsx";
import Cloudflare from "../components/icons/Cloudflare.tsx";
export function Home() {
const config = useConfig();
@@ -45,21 +49,21 @@ export function Home() {
// 状态管理
const [address, setAddress] = useState<string | undefined>(() =>
Cookies.get("userMailbox")
Cookies.get("userMailbox"),
);
// feat: 新增状态,用于存储邮箱过期时间戳
const [expiryTimestamp, setExpiryTimestamp] = useState<number | undefined>(
() => {
const expiry = Cookies.get("emailExpiry");
return expiry ? parseInt(expiry, 10) : undefined;
}
},
);
const [turnstileToken, setTurnstileToken] = useState<string>("");
const [selectedIds, setSelectedIds] = useState<string[]>([]);
const [isTurnstileVerified, setIsTurnstileVerified] = useState(false);
const [selectedEmail, setSelectedEmail] = useState<Email | null>(null); // 新增状态,用于存储当前选中的邮件
const [selectedDomain, setSelectedDomain] = useState<string>(
config.emailDomain[0]
config.emailDomain[0],
); // feat: 新增状态,用于存储当前选中的域名
const [showEmailModal, setShowEmailModal] = useState(false); // feat: 新增状态,用于控制邮件详情模态框的显示
@@ -124,7 +128,7 @@ export function Home() {
</div>
<p className="mt-3 text-xs text-yellow-400">
{t(
"Remember your password, otherwise your email will expire and cannot be retrieved"
"Remember your password, otherwise your email will expire and cannot be retrieved",
)}
</p>
</div>
@@ -141,10 +145,10 @@ export function Home() {
padding: 0,
boxShadow: "none",
},
}
},
);
},
[t]
[t],
);
// feat(fix): 使用useEffect来检测新邮件、显示密码通知,并控制“查看密码”按钮的可见性
@@ -326,20 +330,26 @@ export function Home() {
{t("Virtual Temporary Email")}
</h1>
<div className="flex flex-col gap-4 text-sm text-gray-200">
<a
href="https://github.com/oiov/vmail"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-1.5 hover:text-cyan-400 transition-colors cursor-pointer">
<Github /> {t("Open Source")}
</a>
<div className="flex items-center gap-1.5">
<ShieldCheck /> {t("Privacy friendly")}
</div>
<div className="flex items-center gap-1.5">
<Clock />
{t("Valid for 1 Day")}
</div>
<div className="flex items-center gap-1.5">
<Info />
{t("AD friendly")}
</div>
<div className="flex items-center gap-2">
<Cloudflare />
{t("100% Run on Cloudflare")}
{t("Stable - 1M+ emails processed")}
</div>
<Link
to="/api-docs"
className="flex items-center gap-1.5 hover:text-cyan-400 transition-colors cursor-pointer">
<ApiIcon />
{t("Open RESTful API")}
</Link>
<div className="flex items-center gap-1.5">
<GlobeAltIcon />
{t("Multi-domain configurable")}
</div>
</div>
</div>
+29
View File
@@ -0,0 +1,29 @@
-- API Keys 表
CREATE TABLE IF NOT EXISTS `api_keys` (
`id` text PRIMARY KEY NOT NULL,
`key` text NOT NULL,
`key_prefix` text NOT NULL,
`name` text,
`rate_limit` integer DEFAULT 100,
`is_active` integer DEFAULT 1 NOT NULL,
`last_used_at` integer,
`expires_at` integer,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
-- Mailboxes 表
CREATE TABLE IF NOT EXISTS `mailboxes` (
`id` text PRIMARY KEY NOT NULL,
`address` text NOT NULL,
`domain` text NOT NULL,
`expires_at` integer,
`api_key_id` text NOT NULL,
`created_at` integer NOT NULL,
`updated_at` integer NOT NULL
);
-- 索引
CREATE UNIQUE INDEX IF NOT EXISTS `api_keys_key_unique` ON `api_keys` (`key`);
CREATE UNIQUE INDEX IF NOT EXISTS `mailboxes_address_unique` ON `mailboxes` (`address`);
CREATE INDEX IF NOT EXISTS `idx_mailboxes_api_key_id` ON `mailboxes` (`api_key_id`);
+18
View File
@@ -0,0 +1,18 @@
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import type { Env } from '../../index';
import { apiKeyAuth } from './middleware/apiKeyAuth';
import mailboxesRouter from './routes/mailboxes';
const v1 = new Hono<{ Bindings: Env }>();
// 配置 CORS
v1.use('/*', cors());
// 所有 v1 路由都需要 API Key 认证
v1.use('/*', apiKeyAuth);
// 挂载邮箱路由
v1.route('/mailboxes', mailboxesRouter);
export default v1;
@@ -0,0 +1,73 @@
import { Context, Next } from 'hono';
import { getD1DB } from '../../../database/db';
import { findApiKeyByKey, updateApiKeyLastUsed } from '../../../database/dao';
import type { Env } from '../../../index';
/**
* API Key 认证中间件
* 从请求头 X-API-Key 或 Authorization: Bearer <key> 中提取 API Key
*/
export const apiKeyAuth = async (c: Context<{ Bindings: Env }>, next: Next) => {
// 1. 提取 API Key
let apiKey = c.req.header('X-API-Key');
if (!apiKey) {
const authHeader = c.req.header('Authorization');
if (authHeader?.startsWith('Bearer ')) {
apiKey = authHeader.substring(7);
}
}
if (!apiKey) {
return c.json({
error: {
code: 'UNAUTHORIZED',
message: 'Missing API Key. Provide it via X-API-Key header or Authorization: Bearer <key>',
}
}, 401);
}
// 2. 验证 API Key
const db = getD1DB(c.env.DB);
const keyRecord = await findApiKeyByKey(db, apiKey);
if (!keyRecord) {
return c.json({
error: {
code: 'UNAUTHORIZED',
message: 'Invalid API Key',
}
}, 401);
}
// 3. 检查是否启用
if (!keyRecord.isActive) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'API Key is disabled',
}
}, 403);
}
// 4. 检查是否过期
if (keyRecord.expiresAt && keyRecord.expiresAt < new Date()) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'API Key has expired',
}
}, 403);
}
// 5. 更新最后使用时间 (异步,不阻塞请求)
c.executionCtx.waitUntil(updateApiKeyLastUsed(db, keyRecord.id));
// 6. 将 API Key 信息存入上下文
c.set('apiKey', {
id: keyRecord.id,
rateLimit: keyRecord.rateLimit || 100,
});
await next();
};
+299
View File
@@ -0,0 +1,299 @@
import { Hono } from 'hono';
import type { Env } from '../../../index';
import { getD1DB } from '../../../database/db';
import { nanoid } from 'nanoid/non-secure';
import {
insertMailbox,
findMailboxById,
getMailboxMessages,
findMailboxMessage,
deleteMailboxMessage,
getMailboxMessageCount,
} from '../../../database/dao';
// 随机邮箱名称生成
function generateRandomLocalPart(): string {
const adjectives = ['quick', 'lazy', 'happy', 'sad', 'bright', 'dark', 'warm', 'cold', 'soft', 'hard'];
const nouns = ['fox', 'dog', 'cat', 'bird', 'fish', 'lion', 'bear', 'wolf', 'deer', 'hawk'];
const adj = adjectives[Math.floor(Math.random() * adjectives.length)];
const noun = nouns[Math.floor(Math.random() * nouns.length)];
const num = Math.floor(Math.random() * 1000);
return `${adj}-${noun}-${num}`;
}
const mailboxesRouter = new Hono<{ Bindings: Env }>();
// POST /api/v1/mailboxes - 创建邮箱
mailboxesRouter.post('/', async (c) => {
const db = getD1DB(c.env.DB);
const apiKey = c.get('apiKey') as { id: string; rateLimit: number };
let body: { localPart?: string; domain?: string; expiresIn?: number } = {};
try {
body = await c.req.json();
} catch {
// 允许空请求体
}
// 获取可用域名
const availableDomains = c.env.EMAIL_DOMAIN ? c.env.EMAIL_DOMAIN.split(',').map(d => d.trim()) : [];
if (availableDomains.length === 0) {
return c.json({
error: {
code: 'CONFIGURATION_ERROR',
message: 'No email domains configured',
}
}, 500);
}
// 验证域名
const domain = body.domain || availableDomains[0];
if (!availableDomains.includes(domain)) {
return c.json({
error: {
code: 'VALIDATION_ERROR',
message: `Invalid domain. Available domains: ${availableDomains.join(', ')}`,
details: { field: 'domain', allowed: availableDomains }
}
}, 400);
}
// 生成邮箱地址
const localPart = body.localPart || generateRandomLocalPart();
const address = `${localPart}@${domain}`;
// 计算过期时间
const expiresIn = body.expiresIn || 24 * 60 * 60; // 默认 24 小时
const expiresAt = new Date(Date.now() + expiresIn * 1000);
const now = new Date();
const mailbox = {
id: nanoid(),
address,
domain,
expiresAt,
apiKeyId: apiKey.id,
createdAt: now,
updatedAt: now,
};
try {
await insertMailbox(db, mailbox);
return c.json({
data: {
id: mailbox.id,
address: mailbox.address,
domain: mailbox.domain,
expiresAt: mailbox.expiresAt.toISOString(),
createdAt: mailbox.createdAt.toISOString(),
}
}, 201);
} catch (e: any) {
if (e.message?.includes('UNIQUE constraint failed')) {
return c.json({
error: {
code: 'CONFLICT',
message: 'Email address already exists',
}
}, 409);
}
console.error('Create mailbox error:', e);
return c.json({
error: {
code: 'INTERNAL_ERROR',
message: 'Failed to create mailbox',
}
}, 500);
}
});
// GET /api/v1/mailboxes/:id - 获取邮箱信息
mailboxesRouter.get('/:id', async (c) => {
const db = getD1DB(c.env.DB);
const apiKey = c.get('apiKey') as { id: string; rateLimit: number };
const { id } = c.req.param();
const mailbox = await findMailboxById(db, id);
if (!mailbox) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Mailbox not found',
}
}, 404);
}
// 验证所属关系
if (mailbox.apiKeyId !== apiKey.id) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'You do not have access to this mailbox',
}
}, 403);
}
const messageCount = await getMailboxMessageCount(db, mailbox.address);
return c.json({
data: {
id: mailbox.id,
address: mailbox.address,
domain: mailbox.domain,
expiresAt: mailbox.expiresAt?.toISOString() || null,
createdAt: mailbox.createdAt.toISOString(),
messageCount,
}
});
});
// GET /api/v1/mailboxes/:id/messages - 获取收件箱
mailboxesRouter.get('/:id/messages', async (c) => {
const db = getD1DB(c.env.DB);
const apiKey = c.get('apiKey') as { id: string; rateLimit: number };
const { id } = c.req.param();
const mailbox = await findMailboxById(db, id);
if (!mailbox) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Mailbox not found',
}
}, 404);
}
// 验证所属关系
if (mailbox.apiKeyId !== apiKey.id) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'You do not have access to this mailbox',
}
}, 403);
}
// 解析分页参数
const page = Math.max(1, parseInt(c.req.query('page') || '1', 10));
const limit = Math.min(100, Math.max(1, parseInt(c.req.query('limit') || '20', 10)));
const sort = c.req.query('sort') === 'asc' ? 'asc' : 'desc';
const { messages, total, totalPages } = await getMailboxMessages(db, mailbox.address, { page, limit, sort });
return c.json({
data: messages.map((msg) => ({
id: msg.id,
from: msg.from,
subject: msg.subject,
preview: msg.text?.substring(0, 100) || null,
receivedAt: msg.createdAt.toISOString(),
})),
pagination: {
page,
limit,
total,
totalPages,
hasMore: page < totalPages,
}
});
});
// GET /api/v1/mailboxes/:id/messages/:messageId - 获取邮件详情
mailboxesRouter.get('/:id/messages/:messageId', async (c) => {
const db = getD1DB(c.env.DB);
const apiKey = c.get('apiKey') as { id: string; rateLimit: number };
const { id, messageId } = c.req.param();
const mailbox = await findMailboxById(db, id);
if (!mailbox) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Mailbox not found',
}
}, 404);
}
// 验证所属关系
if (mailbox.apiKeyId !== apiKey.id) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'You do not have access to this mailbox',
}
}, 403);
}
const message = await findMailboxMessage(db, mailbox.address, messageId);
if (!message) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Message not found',
}
}, 404);
}
return c.json({
data: {
id: message.id,
messageId: message.messageId,
from: message.from,
to: message.to,
cc: message.cc,
bcc: message.bcc,
replyTo: message.replyTo,
subject: message.subject,
text: message.text,
html: message.html,
headers: message.headers,
receivedAt: message.createdAt.toISOString(),
}
});
});
// DELETE /api/v1/mailboxes/:id/messages/:messageId - 删除邮件
mailboxesRouter.delete('/:id/messages/:messageId', async (c) => {
const db = getD1DB(c.env.DB);
const apiKey = c.get('apiKey') as { id: string; rateLimit: number };
const { id, messageId } = c.req.param();
const mailbox = await findMailboxById(db, id);
if (!mailbox) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Mailbox not found',
}
}, 404);
}
// 验证所属关系
if (mailbox.apiKeyId !== apiKey.id) {
return c.json({
error: {
code: 'FORBIDDEN',
message: 'You do not have access to this mailbox',
}
}, 403);
}
const deleted = await deleteMailboxMessage(db, mailbox.address, messageId);
if (!deleted) {
return c.json({
error: {
code: 'NOT_FOUND',
message: 'Message not found',
}
}, 404);
}
return c.json({
data: {
deleted: true,
id: messageId,
}
});
});
export default mailboxesRouter;
+217 -2
View File
@@ -1,8 +1,8 @@
import { count, desc, eq, and, inArray, lt } from "drizzle-orm";
import { count, desc, asc, eq, and, inArray, lt } from "drizzle-orm";
// fix: 将数据库类型从 LibSQLDatabase 更改为 DrizzleD1Database,以匹配 Cloudflare D1
import { DrizzleD1Database } from "drizzle-orm/d1";
// refactor: 更新 schema 的导入路径
import { emails, InsertEmail } from "./schema";
import { emails, InsertEmail, apiKeys, InsertApiKey, mailboxes, InsertMailbox } from "./schema";
export async function insertEmail(db: DrizzleD1Database, email: InsertEmail) {
try {
@@ -99,4 +99,219 @@ export async function deleteExpiredEmails(db: DrizzleD1Database, expirationTime:
// 并返回一个表示删除数量为0的对象
return { count: 0 };
}
}
// ==================== API Key 相关函数 ====================
/**
* 通过 API Key 值查找记录
*/
export async function findApiKeyByKey(db: DrizzleD1Database, key: string) {
try {
const result = await db
.select()
.from(apiKeys)
.where(eq(apiKeys.key, key))
.execute();
return result.length === 1 ? result[0] : null;
} catch (e) {
console.error('findApiKeyByKey error:', e);
return null;
}
}
/**
* 更新 API Key 最后使用时间
*/
export async function updateApiKeyLastUsed(db: DrizzleD1Database, id: string) {
try {
await db
.update(apiKeys)
.set({ lastUsedAt: new Date(), updatedAt: new Date() })
.where(eq(apiKeys.id, id))
.execute();
} catch (e) {
console.error('updateApiKeyLastUsed error:', e);
}
}
/**
* 创建 API Key
*/
export async function insertApiKey(db: DrizzleD1Database, apiKey: InsertApiKey) {
try {
await db.insert(apiKeys).values(apiKey).execute();
return apiKey;
} catch (e) {
console.error('insertApiKey error:', e);
return null;
}
}
// ==================== Mailbox 相关函数 ====================
/**
* 创建邮箱
*/
export async function insertMailbox(db: DrizzleD1Database, mailbox: InsertMailbox) {
try {
await db.insert(mailboxes).values(mailbox).execute();
return mailbox;
} catch (e) {
console.error('insertMailbox error:', e);
throw e;
}
}
/**
* 通过 ID 查找邮箱
*/
export async function findMailboxById(db: DrizzleD1Database, id: string) {
try {
const result = await db
.select()
.from(mailboxes)
.where(eq(mailboxes.id, id))
.execute();
return result.length === 1 ? result[0] : null;
} catch (e) {
console.error('findMailboxById error:', e);
return null;
}
}
/**
* 通过邮箱地址查找邮箱
*/
export async function findMailboxByAddress(db: DrizzleD1Database, address: string) {
try {
const result = await db
.select()
.from(mailboxes)
.where(eq(mailboxes.address, address))
.execute();
return result.length === 1 ? result[0] : null;
} catch (e) {
console.error('findMailboxByAddress error:', e);
return null;
}
}
/**
* 获取邮箱的邮件列表(带分页)
*/
export async function getMailboxMessages(
db: DrizzleD1Database,
address: string,
options: { page: number; limit: number; sort: 'asc' | 'desc' }
) {
try {
const offset = (options.page - 1) * options.limit;
const orderFn = options.sort === 'asc' ? asc : desc;
const [messages, countResult] = await Promise.all([
db
.select()
.from(emails)
.where(eq(emails.messageTo, address))
.orderBy(orderFn(emails.createdAt))
.limit(options.limit)
.offset(offset)
.execute(),
db
.select({ count: count() })
.from(emails)
.where(eq(emails.messageTo, address))
.execute(),
]);
const total = countResult[0]?.count || 0;
return {
messages,
total,
totalPages: Math.ceil(total / options.limit),
};
} catch (e) {
console.error('getMailboxMessages error:', e);
return { messages: [], total: 0, totalPages: 0 };
}
}
/**
* 获取特定邮箱的特定邮件(验证所属关系)
*/
export async function findMailboxMessage(
db: DrizzleD1Database,
address: string,
messageId: string
) {
try {
const result = await db
.select()
.from(emails)
.where(and(eq(emails.id, messageId), eq(emails.messageTo, address)))
.execute();
return result.length === 1 ? result[0] : null;
} catch (e) {
console.error('findMailboxMessage error:', e);
return null;
}
}
/**
* 删除特定邮箱的特定邮件(验证所属关系)
*/
export async function deleteMailboxMessage(
db: DrizzleD1Database,
address: string,
messageId: string
) {
try {
const result = await db
.delete(emails)
.where(and(eq(emails.id, messageId), eq(emails.messageTo, address)))
.execute();
return result.rowsAffected > 0;
} catch (e) {
console.error('deleteMailboxMessage error:', e);
return false;
}
}
/**
* 获取邮箱的邮件数量
*/
export async function getMailboxMessageCount(
db: DrizzleD1Database,
address: string
) {
try {
const result = await db
.select({ count: count() })
.from(emails)
.where(eq(emails.messageTo, address))
.execute();
return result[0]?.count || 0;
} catch (e) {
console.error('getMailboxMessageCount error:', e);
return 0;
}
}
/**
* 删除过期的邮箱
*/
export async function deleteExpiredMailboxes(db: DrizzleD1Database) {
try {
const now = new Date();
const result = await db
.delete(mailboxes)
.where(lt(mailboxes.expiresAt, now))
.execute();
return { count: result.rowsAffected };
} catch (e) {
console.error('deleteExpiredMailboxes error:', e);
return { count: 0 };
}
}
+34 -1
View File
@@ -1,7 +1,40 @@
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
import { integer, sqliteTable, text, index } from "drizzle-orm/sqlite-core";
import { createInsertSchema } from "drizzle-zod";
import * as z from "zod";
// ==================== API Keys 表 ====================
export const apiKeys = sqliteTable("api_keys", {
id: text("id").primaryKey(),
key: text("key").notNull().unique(), // API Key 值
keyPrefix: text("key_prefix").notNull(), // Key 前缀用于显示 (如 vmail_xxx...)
name: text("name"), // API Key 名称
rateLimit: integer("rate_limit").default(100), // 每分钟请求限制
isActive: integer("is_active", { mode: "boolean" }).default(true).notNull(),
lastUsedAt: integer("last_used_at", { mode: "timestamp" }),
expiresAt: integer("expires_at", { mode: "timestamp" }),
createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
});
export const insertApiKeySchema = createInsertSchema(apiKeys);
export type InsertApiKey = z.infer<typeof insertApiKeySchema>;
export type ApiKey = typeof apiKeys.$inferSelect;
// ==================== Mailboxes 表 ====================
export const mailboxes = sqliteTable("mailboxes", {
id: text("id").primaryKey(),
address: text("address").notNull().unique(), // 完整邮箱地址
domain: text("domain").notNull(), // 邮箱域名
expiresAt: integer("expires_at", { mode: "timestamp" }),
apiKeyId: text("api_key_id").notNull(), // 关联的 API Key ID
createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
});
export const insertMailboxSchema = createInsertSchema(mailboxes);
export type InsertMailbox = z.infer<typeof insertMailboxSchema>;
export type Mailbox = typeof mailboxes.$inferSelect;
// 定义 Header 类型,用于存储邮件头信息
export type Header = Record<string, string>;
+62 -1
View File
@@ -2,13 +2,15 @@ import { Hono } from 'hono';
import { serveStatic } from 'hono/cloudflare-workers';
import { cors } from 'hono/cors';
// 导入数据库相关的模块
import { deleteEmails, findEmailById, getEmailsByMessageTo, insertEmail, deleteExpiredEmails } from './database/dao';
import { deleteEmails, findEmailById, getEmailsByMessageTo, insertEmail, deleteExpiredEmails, insertApiKey } from './database/dao';
import { getD1DB } from './database/db';
import { InsertEmail, insertEmailSchema } from './database/schema';
import { nanoid } from 'nanoid/non-secure';
import PostalMime from 'postal-mime';
// 导入加解密工具函数
import { decrypt } from './utils';
// 导入 v1 API
import v1Api from './api/v1';
// 定义 Cloudflare 绑定和环境变量的类型
@@ -91,6 +93,62 @@ api.post('/verify', turnstile, async (c) => {
return c.json({ success: true });
});
// 生成 API Key 的函数
function generateApiKey(): string {
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let key = 'vmail_';
for (let i = 0; i < 32; i++) {
key += chars.charAt(Math.floor(Math.random() * chars.length));
}
return key;
}
// 创建 API Key 接口(需要 Turnstile 验证)
api.post('/api-keys', turnstile, async (c) => {
const db = getD1DB(c.env.DB);
const body = c.get('parsedBody') as { name?: string };
const now = new Date();
const apiKey = generateApiKey();
const keyPrefix = apiKey.substring(0, 12) + '...';
const newApiKey = {
id: nanoid(),
key: apiKey,
keyPrefix: keyPrefix,
name: body?.name || null,
rateLimit: 100,
isActive: true,
lastUsedAt: null,
expiresAt: null,
createdAt: now,
updatedAt: now,
};
try {
await insertApiKey(db, newApiKey);
// 只返回一次完整的 API Key,之后无法再获取
return c.json({
data: {
id: newApiKey.id,
key: apiKey, // 完整的 API Key,只展示这一次
keyPrefix: keyPrefix,
name: newApiKey.name,
createdAt: now.toISOString(),
},
message: 'API Key created successfully. Please save it now, it will not be shown again!'
}, 201);
} catch (e: any) {
console.error('Create API Key error:', e);
return c.json({
error: {
code: 'INTERNAL_ERROR',
message: 'Failed to create API Key',
}
}, 500);
}
});
// fix: 移除获取邮件列表接口的 turnstile 验证。
// 这个接口现在是公开的,刷新收件箱时可以直接调用,不再需要重复验证。
api.post('/emails', async (c) => {
@@ -186,6 +244,9 @@ app.get('/config', (c) => {
});
});
// 挂载 v1 API 路由
app.route('/api/v1', v1Api);
// 静态资源服务 (放在最后,作为默认路由)
// 修正: 确保 serveStatic 正确指向静态文件目录