@shumai-one/shumai 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-2xgvs3as.js → chunk-07h4b77v.js} +2 -2
- package/bin/{chunk-gazp5662.js → chunk-0t4n4d5w.js} +2 -2
- package/bin/{chunk-x9akgj7w.js → chunk-1611z9jg.js} +2 -2
- package/bin/{chunk-kvnfgr29.js → chunk-1phqxp6z.js} +1 -1
- package/bin/chunk-23hckrrz.js +2 -0
- package/bin/{chunk-ymr5ybxk.js → chunk-30z44j1g.js} +2 -2
- package/bin/{chunk-fcsfssar.js → chunk-3j463k1g.js} +1 -1
- package/bin/{chunk-zye42cfp.js → chunk-4181tdds.js} +1 -1
- package/bin/chunk-480jtqng.js +4 -0
- package/bin/{chunk-m8z8jvdq.js → chunk-4c3g146q.js} +2 -2
- package/bin/chunk-4ca0zt5e.js +1 -0
- package/bin/chunk-4d9bgmf2.js +2 -0
- package/bin/{chunk-fvbd5dk7.js → chunk-4ev56fss.js} +5 -5
- package/bin/{chunk-zmyawgth.js → chunk-4gk52tjq.js} +1 -1
- package/bin/chunk-4mdqkj4d.js +1 -0
- package/bin/{chunk-mhps85dd.js → chunk-4r91fggc.js} +1 -1
- package/bin/chunk-50fb1x3w.js +1 -0
- package/bin/chunk-59gj1njz.js +1 -0
- package/bin/{chunk-j04sztp3.js → chunk-5pr0t7fb.js} +1 -1
- package/bin/chunk-5vewxmz7.js +3 -0
- package/bin/chunk-62zx96pe.js +2 -0
- package/bin/chunk-63y0eb07.js +2 -0
- package/bin/chunk-6d5xrgfx.js +2 -0
- package/bin/{chunk-etprs58p.js → chunk-6gbtz5bf.js} +2 -2
- package/bin/{chunk-wrgwjg2g.js → chunk-6gjg5egq.js} +1 -1
- package/bin/{chunk-4q782s34.js → chunk-6m4jz9s1.js} +3 -3
- package/bin/{chunk-wehhpcm1.js → chunk-6s4x525w.js} +1 -1
- package/bin/{chunk-xzag8w1v.js → chunk-6w2wmvqs.js} +1 -1
- package/bin/{chunk-r2shjtte.js → chunk-77d23vcn.js} +2 -2
- package/bin/{chunk-vhcqazqf.js → chunk-77m5p188.js} +2 -2
- package/bin/chunk-7bvx087f.js +1 -0
- package/bin/chunk-7pfjfrjg.js +5 -0
- package/bin/{chunk-1qr0ajc8.js → chunk-7q10s127.js} +1 -1
- package/bin/{chunk-c3msq02x.js → chunk-7thx8ctx.js} +2 -2
- package/bin/{chunk-vvhs586e.js → chunk-8t4s91gh.js} +1 -1
- package/bin/{chunk-k3r97v7j.js → chunk-98ey5p2e.js} +1 -1
- package/bin/{chunk-44edgqvy.js → chunk-9amndcyh.js} +3 -3
- package/bin/chunk-9bk23g9x.js +1 -0
- package/bin/chunk-9mkcfy43.js +1 -0
- package/bin/{chunk-0h8rjeyj.js → chunk-9t3nsq5n.js} +2 -2
- package/bin/{chunk-j536e9nx.js → chunk-9tjq99ds.js} +2 -2
- package/bin/chunk-9wm9rwh1.js +2 -0
- package/bin/{chunk-nz2v1jmd.js → chunk-ab16fyg4.js} +2 -2
- package/bin/chunk-arv0g2av.js +1 -0
- package/bin/{chunk-hx2mvd20.js → chunk-aytj4zxg.js} +2 -2
- package/bin/{chunk-02afmyqy.js → chunk-b1ypjqgp.js} +2 -2
- package/bin/{chunk-93ecxcy4.js → chunk-bdjv0ykq.js} +1 -1
- package/bin/chunk-c1k86mfa.js +10 -0
- package/bin/{chunk-wy2f6mby.js → chunk-caa96dgd.js} +1 -1
- package/bin/chunk-ce4v2yjy.js +1 -0
- package/bin/{chunk-m2tbft2c.js → chunk-cqh60y54.js} +2 -2
- package/bin/chunk-cvq7zgw7.js +1 -0
- package/bin/{chunk-tcm57j8r.js → chunk-d9mjbtp2.js} +2 -2
- package/bin/{chunk-xkhwj8mw.js → chunk-dn7sbjws.js} +2 -2
- package/bin/{chunk-p49h5fxs.js → chunk-dxyq9h8n.js} +1 -1
- package/bin/{chunk-3twtxs5m.js → chunk-e3cabksx.js} +1 -1
- package/bin/{chunk-52dr035y.js → chunk-egcrbj94.js} +2 -2
- package/bin/chunk-ev17v1mv.js +2 -0
- package/bin/chunk-evtpwg71.js +2 -0
- package/bin/{chunk-2rbexbv0.js → chunk-f3e0nsv2.js} +1 -1
- package/bin/chunk-f40gjqpq.js +2 -0
- package/bin/chunk-fe7822ak.js +299 -0
- package/bin/{chunk-4b7jcpgv.js → chunk-g8tkhw9j.js} +2 -2
- package/bin/{chunk-mgnxa0vy.js → chunk-g9r0p4t8.js} +1 -1
- package/bin/chunk-gbjyh9ms.js +1 -0
- package/bin/{chunk-thbfw1ed.js → chunk-gtbsb39v.js} +1 -1
- package/bin/{chunk-zh752hw8.js → chunk-gytz1q13.js} +1 -1
- package/bin/chunk-h0fxysxs.js +7 -0
- package/bin/{chunk-aw5zkdma.js → chunk-h8bdvsqt.js} +2 -2
- package/bin/{chunk-76433x4d.js → chunk-hag024w8.js} +2 -2
- package/bin/chunk-hc6w5nw4.js +7 -0
- package/bin/chunk-j69dqc48.js +2 -0
- package/bin/{chunk-yfqz6f72.js → chunk-jbtw1zym.js} +1 -1
- package/bin/{chunk-9k76s3y6.js → chunk-jc1vb7rj.js} +2 -2
- package/bin/{chunk-41d9gkx7.js → chunk-jdv78w9r.js} +1 -1
- package/bin/{chunk-dag45evp.js → chunk-jjs70y9v.js} +1 -1
- package/bin/{chunk-ysvhtgve.js → chunk-jmdar2gz.js} +2 -2
- package/bin/chunk-jvwz10n4.js +2 -0
- package/bin/{chunk-ck6msfch.js → chunk-k47md1g4.js} +2 -2
- package/bin/{chunk-yyjx8nbq.js → chunk-k4v0brcb.js} +1 -1
- package/bin/chunk-k6n7c07e.js +1 -0
- package/bin/{chunk-kjjhvrk1.js → chunk-kk2cstsg.js} +1 -1
- package/bin/{chunk-3r33kewe.js → chunk-knz4h56q.js} +3 -3
- package/bin/{chunk-j5rx3x1q.js → chunk-kqqtt6bd.js} +1 -1
- package/bin/{chunk-ez6veng7.js → chunk-kvyp1t4j.js} +1 -1
- package/bin/{chunk-djx2r4nj.js → chunk-kxskpgsq.js} +2 -2
- package/bin/{chunk-3gjn4pyp.js → chunk-m6srbjcs.js} +2 -2
- package/bin/{chunk-8956rryj.js → chunk-mcc1scxs.js} +2 -2
- package/bin/{chunk-0bfqrx5q.js → chunk-mq83a0kk.js} +2 -2
- package/bin/chunk-mxm8g4q0.js +1 -0
- package/bin/{chunk-6m1k317a.js → chunk-nhpgdqq5.js} +2 -2
- package/bin/{chunk-pdjar480.js → chunk-nne496aa.js} +2 -2
- package/bin/{chunk-s73c0brj.js → chunk-nqpb0r9h.js} +1 -1
- package/bin/chunk-ns0zww9g.js +2 -0
- package/bin/{chunk-9cmvymm5.js → chunk-ps4xfp23.js} +1 -1
- package/bin/chunk-pz2ec6xt.js +2 -0
- package/bin/{chunk-vkgxrn1h.js → chunk-q163k309.js} +2 -2
- package/bin/chunk-q1da61ps.js +1 -0
- package/bin/{chunk-7x1vkftb.js → chunk-qrf0ady6.js} +2 -2
- package/bin/{chunk-d7en47eh.js → chunk-qy28f25e.js} +1 -1
- package/bin/{chunk-xjnghr99.js → chunk-r7s4ypw1.js} +1 -1
- package/bin/chunk-ran23vm9.js +1 -0
- package/bin/chunk-rfvdc4n0.js +2 -0
- package/bin/{chunk-8rcfhfq5.js → chunk-rgthkvgx.js} +1 -1
- package/bin/chunk-s39n3yw3.js +2 -0
- package/bin/{chunk-xv5h4dv1.js → chunk-s7wdd0g7.js} +1 -1
- package/bin/{chunk-n8gsjwht.js → chunk-s88ha5kx.js} +2 -2
- package/bin/chunk-sf91bt9m.js +2 -0
- package/bin/{chunk-2x46963w.js → chunk-sjwbjf9j.js} +1 -1
- package/bin/chunk-t62076pv.js +1 -0
- package/bin/{chunk-he1ywtxx.js → chunk-tbbwss3v.js} +1 -1
- package/bin/{chunk-06spnkta.js → chunk-tjcc7a6y.js} +1 -1
- package/bin/{chunk-qac5hr5h.js → chunk-tp6ab26e.js} +1 -1
- package/bin/{chunk-md12a1sf.js → chunk-v2wxk9p5.js} +2 -2
- package/bin/chunk-vbk6y4hk.js +2 -0
- package/bin/{chunk-vcf2qk9h.js → chunk-vfgfg5fk.js} +2 -2
- package/bin/{chunk-gjnrd32m.js → chunk-vm6c3xx9.js} +2 -2
- package/bin/{chunk-agabtxrc.js → chunk-vsx96mt6.js} +1 -1
- package/bin/{chunk-et0cewj7.js → chunk-wbyw1shz.js} +2 -2
- package/bin/chunk-whh2vh50.css +1 -0
- package/bin/{chunk-792t2653.js → chunk-wjkcq65s.js} +2 -2
- package/bin/{chunk-5yhn31rd.js → chunk-wkefwkfp.js} +1 -1
- package/bin/{chunk-gcc6pte2.js → chunk-x7bsnk1e.js} +2 -2
- package/bin/{chunk-tn67sjb2.js → chunk-xbhw6bpz.js} +2 -2
- package/bin/{chunk-34kaja59.js → chunk-xg5yrcj5.js} +2 -2
- package/bin/{chunk-wzmpvadf.js → chunk-xw2gpcsh.js} +1 -1
- package/bin/{chunk-sx6y697s.js → chunk-ycq8ank7.js} +1 -1
- package/bin/chunk-yp9hvkc5.js +73 -0
- package/bin/{chunk-dkjkn8t3.js → chunk-ytypyfkc.js} +2 -2
- package/bin/{chunk-62ebss6h.js → chunk-z1kjmf60.js} +2 -2
- package/bin/chunk-z36bx86r.js +2 -0
- package/bin/chunk-z7hdnecp.js +3 -0
- package/bin/chunk-zeby1cq7.js +2 -0
- package/bin/chunk-zs5e8z1w.js +1 -0
- package/bin/chunk-zxnyefg5.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +312 -342
- package/package.json +7 -7
- package/prisma/schema.prisma +1 -1
- package/bin/chunk-045f1bw7.js +0 -2
- package/bin/chunk-0n1wfwcm.js +0 -2
- package/bin/chunk-1fwzepfn.js +0 -2
- package/bin/chunk-2xevs82j.js +0 -2
- package/bin/chunk-31y5j4hr.js +0 -1
- package/bin/chunk-34adtqqh.js +0 -1
- package/bin/chunk-4j8fbckp.js +0 -1
- package/bin/chunk-57s7yj35.js +0 -1
- package/bin/chunk-6tse78c7.js +0 -2
- package/bin/chunk-8nyve0cr.js +0 -7
- package/bin/chunk-ajndx51c.js +0 -2
- package/bin/chunk-bbyc2jfq.js +0 -1
- package/bin/chunk-br7d2qwc.js +0 -1
- package/bin/chunk-by6g0vye.js +0 -2
- package/bin/chunk-c24fvhm6.js +0 -1
- package/bin/chunk-c6aszz6p.js +0 -1
- package/bin/chunk-csqvmx1m.js +0 -2
- package/bin/chunk-dg8c91j5.js +0 -1
- package/bin/chunk-dk8vk17v.js +0 -2
- package/bin/chunk-ex2ym5pz.js +0 -2
- package/bin/chunk-f2zbsrc9.js +0 -2
- package/bin/chunk-gcpr2a24.js +0 -7
- package/bin/chunk-gpjkegdp.js +0 -1
- package/bin/chunk-jt6d0zb1.js +0 -2
- package/bin/chunk-jwgfkpek.js +0 -3
- package/bin/chunk-k2065y29.js +0 -2
- package/bin/chunk-k514bttd.js +0 -1
- package/bin/chunk-k7chm9a9.js +0 -2
- package/bin/chunk-kjgejwjp.css +0 -1
- package/bin/chunk-kqpzx5az.js +0 -73
- package/bin/chunk-kxr8fjsq.js +0 -2
- package/bin/chunk-mha3rsh7.js +0 -2
- package/bin/chunk-nn0px81k.js +0 -307
- package/bin/chunk-ns804tmv.js +0 -2
- package/bin/chunk-p1temt1j.js +0 -1
- package/bin/chunk-rkz6x3r0.js +0 -2
- package/bin/chunk-svz0ds0g.js +0 -1
- package/bin/chunk-t31basc5.js +0 -1
- package/bin/chunk-t6qdrw24.js +0 -1
- package/bin/chunk-wvwqgff4.js +0 -1
- package/bin/chunk-ww1cy08p.js +0 -1
- package/bin/chunk-xfp27ya9.js +0 -2
- package/bin/chunk-y0f4bc9f.js +0 -2
- package/bin/chunk-y2s0tjaa.js +0 -3
- package/bin/chunk-y3dy4pdt.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{x as
|
|
1
|
+
import{Mh as W,Nh as U,Oh as P,Ph as w,Qh as O,Uh as h,Wh as I,Xh as V,ci as F}from"./chunk-ps4xfp23.js";import{um as K}from"./chunk-yp9hvkc5.js";function T($){return P($,Date.now())}function C($,_,M){let[A,N]=h(M?.in,$,_),q=b(A,N),B=Math.abs(I(A,N));A.setDate(A.getDate()-q*B);let E=Number(b(A,N)===-q),H=q*(B-E);return H===0?0:H}function b($,_){let M=$.getFullYear()-_.getFullYear()||$.getMonth()-_.getMonth()||$.getDate()-_.getDate()||$.getHours()-_.getHours()||$.getMinutes()-_.getMinutes()||$.getSeconds()-_.getSeconds()||$.getMilliseconds()-_.getMilliseconds();if(M<0)return-1;if(M>0)return 1;return M}function x($,_){return V(P(_?.in||$,$),T(_?.in||$))}function j($,_,M){return O($,-_,M)}function R($,_){return V(P(_?.in||$,$),j(T(_?.in||$),1))}function Z($,_){let M=()=>P(_?.in,NaN),A=_?.additionalDigits??2,N=k($),q;if(N.date){let G=g(N.date,A);q=y(G.restDateString,G.year)}if(!q||isNaN(+q))return M();let B=+q,E=0,H;if(N.time){if(E=S(N.time),isNaN(E))return M()}if(N.timezone){if(H=c(N.timezone),isNaN(H))return M()}else{let G=new Date(B+E),J=w(0,_?.in);return J.setFullYear(G.getUTCFullYear(),G.getUTCMonth(),G.getUTCDate()),J.setHours(G.getUTCHours(),G.getUTCMinutes(),G.getUTCSeconds(),G.getUTCMilliseconds()),J}return w(B+E+H,_?.in)}var X={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Y=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,f=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,v=/^([+-])(\d{2})(?::?(\d{2}))?$/;function k($){let _={},M=$.split(X.dateTimeDelimiter),A;if(M.length>2)return _;if(/:/.test(M[0]))A=M[0];else if(_.date=M[0],A=M[1],X.timeZoneDelimiter.test(_.date))_.date=$.split(X.timeZoneDelimiter)[0],A=$.substr(_.date.length,$.length);if(A){let N=X.timezone.exec(A);if(N)_.time=A.replace(N[1],""),_.timezone=N[1];else _.time=A}return _}function g($,_){let M=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+_)+"})|(\\d{2}|[+-]\\d{"+(2+_)+"})$)"),A=$.match(M);if(!A)return{year:NaN,restDateString:""};let N=A[1]?parseInt(A[1]):null,q=A[2]?parseInt(A[2]):null;return{year:q===null?N:q*100,restDateString:$.slice((A[1]||A[2]).length)}}function y($,_){if(_===null)return new Date(NaN);let M=$.match(Y);if(!M)return new Date(NaN);let A=!!M[4],N=Q(M[1]),q=Q(M[2])-1,B=Q(M[3]),E=Q(M[4]),H=Q(M[5])-1;if(A){if(!l(_,E,H))return new Date(NaN);return m(_,E,H)}else{let G=new Date(0);if(!u(_,q,B)||!D(_,N))return new Date(NaN);return G.setUTCFullYear(_,q,Math.max(N,B)),G}}function Q($){return $?parseInt($):1}function S($){let _=$.match(f);if(!_)return NaN;let M=L(_[1]),A=L(_[2]),N=L(_[3]);if(!o(M,A,N))return NaN;return M*U+A*W+N*1000}function L($){return $&&parseFloat($.replace(",","."))||0}function c($){if($==="Z")return 0;let _=$.match(v);if(!_)return 0;let M=_[1]==="+"?-1:1,A=parseInt(_[2]),N=_[3]&&parseInt(_[3])||0;if(!n(A,N))return NaN;return M*(A*U+N*W)}function m($,_,M){let A=new Date(0);A.setUTCFullYear($,0,4);let N=A.getUTCDay()||7,q=(_-1)*7+M+1-N;return A.setUTCDate(A.getUTCDate()+q),A}var p=[31,null,31,30,31,30,31,31,30,31,30,31];function z($){return $%400===0||$%4===0&&$%100!==0}function u($,_,M){return _>=0&&_<=11&&M>=1&&M<=(p[_]||(z($)?29:28))}function D($,_){return _>=1&&_<=(z($)?366:365)}function l($,_,M){return _>=1&&_<=53&&M>=0&&M<=6}function o($,_,M){if($===24)return _===0&&M===0;return M>=0&&M<60&&_>=0&&_<60&&$>=0&&$<25}function n($,_){return _>=0&&_<=59}var X0=($)=>{let _=Z($),M=new Date;if(isNaN(_.getTime()))return $;let A=F(_,"HH:mm");if(x(_))return K.today_with_time({time:A});if(R(_))return K.yesterday_with_time({time:A});let N=C(M,_),q=N>=0?N:0;return q===1?K.n_days_ago_singular({count:q}):K.n_days_ago_plural({count:q})},Z0=($)=>{let _=Z($),M=new Date;if(isNaN(_.getTime()))return $;if(x(_))return K.today();if(R(_))return K.yesterday();let A=C(M,_),N=A>=0?A:0;return N===1?K.n_days_ago_singular({count:N}):K.n_days_ago_plural({count:N})},J0=($,_=new Date)=>{let M=typeof $==="string"?Z($).getTime():$ instanceof Date?$.getTime():NaN;if(isNaN(M))return"< 1m";let A=M-_.getTime();if(A<=0)return"< 1m";let N=Math.floor(A/1000),q=Math.floor(N/86400),B=Math.floor(N%86400/3600),E=Math.floor(N%3600/60);if(q>0)return B>0?`${q}d ${B}h`:`${q}d`;if(B>0)return E>0?`${B}h ${E}m`:`${B}h`;return E>0?`${E}m`:"< 1m"};
|
|
2
|
+
export{x as Gh,R as Hh,Z as Ih,X0 as Jh,Z0 as Kh,J0 as Lh};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{mh as
|
|
1
|
+
import{mh as yw,nh as vw,oh as Vw}from"./chunk-ytypyfkc.js";import{xh as Dw}from"./chunk-mq83a0kk.js";import{aj as Yw,cj as s,dj as q0,um as H0,wj as Qw}from"./chunk-yp9hvkc5.js";import{sn as Gw}from"./chunk-dxyq9h8n.js";var V0=Object.create(null),P0=(w)=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(w?V0:globalThis),I0=new Proxy(V0,{get(w,X){return P0()[X]??V0[X]},has(w,X){return X in P0()||X in V0},set(w,X,G){let Y=P0(!0);return Y[X]=G,!0},deleteProperty(w,X){if(!X)return!1;let G=P0(!0);return delete G[X],!0},ownKeys(){let w=P0(!0);return Object.keys(w)}});var nw=typeof process<"u"&&process.env&&"production"||"";function L0(w,X){if(typeof process<"u"&&process.env)return process.env[w]??X;if(typeof Deno<"u")return Deno.env.get(w)??X;if(typeof Bun<"u")return Bun.env[w]??X;return X}var rw=Object.freeze({get BETTER_AUTH_SECRET(){return L0("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return L0("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return L0("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return L0("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return L0("NODE_ENV","development")},get PACKAGE_VERSION(){return L0("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return L0("BETTER_AUTH_TELEMETRY_ENDPOINT","")}});function sw(){let w=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");if(w===void 0)return Object.isExtensible(Error);return Object.prototype.hasOwnProperty.call(w,"writable")?w.writable:w.set!==void 0}function tw(w){let X=w.split(`
|
|
2
2
|
at `);if(X.length<=1)return w;return X.splice(1,1),X.join(`
|
|
3
3
|
at `)}function aw(w,X){class G extends w{#w;constructor(...Y){if(sw()){let Z=Error.stackTraceLimit;Error.stackTraceLimit=0;super(...Y);Error.stackTraceLimit=Z}else super(...Y);let W=Error().stack;if(W)this.#w=tw(W.replace(/^Error/,this.name))}get errorStack(){return this.#w}}return Object.defineProperty(G.prototype,"constructor",{get(){return X},enumerable:!1,configurable:!0}),G}var ow={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511},ew=class extends Error{constructor(w="INTERNAL_SERVER_ERROR",X=void 0,G={},Y=typeof w==="number"?w:ow[w]){super(X?.message,X?.cause?{cause:X.cause}:void 0);this.status=w,this.body=X,this.headers=G,this.statusCode=Y,this.name="APIError",this.status=w,this.headers=G,this.statusCode=Y,this.body=X}};var w2=aw(ew,Error);var O0=class extends Error{constructor(w,X){super(w,X);this.name="BetterAuthError",this.message=w,this.stack=""}};function X2(w){try{return(new URL(w).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new O0(`Invalid base URL: ${w}. Please provide a valid base URL.`)}}function G2(w){try{let X=new URL(w);if(X.protocol!=="http:"&&X.protocol!=="https:")throw new O0(`Invalid base URL: ${w}. URL must include 'http://' or 'https://'`)}catch(X){if(X instanceof O0)throw X;throw new O0(`Invalid base URL: ${w}. Please provide a valid base URL.`,{cause:X})}}function R0(w,X="/api/auth"){if(G2(w),X2(w))return w;let G=w.replace(/\/+$/,"");if(!X||X==="/")return G;return X=X.startsWith("/")?X:`/${X}`,`${G}${X}`}function y1(w,X){if(!w||w.trim()==="")return!1;if(X==="proto")return w==="http"||w==="https";if(X==="host"){if([/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some((G)=>G.test(w)))return!1;return/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(w)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(w)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(w)||/^localhost(:[0-9]{1,5})?$/i.test(w)}return!1}function v1(w,X,G,Y,W){if(w)return R0(w,X);if(Y!==!1){let z=I0.BETTER_AUTH_URL||I0.NEXT_PUBLIC_BETTER_AUTH_URL||I0.PUBLIC_BETTER_AUTH_URL||I0.NUXT_PUBLIC_BETTER_AUTH_URL||I0.NUXT_PUBLIC_AUTH_URL||(I0.BASE_URL!=="/"?I0.BASE_URL:void 0);if(z)return R0(z,X)}let Z=G?.headers.get("x-forwarded-host"),Q=G?.headers.get("x-forwarded-proto");if(Z&&Q&&W){if(y1(Q,"proto")&&y1(Z,"host"))try{return R0(`${Q}://${Z}`,X)}catch(z){}}if(G){let z=Y2(G.url);if(!z)throw new O0("Could not get origin from request. Please provide a valid base URL.");return R0(z,X)}if(typeof window<"u"&&window.location)return R0(window.location.origin,X)}function Y2(w){try{let X=new URL(w);return X.origin==="null"?null:X.origin}catch{return null}}var Z2={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},J2=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,V1={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},W2=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Q2(w){return w instanceof Date&&!isNaN(w.getTime())}function D2(w){let X=W2.exec(w);if(!X)return null;let[,G,Y,W,Z,Q,z,M,H,T,U]=X,N=new Date(Date.UTC(parseInt(G,10),parseInt(Y,10)-1,parseInt(W,10),parseInt(Z,10),parseInt(Q,10),parseInt(z,10),M?parseInt(M.padEnd(3,"0"),10):0));if(H){let A=(parseInt(T,10)*60+parseInt(U,10))*(H==="+"?-1:1);N.setUTCMinutes(N.getUTCMinutes()+A)}return Q2(N)?N:null}function I2(w,X={}){let{strict:G=!1,warnings:Y=!1,reviver:W,parseDates:Z=!0}=X;if(typeof w!=="string")return w;let Q=w.trim();if(Q.length>0&&Q[0]==='"'&&Q.endsWith('"')&&!Q.slice(1,-1).includes('"'))return Q.slice(1,-1);let z=Q.toLowerCase();if(z.length<=9&&z in V1)return V1[z];if(!J2.test(Q)){if(G)throw SyntaxError("[better-json] Invalid JSON");return w}if(Object.entries(Z2).some(([M,H])=>{let T=H.test(Q);if(T&&Y)console.warn(`[better-json] Detected potential prototype pollution attempt using ${M} pattern`);return T})&&G)throw Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(Q,(H,T)=>{if(H==="__proto__"||H==="constructor"&&T&&typeof T==="object"&&"prototype"in T){if(Y)console.warn(`[better-json] Dropping "${H}" key to prevent prototype pollution`);return}if(Z&&typeof T==="string"){let U=D2(T);if(U)return U}return W?W(H,T):T})}catch(M){if(G)throw M;return w}}function h1(w,X={strict:!0}){return I2(w,X)}var f1={id:"redirect",name:"Redirect",hooks:{onSuccess(w){if(w.data?.url&&w.data?.redirect){if(typeof window<"u"&&window.location){if(window.location)try{window.location.href=w.data.url}catch{}}}}}};var G0=[],K0=0,h0=4,z2=globalThis.nanostoresGlobal||={epoch:0},_0=(w)=>{let X=[],G={get(){if(!G.lc)G.listen(()=>{})();return G.value},init:w,lc:0,listen(Y){return G.lc=X.push(Y),()=>{for(let Z=K0+h0;Z<G0.length;)if(G0[Z]===Y)G0.splice(Z,h0);else Z+=h0;let W=X.indexOf(Y);if(~W){if(X.splice(W,1),!--G.lc)G.off()}}},notify(Y,W){z2.epoch++;let Z=!G0.length;for(let Q of X)G0.push(Q,G.value,Y,W);if(Z){for(K0=0;K0<G0.length;K0+=h0)G0[K0](G0[K0+1],G0[K0+2],G0[K0+3]);G0.length=0}},off(){},set(Y){let W=G.value;if(W!==Y)G.value=Y,G.notify(W)},subscribe(Y){let W=G.listen(Y);return Y(G.value),W},value:w};return G};var M2=5,f0=6,c0=10,L2=(w,X,G,Y)=>{if(w.events=w.events||{},!w.events[G+c0])w.events[G+c0]=Y((W)=>{w.events[G].reduceRight((Z,Q)=>(Q(Z),Z),{shared:{},...W})});return w.events[G]=w.events[G]||[],w.events[G].push(X),()=>{let W=w.events[G],Z=W.indexOf(X);if(W.splice(Z,1),!W.length)delete w.events[G],w.events[G+c0](),delete w.events[G+c0]}};var c1=1000,S0=(w,X)=>{return L2(w,(Y)=>{let W=X(Y);if(W)w.events[f0].push(W)},M2,(Y)=>{let W=w.listen;w.listen=(...Q)=>{if(!w.lc&&!w.active)w.active=!0,Y();return W(...Q)};let Z=w.off;return w.events[f0]=[],w.off=()=>{Z(),setTimeout(()=>{if(w.active&&!w.lc){w.active=!1;for(let Q of w.events[f0])Q();w.events[f0]=[]}},c1)},()=>{w.listen=W,w.off=Z}})};function Y1(w,X,G){let Y=new Set(X).add(void 0);return w.listen((W,Z,Q)=>{if(Y.has(Q))G(W,Z,Q)})}var K2=()=>typeof window>"u",m1=(w,X,G,Y)=>{let W=_0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:(z)=>Z(z)}),Z=async(z)=>{return new Promise((M)=>{let H=typeof Y==="function"?Y({data:W.get().data,error:W.get().error,isPending:W.get().isPending}):Y;G(X,{...H,query:{...H?.query,...z?.query},async onSuccess(T){W.set({data:T.data,error:null,isPending:!1,isRefetching:!1,refetch:W.value.refetch}),await H?.onSuccess?.(T)},async onError(T){let{request:U}=T,N=typeof U.retry==="number"?U.retry:U.retry?.attempts,A=U.retryAttempt||0;if(N&&A<N)return;let k=T.error.status===401;W.set({error:T.error,data:k?null:W.get().data,isPending:!1,isRefetching:!1,refetch:W.value.refetch}),await H?.onError?.(T)},async onRequest(T){let U=W.get();W.set({isPending:U.data===null,data:U.data,error:null,isRefetching:!0,refetch:W.value.refetch}),await H?.onRequest?.(T)}}).catch((T)=>{W.set({error:T,data:W.get().data,isPending:!1,isRefetching:!1,refetch:W.value.refetch})}).finally(()=>{M(void 0)})})};w=Array.isArray(w)?w:[w];let Q=!1;for(let z of w)z.subscribe(async()=>{if(K2())return;if(Q)await Z();else S0(W,()=>{let M=setTimeout(async()=>{if(!Q)Q=!0,await Z()},0);return()=>{W.off(),z.off(),clearTimeout(M)}})});return W};var Z1=Symbol.for("better-auth:broadcast-channel"),T2=()=>Math.floor(Date.now()/1000),q2=class{listeners=new Set;name;constructor(w="better-auth.message"){this.name=w}subscribe(w){return this.listeners.add(w),()=>{this.listeners.delete(w)}}post(w){if(typeof window>"u")return;try{localStorage.setItem(this.name,JSON.stringify({...w,timestamp:T2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};let w=(X)=>{if(X.key!==this.name)return;let G=JSON.parse(X.newValue??"{}");if(G?.event!=="session"||!G?.data)return;this.listeners.forEach((Y)=>Y(G))};return window.addEventListener("storage",w),()=>{window.removeEventListener("storage",w)}}};function m0(w="better-auth.message"){if(!globalThis[Z1])globalThis[Z1]=new q2(w);return globalThis[Z1]}var J1=Symbol.for("better-auth:focus-manager"),H2=class{listeners=new Set;subscribe(w){return this.listeners.add(w),()=>{this.listeners.delete(w)}}setFocused(w){this.listeners.forEach((X)=>X(w))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};let w=()=>{if(document.visibilityState==="visible")this.setFocused(!0)};return document.addEventListener("visibilitychange",w,!1),()=>{document.removeEventListener("visibilitychange",w,!1)}}};function W1(){if(!globalThis[J1])globalThis[J1]=new H2;return globalThis[J1]}var Q1=Symbol.for("better-auth:online-manager"),B2=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(w){return this.listeners.add(w),()=>{this.listeners.delete(w)}}setOnline(w){this.isOnline=w,this.listeners.forEach((X)=>X(w))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};let w=()=>this.setOnline(!0),X=()=>this.setOnline(!1);return window.addEventListener("online",w,!1),window.addEventListener("offline",X,!1),()=>{window.removeEventListener("online",w,!1),window.removeEventListener("offline",X,!1)}}};function u0(){if(!globalThis[Q1])globalThis[Q1]=new B2;return globalThis[Q1]}var N0=()=>Math.floor(Date.now()/1000);function u1(w){if(typeof w==="object"&&w!==null&&"data"in w&&"error"in w)return w;return{data:w,error:null}}var U2=5;function d1(w){let{sessionAtom:X,sessionSignal:G,$fetch:Y,options:W={}}=w,Z=W.sessionOptions?.refetchInterval??0,Q=W.sessionOptions?.refetchOnWindowFocus??!0,z=W.sessionOptions?.refetchWhenOffline??!1,M={lastSync:0,lastSessionRequest:0,cachedSession:void 0},H=()=>{return z||u0().isOnline},T=(j)=>{if(!H())return;if(j?.event==="storage"){M.lastSync=N0(),G.set(!G.get());return}let V=X.get(),P=()=>{M.lastSessionRequest=N0(),Y("/get-session").then(async(O)=>{let{data:F,error:t}=u1(O);if(F?.needsRefresh)try{let a=await Y("/get-session",{method:"POST"});({data:F,error:t}=u1(a))}catch{}let z0=F?.session&&F?.user?F:null;X.set({...V,data:z0,error:t}),M.lastSync=N0(),G.set(!G.get())}).catch(()=>{})};if(j?.event==="poll"){P();return}if(j?.event==="visibilitychange"){if(N0()-M.lastSessionRequest<U2)return;M.lastSessionRequest=N0()}if(j?.event==="visibilitychange"){P();return}if(V?.data===null||V?.data===void 0)M.lastSync=N0(),G.set(!G.get())},U=(j)=>{m0().post({event:"session",data:{trigger:j},clientId:Math.random().toString(36).substring(7)})},N=()=>{if(Z&&Z>0)M.pollInterval=setInterval(()=>{if(X.get()?.data)T({event:"poll"})},Z*1000)},A=()=>{M.unsubscribeBroadcast=m0().subscribe(()=>{T({event:"storage"})})},k=()=>{if(!Q)return;M.unsubscribeFocus=W1().subscribe(()=>{T({event:"visibilitychange"})})},f=()=>{M.unsubscribeOnline=u0().subscribe((j)=>{if(j)T({event:"visibilitychange"})})};return{init:()=>{N(),A(),k(),f(),m0().setup(),W1().setup(),u0().setup()},cleanup:()=>{if(M.pollInterval)clearInterval(M.pollInterval),M.pollInterval=void 0;if(M.unsubscribeBroadcast)M.unsubscribeBroadcast(),M.unsubscribeBroadcast=void 0;if(M.unsubscribeFocus)M.unsubscribeFocus(),M.unsubscribeFocus=void 0;if(M.unsubscribeOnline)M.unsubscribeOnline(),M.unsubscribeOnline=void 0;M.lastSync=0,M.lastSessionRequest=0,M.cachedSession=void 0},triggerRefetch:T,broadcastSessionUpdate:U}}function p1(w,X){let G=_0(!1),Y=m1(G,"/get-session",w,{method:"GET"}),W=()=>{};return S0(Y,()=>{let Z=d1({sessionAtom:Y,sessionSignal:G,$fetch:w,options:X});return Z.init(),W=Z.broadcastSessionUpdate,()=>{Z.cleanup()}}),{session:Y,$sessionSignal:G,broadcastSessionUpdate:(Z)=>W(Z)}}function D1(w){if(w===null||typeof w!=="object")return!1;let X=Object.getPrototypeOf(w);if(X!==null&&X!==Object.prototype&&Object.getPrototypeOf(X)!==null)return!1;if(Symbol.iterator in w)return!1;if(Symbol.toStringTag in w)return Object.prototype.toString.call(w)==="[object Module]";return!0}function I1(w,X,G=".",Y){if(!D1(X))return I1(w,{},G,Y);let W={...X};for(let Z of Object.keys(w)){if(Z==="__proto__"||Z==="constructor")continue;let Q=w[Z];if(Q===null||Q===void 0)continue;if(Y&&Y(W,Z,Q,G))continue;if(Array.isArray(Q)&&Array.isArray(W[Z]))W[Z]=[...Q,...W[Z]];else if(D1(Q)&&D1(W[Z]))W[Z]=I1(Q,W[Z],(G?`${G}.`:"")+Z.toString(),Y);else W[Z]=Q}return W}function z1(w){return(...X)=>X.reduce((G,Y)=>I1(G,Y,"",w),{})}var i1=z1(),u6=z1((w,X,G)=>{if(w[X]!==void 0&&typeof G==="function")return w[X]=G(w[X]),!0}),d6=z1((w,X,G)=>{if(Array.isArray(w[X])&&typeof G==="function")return w[X]=G(w[X]),!0});var{defineProperty:C2,defineProperties:O2,getOwnPropertyDescriptors:N2,getOwnPropertySymbols:l1}=Object,A2=Object.prototype.hasOwnProperty,E2=Object.prototype.propertyIsEnumerable,n1=(w,X,G)=>(X in w)?C2(w,X,{enumerable:!0,configurable:!0,writable:!0,value:G}):w[X]=G,Y0=(w,X)=>{for(var G in X||(X={}))if(A2.call(X,G))n1(w,G,X[G]);if(l1){for(var G of l1(X))if(E2.call(X,G))n1(w,G,X[G])}return w},W0=(w,X)=>O2(w,N2(X)),j2=class extends Error{constructor(w,X,G){super(X||w.toString(),{cause:G});this.status=w,this.statusText=X,this.error=G,Error.captureStackTrace(this,this.constructor)}},$2=async(w,X)=>{var G,Y,W,Z,Q,z;let M=X||{},H={onRequest:[X==null?void 0:X.onRequest],onResponse:[X==null?void 0:X.onResponse],onSuccess:[X==null?void 0:X.onSuccess],onError:[X==null?void 0:X.onError],onRetry:[X==null?void 0:X.onRetry]};if(!X||!(X==null?void 0:X.plugins))return{url:w,options:M,hooks:H};for(let T of(X==null?void 0:X.plugins)||[]){if(T.init){let U=await((G=T.init)==null?void 0:G.call(T,w.toString(),X));M=U.options||M,w=U.url}H.onRequest.push((Y=T.hooks)==null?void 0:Y.onRequest),H.onResponse.push((W=T.hooks)==null?void 0:W.onResponse),H.onSuccess.push((Z=T.hooks)==null?void 0:Z.onSuccess),H.onError.push((Q=T.hooks)==null?void 0:Q.onError),H.onRetry.push((z=T.hooks)==null?void 0:z.onRetry)}return{url:w,options:M,hooks:H}},r1=class{constructor(w){this.options=w}shouldAttemptRetry(w,X){if(this.options.shouldRetry)return Promise.resolve(w<this.options.attempts&&this.options.shouldRetry(X));return Promise.resolve(w<this.options.attempts)}getDelay(){return this.options.delay}},F2=class{constructor(w){this.options=w}shouldAttemptRetry(w,X){if(this.options.shouldRetry)return Promise.resolve(w<this.options.attempts&&this.options.shouldRetry(X));return Promise.resolve(w<this.options.attempts)}getDelay(w){return Math.min(this.options.maxDelay,this.options.baseDelay*2**w)}};function P2(w){if(typeof w==="number")return new r1({type:"linear",attempts:w,delay:1000});switch(w.type){case"linear":return new r1(w);case"exponential":return new F2(w);default:throw Error("Invalid retry strategy")}}var R2=async(w)=>{let X={},G=async(Y)=>typeof Y==="function"?await Y():Y;if(w==null?void 0:w.auth){if(w.auth.type==="Bearer"){let Y=await G(w.auth.token);if(!Y)return X;X.authorization=`Bearer ${Y}`}else if(w.auth.type==="Basic"){let[Y,W]=await Promise.all([G(w.auth.username),G(w.auth.password)]);if(!Y||!W)return X;X.authorization=`Basic ${btoa(`${Y}:${W}`)}`}else if(w.auth.type==="Custom"){let[Y,W]=await Promise.all([G(w.auth.prefix),G(w.auth.value)]);if(!W)return X;X.authorization=`${Y!=null?Y:""} ${W}`}}return X},_2=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function S2(w){let X=w.headers.get("content-type"),G=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!X)return"json";let Y=X.split(";").shift()||"";if(_2.test(Y))return"json";if(G.has(Y)||Y.startsWith("text/"))return"text";return"blob"}function b2(w){try{return JSON.parse(w),!0}catch(X){return!1}}function M1(w){if(w===void 0)return!1;let X=typeof w;if(X==="string"||X==="number"||X==="boolean"||X===null)return!0;if(X!=="object")return!1;if(Array.isArray(w))return!0;if(w.buffer)return!1;return w.constructor&&w.constructor.name==="Object"||typeof w.toJSON==="function"}function s1(w){try{return JSON.parse(w)}catch(X){return w}}function t1(w){return typeof w==="function"}function x2(w){if(w==null?void 0:w.customFetchImpl)return w.customFetchImpl;if(typeof globalThis<"u"&&t1(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&t1(window.fetch))return window.fetch;throw Error("No fetch implementation found")}async function k2(w){let X=new Headers(w==null?void 0:w.headers),G=await R2(w);for(let[Y,W]of Object.entries(G||{}))X.set(Y,W);if(!X.has("content-type")){let Y=g2(w==null?void 0:w.body);if(Y)X.set("content-type",Y)}return X}function g2(w){if(M1(w))return"application/json";return null}function y2(w){if(!(w==null?void 0:w.body))return null;let X=new Headers(w==null?void 0:w.headers);if(M1(w.body)&&!X.has("content-type")){for(let[G,Y]of Object.entries(w==null?void 0:w.body))if(Y instanceof Date)w.body[G]=Y.toISOString();return JSON.stringify(w.body)}if(X.has("content-type")&&X.get("content-type")==="application/x-www-form-urlencoded"){if(M1(w.body))return new URLSearchParams(w.body).toString();return w.body}return w.body}function v2(w,X){var G;if(X==null?void 0:X.method)return X.method.toUpperCase();if(w.startsWith("@")){let Y=(G=w.split("@")[1])==null?void 0:G.split("/")[0];if(!a1.includes(Y))return(X==null?void 0:X.body)?"POST":"GET";return Y.toUpperCase()}return(X==null?void 0:X.body)?"POST":"GET"}function V2(w,X){let G;if(!(w==null?void 0:w.signal)&&(w==null?void 0:w.timeout))G=setTimeout(()=>X==null?void 0:X.abort(),w==null?void 0:w.timeout);return{abortTimeout:G,clearTimeout:()=>{if(G)clearTimeout(G)}}}var h2=class w extends Error{constructor(X,G){super(G||JSON.stringify(X,null,2));this.issues=X,Object.setPrototypeOf(this,w.prototype)}};async function d0(w,X){let G=await w["~standard"].validate(X);if(G.issues)throw new h2(G.issues);return G.value}var a1=["get","post","put","patch","delete"];var f2=(w)=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(X,G){var Y,W,Z,Q;let z=((W=(Y=w.plugins)==null?void 0:Y.find((M)=>{var H;return((H=M.schema)==null?void 0:H.config)?X.startsWith(M.schema.config.baseURL||"")||X.startsWith(M.schema.config.prefix||""):!1}))==null?void 0:W.schema)||w.schema;if(z){let M=X;if((Z=z.config)==null?void 0:Z.prefix){if(M.startsWith(z.config.prefix)){if(M=M.replace(z.config.prefix,""),z.config.baseURL)X=X.replace(z.config.prefix,z.config.baseURL)}}if((Q=z.config)==null?void 0:Q.baseURL){if(M.startsWith(z.config.baseURL))M=M.replace(z.config.baseURL,"")}let H=z.schema[M];if(H){let T=W0(Y0({},G),{method:H.method,output:H.output});if(!(G==null?void 0:G.disableValidation))T=W0(Y0({},T),{body:H.input?await d0(H.input,G==null?void 0:G.body):G==null?void 0:G.body,params:H.params?await d0(H.params,G==null?void 0:G.params):G==null?void 0:G.params,query:H.query?await d0(H.query,G==null?void 0:G.query):G==null?void 0:G.query});return{url:X,options:T}}}return{url:X,options:G}}}),o1=(w)=>{async function X(G,Y){let W=W0(Y0(Y0({},w),Y),{plugins:[...(w==null?void 0:w.plugins)||[],f2(w||{}),...(Y==null?void 0:Y.plugins)||[]]});if(w==null?void 0:w.catchAllError)try{return await L1(G,W)}catch(Z){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:Z}}}return await L1(G,W)}return X};function c2(w,X){let{baseURL:G,params:Y,query:W}=X||{query:{},params:{},baseURL:""},Z=w.startsWith("http")?w.split("/").slice(0,3).join("/"):G||"";if(w.startsWith("@")){let U=w.toString().split("@")[1].split("/")[0];if(a1.includes(U))w=w.replace(`@${U}/`,"/")}if(!Z.endsWith("/"))Z+="/";let[Q,z]=w.replace(Z,"").split("?"),M=new URLSearchParams(z);for(let[U,N]of Object.entries(W||{})){if(N==null)continue;let A;if(typeof N==="string")A=N;else if(Array.isArray(N)){for(let k of N)M.append(U,k);continue}else A=JSON.stringify(N);M.set(U,A)}if(Y)if(Array.isArray(Y)){let U=Q.split("/").filter((N)=>N.startsWith(":"));for(let[N,A]of U.entries()){let k=Y[N];Q=Q.replace(A,k)}}else for(let[U,N]of Object.entries(Y))Q=Q.replace(`:${U}`,String(N));if(Q=Q.split("/").map(encodeURIComponent).join("/"),Q.startsWith("/"))Q=Q.slice(1);let H=M.toString();if(H=H.length>0?`?${H}`.replace(/\+/g,"%20"):"",!Z.startsWith("http"))return`${Z}${Q}${H}`;return new URL(`${Q}${H}`,Z)}var L1=async(w,X)=>{var G,Y,W,Z,Q,z,M,H;let{hooks:T,url:U,options:N}=await $2(w,X),A=x2(N),k=new AbortController,f=(G=N.signal)!=null?G:k.signal,g=c2(U,N),y=y2(N),j=await k2(N),V=v2(U,N),P=W0(Y0({},N),{url:g,headers:j,body:y,method:V,signal:f});for(let $ of T.onRequest)if($){let R=await $(P);if(typeof R==="object"&&R!==null)P=R}if("pipeTo"in P&&typeof P.pipeTo==="function"||typeof((Y=X==null?void 0:X.body)==null?void 0:Y.pipe)==="function"){if(!("duplex"in P))P.duplex="half"}let{clearTimeout:O}=V2(N,k),F=await A(P.url,P);O();let t={response:F,request:P};for(let $ of T.onResponse)if($){let R=await $(W0(Y0({},t),{response:((W=X==null?void 0:X.hookOptions)==null?void 0:W.cloneResponse)?F.clone():F}));if(R instanceof Response)F=R;else if(typeof R==="object"&&R!==null)F=R.response}if(F.ok){if(P.method==="HEAD")return{data:"",error:null};let R=S2(F),b={data:null,response:F,request:P};if(R==="json"||R==="text"){let c=await F.text(),w0=(Z=P.jsonParser)!=null?Z:s1;b.data=await w0(c)}else b.data=await F[R]();if(P==null?void 0:P.output){if(P.output&&!P.disableValidation)b.data=await d0(P.output,b.data)}for(let c of T.onSuccess)if(c)await c(W0(Y0({},b),{response:((Q=X==null?void 0:X.hookOptions)==null?void 0:Q.cloneResponse)?F.clone():F}));if(X==null?void 0:X.throw)return b.data;return{data:b.data,error:null}}let z0=(z=X==null?void 0:X.jsonParser)!=null?z:s1,a=await F.text(),r=b2(a),M0=r?await z0(a):null,S={response:F,responseText:a,request:P,error:W0(Y0({},M0),{status:F.status,statusText:F.statusText})};for(let $ of T.onError)if($)await $(W0(Y0({},S),{response:((M=X==null?void 0:X.hookOptions)==null?void 0:M.cloneResponse)?F.clone():F}));if(X==null?void 0:X.retry){let $=P2(X.retry),R=(H=X.retryAttempt)!=null?H:0;if(await $.shouldAttemptRetry(R,F)){for(let c of T.onRetry)if(c)await c(t);let b=$.getDelay(R);return await new Promise((c)=>setTimeout(c,b)),await L1(w,W0(Y0({},X),{retryAttempt:R+1}))}}if(X==null?void 0:X.throw)throw new j2(F.status,F.statusText,r?M0:a);return{data:null,error:W0(Y0({},M0),{status:F.status,statusText:F.statusText})}};var m2=(w)=>{if(typeof process>"u")return;let X=w??"/api/auth";if(process.env.NEXT_PUBLIC_AUTH_URL)return process.env.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(process.env.NEXTAUTH_URL)try{return process.env.NEXTAUTH_URL}catch{}if(process.env.VERCEL_URL)try{let G=process.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${G}${process.env.VERCEL_URL}`).origin}${X}`}catch{}}},e1=(w,X)=>{let G="credentials"in Request.prototype,Y=v1(w?.baseURL,w?.basePath,void 0,X)??m2(w?.basePath)??"/api/auth",W=w?.plugins?.flatMap((O)=>O.fetchPlugins).filter((O)=>O!==void 0)||[],Z={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:w?.fetchOptions?.onSuccess,onError:w?.fetchOptions?.onError,onRequest:w?.fetchOptions?.onRequest,onResponse:w?.fetchOptions?.onResponse}},{onSuccess:Q,onError:z,onRequest:M,onResponse:H,...T}=w?.fetchOptions||{},U=o1({baseURL:Y,...G?{credentials:"include"}:{},method:"GET",jsonParser(O){if(!O)return null;return h1(O,{strict:!1})},customFetchImpl:fetch,...T,plugins:[Z,...T.plugins||[],...w?.disableDefaultFetchPlugins?[]:[f1],...W]}),{$sessionSignal:N,session:A,broadcastSessionUpdate:k}=p1(U,w),f=w?.plugins||[],g={},y={$sessionSignal:N,session:A},j={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},V=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/update-session"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/revoke-other-sessions"||O==="/change-email"||O==="/change-password"},callback(O){if(O==="/sign-out")k("signout");else if(O==="/update-user"||O==="/update-session")k("updateUser")}}];for(let O of f){if(O.getAtoms)Object.assign(y,O.getAtoms?.(U));if(O.pathMethods)Object.assign(j,O.pathMethods);if(O.atomListeners)V.push(...O.atomListeners)}let P={notify:(O)=>{y[O].set(!y[O].get())},listen:(O,F)=>{y[O].subscribe(F)},atoms:y};for(let O of f)if(O.getActions)g=i1(O.getActions?.(U,P,w)??{},g);return{get baseURL(){return Y},pluginsActions:g,pluginsAtoms:y,pluginPathMethods:j,atomListeners:V,$fetch:U,$store:P}};function ww(w){return typeof w==="object"&&w!==null&&"get"in w&&typeof w.get==="function"&&"lc"in w&&typeof w.lc==="number"}function u2(w,X,G){let Y=X[w],{fetchOptions:W,query:Z,...Q}=G||{};if(Y)return Y;if(W?.method)return W.method;if(Q&&Object.keys(Q).length>0)return"POST";return"GET"}function Xw(w,X,G,Y,W){function Z(Q=[]){return new Proxy(function(){},{get(z,M){if(typeof M!=="string")return;if(M==="then"||M==="catch"||M==="finally")return;let H=[...Q,M],T=w;for(let U of H)if(T&&typeof T==="object"&&U in T)T=T[U];else{T=void 0;break}if(typeof T==="function")return T;if(ww(T))return T;return Z(H)},apply:async(z,M,H)=>{let T="/"+Q.map((j)=>j.replace(/[A-Z]/g,(V)=>`-${V.toLowerCase()}`)).join("/"),U=H[0]||{},N=H[1]||{},{query:A,fetchOptions:k,...f}=U,g={...N,...k},y=u2(T,G,U);return await X(T,{...g,body:y==="GET"?void 0:{...f,...g?.body||{}},query:A||g?.query,method:y,async onSuccess(j){if(await g?.onSuccess?.(j),!W||g.disableSignal)return;let V=W.filter((O)=>O.matcher(T));if(!V.length)return;let P=new Set;for(let O of V){let F=Y[O.signal];if(!F)return;if(P.has(O.signal))continue;P.add(O.signal);let t=F.get();setTimeout(()=>{F.set(!t)},10),O.callback?.(T)}}})}})}return Z()}var A0=Gw(Yw(),1);function Zw(w,X={}){let G=A0.useRef(w.get()),{keys:Y,deps:W=[w,Y]}=X,Z=A0.useCallback((z)=>{let M=(H)=>{if(G.current===H)return;G.current=H,z()};if(M(w.value),Y?.length)return Y1(w,Y,M);return w.listen(M)},W),Q=()=>G.current;return A0.useSyncExternalStore(Z,Q,Q)}function Jw(w){return w.charAt(0).toUpperCase()+w.slice(1)}function d2(w){return`use${Jw(w)}`}function Ww(w){let{pluginPathMethods:X,pluginsActions:G,pluginsAtoms:Y,$fetch:W,$store:Z,atomListeners:Q}=e1(w),z={};for(let[M,H]of Object.entries(Y))z[d2(M)]=()=>Zw(H);return Xw({...G,...z,$fetch:W,$store:Z},W,X,Y,Q)}var p2=Ww({baseURL:window.location.origin}),{signIn:TX,signUp:qX,useSession:HX,signOut:BX,resetPassword:UX}=p2;function EX({children:w}){return q0("div",{className:"min-h-screen w-full flex items-center justify-center p-4 md:p-8 bg-zinc-100/80 dark:bg-black font-sans overflow-hidden relative",children:[s("div",{className:"bg-rose-500/10 dark:bg-rose-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute top-[-10%] left-[-10%] animate-drift-slow"}),s("div",{className:"bg-orange-500/10 dark:bg-orange-600/5 w-[600px] h-[600px] rounded-full blur-[140px] absolute bottom-[-10%] right-[-10%] animate-drift-medium"}),q0("div",{className:"relative max-w-4xl w-full flex flex-col md:flex-row rounded-3xl border border-zinc-200 dark:border-zinc-800 shadow-2xl bg-white dark:bg-zinc-900 overflow-hidden min-h-[580px] z-10 transition-all duration-300 hover:shadow-rose-500/5",children:[q0("div",{className:"hidden md:flex flex-col w-full md:w-1/2 bg-gradient-to-br from-rose-500/15 via-orange-500/10 to-amber-500/5 dark:from-rose-950/30 dark:via-orange-950/15 dark:to-zinc-900/40 p-8 md:p-12 justify-between border-r border-zinc-200 dark:border-zinc-800 relative overflow-hidden",children:[s("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none"}),q0("div",{className:"relative flex items-center gap-3",children:[s(Dw,{className:"h-12 w-12 shadow-lg shadow-rose-500/10 rounded-2xl transition-transform duration-500 hover:scale-105"}),s("span",{className:"text-xl font-extrabold tracking-tight bg-gradient-to-r from-rose-500 via-orange-500 to-amber-500 bg-clip-text text-transparent",children:"Shumai"})]}),q0("div",{className:"relative my-8 md:my-0 space-y-6",children:[s("h2",{className:"text-3xl font-extrabold tracking-tight leading-tight text-zinc-900 dark:text-zinc-50",children:H0.auth_tagline()}),s("p",{className:"text-zinc-600 dark:text-zinc-400 text-sm leading-relaxed max-w-sm",children:H0.auth_description()}),s("ul",{className:"space-y-3.5 pt-4",children:[H0.auth_feature_uploads(),H0.auth_feature_metadata(),H0.auth_feature_teams()].map((X,G)=>q0("li",{className:"flex items-center gap-3 text-sm text-zinc-700 dark:text-zinc-300 font-medium",children:[s(Qw,{className:"w-5 h-5 text-rose-500 flex-shrink-0"}),s("span",{children:X})]},G))})]}),s("div",{className:"relative pt-4 border-t border-zinc-200/30 dark:border-zinc-800/30",children:s("p",{className:"text-xs text-zinc-500 dark:text-zinc-400 font-medium",children:H0.auth_community_cta()})})]}),s("div",{className:"w-full md:w-1/2 p-8 md:p-12 flex flex-col justify-center",children:w})]})]})}var l=Gw(Yw(),1),k0=(w)=>w.type==="checkbox",U0=(w)=>w instanceof Date,i=(w)=>w==null,Nw=(w)=>typeof w==="object",h=(w)=>!i(w)&&!Array.isArray(w)&&Nw(w)&&!U0(w),i2=(w)=>h(w)&&w.target?k0(w.target)?w.target.checked:w.target.value:w,l2=(w,X)=>X.split(".").some((G,Y,W)=>!isNaN(Number(G))&&w.has(W.slice(0,Y).join("."))),n2=(w)=>{let X=w.constructor&&w.constructor.prototype;return h(X)&&X.hasOwnProperty("isPrototypeOf")},n0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function m(w){if(w instanceof Date)return new Date(w);let X=typeof FileList<"u"&&w instanceof FileList;if(n0&&(w instanceof Blob||X))return w;let G=Array.isArray(w);if(!G&&!(h(w)&&n2(w)))return w;let Y=G?[]:Object.create(Object.getPrototypeOf(w));for(let W in w)if(Object.prototype.hasOwnProperty.call(w,W))Y[W]=m(w[W]);return Y}var E0={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},J0={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Z0={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},K1="form",Aw="root",Ew=["__proto__","constructor","prototype"],g0=(w)=>/^\w*$/.test(w),v=(w)=>w===void 0,r0=(w)=>w.split(/[.[\]'"]/g).filter(Boolean),C=(w,X,G)=>{if(!X||!h(w))return G;let Y=g0(X)?[X]:r0(X);if(Y.some((Z)=>Ew.includes(Z)))return G;let W=Y.reduce((Z,Q)=>{return i(Z)?void 0:Z[Q]},w);return v(W)||W===w?v(w[X])?G:w[X]:W},Q0=(w)=>typeof w==="boolean",e=(w)=>typeof w==="function",x=(w,X,G)=>{let Y=-1,W=g0(X)?[X]:r0(X),Z=W.length,Q=Z-1;while(++Y<Z){let z=W[Y],M=G;if(Y!==Q){let H=w[z];M=h(H)||Array.isArray(H)?H:!isNaN(+W[Y+1])?[]:{}}if(Ew.includes(z))return;w[z]=M,w=w[z]}},r2=l.default.createContext(null);r2.displayName="HookFormControlContext";var s2=(w,X,G,Y=!0)=>{let W={};for(let Z in w)Object.defineProperty(W,Z,{get:()=>{let Q=Z;if(X._proxyFormState[Q]!==J0.all)X._proxyFormState[Q]=!Y||J0.all;return G&&(G[Q]=!0),w[Q]}});return W},t2=n0?l.default.useLayoutEffect:l.default.useEffect;var n=(w)=>typeof w==="string",a2=(w,X,G,Y,W)=>{if(n(w))return Y&&X.watch.add(w),C(G,w,W);if(Array.isArray(w))return w.map((Z)=>(Y&&X.watch.add(Z),C(G,Z)));return Y&&(X.watchAll=!0),G},q1=(w)=>i(w)||!Nw(w);function D0(w,X,G=new WeakSet){if(w===X)return!0;if(q1(w)||q1(X))return Object.is(w,X);if(U0(w)&&U0(X))return Object.is(w.getTime(),X.getTime());let Y=Object.keys(w),W=Object.keys(X);if(Y.length!==W.length)return!1;if(G.has(w)||G.has(X))return!0;G.add(w),G.add(X);for(let Z of Y){let Q=w[Z];if(!(Z in X))return!1;if(Z!=="ref"){let z=X[Z];if(U0(Q)&&U0(z)||(h(Q)||Array.isArray(Q))&&(h(z)||Array.isArray(z))?!D0(Q,z,G):!Object.is(Q,z))return!1}}return!0}var o2=l.default.createContext(null);o2.displayName="HookFormContext";var s0=(w,X,G,Y,W)=>X?{...G[w],types:{...G[w]&&G[w].types?G[w].types:{},[Y]:W||!0}}:{},jw=(w)=>Array.isArray(w)?w.filter(Boolean):[],p0=(w)=>Array.isArray(w)?w:[w],Iw=()=>{let w=[];return{get observers(){return w},next:(W)=>{for(let Z of w)Z.next&&Z.next(W)},subscribe:(W)=>{return w.push(W),{unsubscribe:()=>{w=w.filter((Z)=>Z!==W)}}},unsubscribe:()=>{w=[]}}};function $w(w,X){let G={};for(let Y in w)if(w.hasOwnProperty(Y)){let W=w[Y],Z=X[Y];if(W&&h(W)&&Z){let Q=$w(W,Z);if(h(Q))G[Y]=Q}else if(w[Y])G[Y]=Z}return G}var p=(w)=>h(w)&&!Object.keys(w).length,U1=(w)=>w.type==="file",i0=(w)=>{if(!n0)return!1;let X=w?w.ownerDocument:0;return w instanceof(X&&X.defaultView?X.defaultView.HTMLElement:HTMLElement)},Fw=(w)=>w.type==="select-multiple",C1=(w)=>w.type==="radio",e2=(w)=>C1(w)||k0(w),T1=(w)=>i0(w)&&w.isConnected;function w7(w,X){let G=X.slice(0,-1).length,Y=0;while(Y<G){if(i(w)){w=void 0;break}w=w[X[Y]],Y++}return w}function X7(w){for(let X in w)if(w.hasOwnProperty(X)&&!v(w[X]))return!1;return!0}function d(w,X){if(n(X)&&Object.prototype.hasOwnProperty.call(w,X))return delete w[X],w;let G=Array.isArray(X)?X:g0(X)?[X]:r0(X),Y=G.length===1?w:w7(w,G),W=G.length-1,Z=G[W];if(Y)delete Y[Z];if(W!==0&&(h(Y)&&p(Y)||Array.isArray(Y)&&X7(Y)))d(w,G.slice(0,-1));return w}var G7=(w)=>{for(let X in w)if(e(w[X]))return!0;return!1};function Pw(w){return Array.isArray(w)||h(w)&&!G7(w)}function H1(w,X={}){for(let G in w){let Y=w[G];if(Pw(Y))X[G]=Array.isArray(Y)?[]:{},H1(Y,X[G]);else if(!v(Y))X[G]=!0}return X}function B1(w){if(w===!1)return;if(w===!0)return!0;if(Array.isArray(w)){let X=w.map((G)=>B1(G));return X.some((G)=>G!==void 0)?X:void 0}if(h(w)){let X={};for(let G in w){let Y=B1(w[G]);if(!v(Y))X[G]=Y}return Object.keys(X).length?X:void 0}return}function B0(w,X,G){if(!G)G=H1(X);for(let Y in w){let W=w[Y];if(Pw(W))if(v(X)||q1(G[Y]))G[Y]=H1(W,Array.isArray(W)?[]:{});else B0(W,i(X)?{}:X[Y],G[Y]);else{let Z=X[Y];G[Y]=!D0(W,Z)}}return B1(G)||{}}var zw={value:!1,isValid:!1},Mw={value:!0,isValid:!0},Rw=(w)=>{if(Array.isArray(w)){if(w.length>1){let X=w.filter((G)=>G&&G.checked&&!G.disabled).map((G)=>G.value);return{value:X,isValid:!!X.length}}return w[0].checked&&!w[0].disabled?w[0].attributes&&!v(w[0].attributes.value)?v(w[0].value)||w[0].value===""?Mw:{value:w[0].value,isValid:!0}:Mw:zw}return zw},_w=(w,{valueAsNumber:X,valueAsDate:G,setValueAs:Y})=>v(w)?w:X?w===""?NaN:w?+w:w:G&&n(w)?new Date(w):Y?Y(w):w,Lw={isValid:!1,value:null},Sw=(w)=>Array.isArray(w)?w.reduce((X,G)=>G&&G.checked&&!G.disabled?{isValid:!0,value:G.value}:X,Lw):Lw;function Kw(w){let X=w.ref;if(U1(X))return X.files;if(C1(X))return Sw(w.refs).value;if(Fw(X))return[...X.selectedOptions].map(({value:G})=>G);if(k0(X))return Rw(w.refs).value;return _w(v(X.value)?w.ref.value:X.value,w)}var Y7=(w,X,G,Y)=>{let W={};for(let Z of w){let Q=C(X,Z);Q&&x(W,Z,Q._f)}return{criteriaMode:G,names:[...w],fields:W,shouldUseNativeValidation:Y}},l0=(w)=>w instanceof RegExp,b0=(w)=>v(w)?w:l0(w)?w.source:h(w)?l0(w.value)?w.value.source:w.value:w,Tw=(w)=>({isOnSubmit:!w||w===J0.onSubmit,isOnBlur:w===J0.onBlur,isOnChange:w===J0.onChange,isOnAll:w===J0.all,isOnTouch:w===J0.onTouched}),qw="AsyncFunction",Z7=(w)=>!!w&&!!w.validate&&!!(e(w.validate)&&w.validate.constructor.name===qw||h(w.validate)&&Object.values(w.validate).find((X)=>X.constructor.name===qw)),J7=(w)=>w.mount&&(w.required||w.min||w.max||w.maxLength||w.minLength||w.pattern||w.validate),Hw=(w,X,G)=>!G&&(X.watchAll||X.watch.has(w)||[...X.watch].some((Y)=>w.startsWith(`${Y}.`))),x0=(w,X,G,Y)=>{for(let W of G||Object.keys(w)){let Z=C(w,W);if(Z){let{_f:Q,...z}=Z;if(Q){if(Q.refs&&Q.refs[0]&&X(Q.refs[0],W)&&!Y)return!0;else if(Q.ref&&X(Q.ref,Q.name)&&!Y)return!0;else if(x0(z,X))break}else if(h(z)){if(x0(z,X))break}}}return};function Bw(w,X,G){let Y=C(w,G);if(Y||g0(G))return{error:Y,name:G};let W=G.split(".");while(W.length){let Z=W.join("."),Q=C(X,Z),z=C(w,Z);if(Q&&!Array.isArray(Q)&&G!==Z)return{name:G};if(z&&z.type)return{name:Z,error:z};if(z&&z.root&&z.root.type)return{name:`${Z}.root`,error:z.root};W.pop()}return{name:G}}var W7=(w,X,G,Y)=>{G(w);let{name:W,...Z}=w;return p(Z)||Y&&Object.keys(Z).length>=Object.keys(X).length||Object.keys(Z).find((Q)=>X[Q]===(!Y||J0.all))},Q7=(w,X,G)=>!w||!X||w===X||p0(w).some((Y)=>Y&&(G?Y===X:Y.startsWith(X)||X.startsWith(Y))),D7=(w,X,G,Y,W)=>{if(W.isOnAll)return!1;else if(!G&&W.isOnTouch)return!(X||w);else if(G?Y.isOnBlur:W.isOnBlur)return!w;else if(G?Y.isOnChange:W.isOnChange)return w;return!0},I7=(w,X)=>!jw(C(w,X)).length&&d(w,X),Uw=(w,X,G)=>{let Y=C(w,G),W=Array.isArray(Y)?Y:[];return x(W,Aw,X[G]),x(w,G,W),w};function Cw(w,X,G="validate"){if(n(w)||Array.isArray(w)&&w.every(n)||Q0(w)&&!w)return{type:G,message:n(w)?w:"",ref:X}}var j0=(w)=>h(w)&&!l0(w)?w:{value:w,message:""},Ow=async(w,X,G,Y,W,Z)=>{let{ref:Q,refs:z,required:M,maxLength:H,minLength:T,min:U,max:N,pattern:A,validate:k,name:f,valueAsNumber:g,mount:y}=w._f,j=C(G,f);if(!y||X.has(f))return{};let V=z?z[0]:Q,P=(S)=>{if(W&&V.reportValidity)V.setCustomValidity(Q0(S)?"":S||""),V.reportValidity()},O={},F=C1(Q),t=k0(Q),z0=F||t,a=(g||U1(Q))&&v(Q.value)&&v(j)||i0(Q)&&Q.value===""||j===""||Array.isArray(j)&&!j.length,r=s0.bind(null,f,Y,O),M0=(S,$,R,b=Z0.maxLength,c=Z0.minLength)=>{let w0=S?$:R;O[f]={type:S?b:c,message:w0,ref:Q,...r(S?b:c,w0)}};if(Z?!Array.isArray(j)||!j.length:M&&(!z0&&(a||i(j))||Q0(j)&&!j||t&&!Rw(z).isValid||F&&!Sw(z).isValid)){let{value:S,message:$}=n(M)?{value:!!M,message:M}:j0(M);if(S){if(O[f]={type:Z0.required,message:$,ref:V,...r(Z0.required,$)},!Y)return P($),O}}if(!a&&(!i(U)||!i(N))){let S,$,R=j0(N),b=j0(U);if(!i(j)&&!isNaN(j)){let c=Q.valueAsNumber||(j?+j:j);if(!i(R.value))S=c>R.value;if(!i(b.value))$=c<b.value}else{let c=Q.valueAsDate||new Date(j),w0=(y0)=>new Date(new Date().toDateString()+" "+y0),C0=Q.type=="time",$0=Q.type=="week";if(n(R.value)&&j)S=C0?w0(j)>w0(R.value):$0?j>R.value:c>new Date(R.value);if(n(b.value)&&j)$=C0?w0(j)<w0(b.value):$0?j<b.value:c<new Date(b.value)}if(S||$){if(M0(!!S,R.message,b.message,Z0.max,Z0.min),!Y)return P(O[f].message),O}}if((H||T)&&!a&&(n(j)||Z&&Array.isArray(j))){let S=j0(H),$=j0(T),R=!i(S.value)&&j.length>+S.value,b=!i($.value)&&j.length<+$.value;if(R||b){if(M0(R,S.message,$.message),!Y)return P(O[f].message),O}}if(A&&!a&&n(j)){let{value:S,message:$}=j0(A);if(l0(S)&&!j.match(S)){if(O[f]={type:Z0.pattern,message:$,ref:Q,...r(Z0.pattern,$)},!Y)return P($),O}}if(k){if(e(k)){let S=await k(j,G),$=Cw(S,V);if($){if(O[f]={...$,...r(Z0.validate,$.message)},!Y)return P($.message),O}}else if(h(k)){let S={};for(let $ in k){if(!p(S)&&!Y)break;let R=Cw(await k[$](j,G),V,$);if(R){if(S={...R,...r($,R.message)},P(R.message),Y)O[f]=S}}if(!p(S)){if(O[f]={ref:V,...S},!Y)return O}}}return P(!0),O},z7={mode:J0.onSubmit,reValidateMode:J0.onChange,shouldFocusError:!0},bw={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function M7(w={}){let X={...z7,...w},G={...m(bw),isLoading:e(X.defaultValues),errors:X.errors||{},disabled:X.disabled||!1},Y={},W=h(X.defaultValues)||h(X.values)?m(X.defaultValues||X.values)||{}:{},Z=X.shouldUnregister?{}:m(W),Q={action:!1,mount:!1,watch:!1,keepIsValid:!1},z={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},M,H=0,T={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},U={...T},N={...U},A={array:Iw(),state:Iw()},k=X.criteriaMode===J0.all,f=(J)=>(D)=>{clearTimeout(H),H=setTimeout(J,D)},g=async(J)=>{if(Q.keepIsValid)return;if(!X.disabled&&(U.isValid||N.isValid||J)){let D;if(X.resolver)D=p((await r()).errors),y();else D=await $({fields:Y,onlyCheckValid:!0,eventType:E0.VALID});if(D!==G.isValid)A.state.next({isValid:D})}},y=(J,D)=>{if(!X.disabled&&(U.isValidating||U.validatingFields||N.isValidating||N.validatingFields))(J||Array.from(z.mount)).forEach((I)=>{if(I)D?x(G.validatingFields,I,D):d(G.validatingFields,I)}),A.state.next({validatingFields:G.validatingFields,isValidating:!p(G.validatingFields)})},j=()=>{G.dirtyFields=B0(W,Z)},V=(J,D=[],I,L,q=!0,B=!0)=>{if(L&&I&&!X.disabled){if(Q.action=!0,B&&Array.isArray(C(Y,J))){let K=I(C(Y,J),L.argA,L.argB);q&&x(Y,J,K)}if(B&&Array.isArray(C(G.errors,J))){let K=I(C(G.errors,J),L.argA,L.argB);q&&x(G.errors,J,K),I7(G.errors,J)}if((U.touchedFields||N.touchedFields)&&B&&Array.isArray(C(G.touchedFields,J))){let K=I(C(G.touchedFields,J),L.argA,L.argB);q&&x(G.touchedFields,J,K)}if(U.dirtyFields||N.dirtyFields)j();A.state.next({name:J,isDirty:b(J,D),dirtyFields:G.dirtyFields,errors:G.errors,isValid:G.isValid})}else x(Z,J,D)},P=(J,D)=>{x(G.errors,J,D),A.state.next({errors:G.errors})},O=(J)=>{G.errors=J,A.state.next({errors:G.errors,isValid:!1})},F=(J)=>{let D=g0(J)?[J]:r0(J),I=Z,L=W;for(let q=0;q<D.length-1;q++){let B=D[q];if(I=i(I)?I:I[B],L=i(L)?L:L[B],I===null&&L!==null)return!0}return!1},t=(J,D,I,L)=>{let q=C(Y,J);if(q){if(F(J))return;let B=v(C(Z,J)),K=C(Z,J,v(I)?C(W,J):I);if(v(K)||L&&L.defaultChecked||D?x(Z,J,D?K:Kw(q._f)):C0(J,K),Q.mount&&!Q.action){if(g(),B&&G.isDirty&&(U.isDirty||N.isDirty)){if(!b())G.isDirty=!1,A.state.next({...G})}}}},z0=(J,D,I,L,q)=>{let B=!1,K=!1,E={name:J};if(!X.disabled){if(!I||L){if(U.isDirty||N.isDirty)K=G.isDirty,G.isDirty=E.isDirty=b(),B=K!==E.isDirty;let _=D0(C(W,J),D);if(K=!!C(G.dirtyFields,J),_!==G.isDirty)G.dirtyFields=B0(W,Z);else _?d(G.dirtyFields,J):x(G.dirtyFields,J,!0);E.dirtyFields=G.dirtyFields,B=B||(U.dirtyFields||N.dirtyFields)&&K!==!_}if(I){let _=C(G.touchedFields,J);if(!_)x(G.touchedFields,J,I),E.touchedFields=G.touchedFields,B=B||(U.touchedFields||N.touchedFields)&&_!==I}B&&q&&A.state.next(E)}return B?E:{}},a=(J,D,I,L)=>{let q=C(G.errors,J),B=(U.isValid||N.isValid)&&Q0(D)&&G.isValid!==D;if(X.delayError&&I)M=f(()=>P(J,I)),M(X.delayError);else clearTimeout(H),M=null,I?x(G.errors,J,I):d(G.errors,J);if((I?!D0(q,I):q)||!p(L)||B){let K={...L,...B&&Q0(D)?{isValid:D}:{},errors:G.errors,name:J};G={...G,...K},A.state.next(K)}},r=async(J)=>{return y(J,!0),await X.resolver(Z,X.context,Y7(J||z.mount,Y,X.criteriaMode,X.shouldUseNativeValidation))},M0=async(J)=>{let{errors:D}=await r(J);if(y(J),J)for(let I of J){let L=C(D,I);L?z.array.has(I)&&h(L)&&!Object.keys(L).some((q)=>!Number.isNaN(Number(q)))?Uw(G.errors,{[I]:L},I):x(G.errors,I,L):d(G.errors,I)}else G.errors=D;return D},S=async({name:J,eventType:D})=>{if(w.validate){let I=await w.validate({formValues:Z,formState:G,name:J,eventType:D});if(h(I))for(let L in I){let q=I[L];if(q)v0(`${K1}.${L}`,{message:n(q.message)?q.message:"",type:q.type||Z0.validate})}else if(n(I)||!I)v0(K1,{message:I||"",type:Z0.validate});else F1(K1);return I}return!0},$=async({fields:J,onlyCheckValid:D,name:I,eventType:L,context:q={valid:!0,runRootValidation:!1}})=>{if(w.validate){if(q.runRootValidation=!0,!await S({name:I,eventType:L})){if(q.valid=!1,D)return q.valid}}for(let B in J){let K=J[B];if(K){let{_f:E,..._}=K;if(E){let u=z.array.has(E.name),o=K._f&&Z7(K._f),X0=U.validatingFields||U.isValidating||N.validatingFields||N.isValidating;if(o&&X0)y([E.name],!0);let T0=await Ow(K,z.disabled,Z,k,X.shouldUseNativeValidation&&!D,u);if(o&&X0)y([E.name]);if(T0[E.name]){if(q.valid=!1,D)break}if(!D&&(C(T0,E.name)?u?Uw(G.errors,T0,E.name):x(G.errors,E.name,T0[E.name]):d(G.errors,E.name)),w.shouldUseNativeValidation&&T0[E.name])break}!p(_)&&await $({context:q,onlyCheckValid:D,fields:_,name:B,eventType:L})}}return q.valid},R=()=>{for(let J of z.unMount){let D=C(Y,J);D&&(D._f.refs?D._f.refs.every((I)=>!T1(I)):!T1(D._f.ref))&&o0(J)}z.unMount=new Set},b=(J,D)=>!X.disabled&&(J&&D&&x(Z,J,D),!D0(j1(),W)),c=(J,D,I)=>a2(J,z,{...Q.mount?Z:v(D)?W:n(J)?{[J]:D}:D},I,D),w0=(J)=>jw(C(Q.mount?Z:W,J,X.shouldUnregister?C(W,J,[]):[])),C0=(J,D,I={},L=!1)=>{let q=C(Y,J),B=D;if(q){let K=q._f;if(K){if(!K.disabled&&x(Z,J,_w(D,K)),B=i0(K.ref)&&i(D)?"":D,Fw(K.ref))[...K.ref.options].forEach((E)=>E.selected=B.includes(E.value));else if(K.refs)if(k0(K.ref))K.refs.forEach((E)=>{if(!E.defaultChecked||!E.disabled)if(Array.isArray(B))E.checked=!!B.find((_)=>_===E.value);else E.checked=B===E.value||!!B});else K.refs.forEach((E)=>E.checked=E.value===B);else if(U1(K.ref))K.ref.value="";else if(K.ref.value=B,!K.ref.type)A.state.next({name:J,values:L?Z:m(Z)})}}(I.shouldDirty||I.shouldTouch)&&z0(J,B,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&a0(J)},$0=(J,D,I,L=!1)=>{for(let q in D){if(!D.hasOwnProperty(q))return;let B=D[q],K=J+"."+q,E=C(Y,K);(z.array.has(J)||h(B)||E&&!E._f)&&!U0(B)?$0(K,B,I,L):C0(K,B,I,L)}},y0=(J,D,I,L)=>{let q=C(Y,J),B=z.array.has(J),K=L?D:m(D),E=C(Z,J),_=D0(E,K);if(!_)x(Z,J,K);if(B){if(A.array.next({name:J,values:L?Z:m(Z)}),(U.isDirty||U.dirtyFields||N.isDirty||N.dirtyFields)&&I.shouldDirty)j(),A.state.next({name:J,dirtyFields:G.dirtyFields,isDirty:b(J,K)})}else{let u=Array.isArray(K)&&!K.length||p(K);if(!q||q._f||i(K)||u)C0(J,K,I,L);else $0(J,K,I,L)}if(!_){let u=Hw(J,z),o=L?Z:m(Z);A.state.next({...u&&G,name:Q.mount||u?J:void 0,values:o})}},F0=(J,D,I={})=>y0(J,D,I,!1),hw=(J,D={})=>{let I=e(J)?J(Z):J;if(!D0(Z,I)){Z={...Z,...I};for(let L of z.mount)y0(L,C(I,L),D,!0);if(A.state.next({...G,name:void 0,type:void 0,values:Z}),D.shouldValidate)g()}},A1=async(J)=>{Q.mount=!0;let D=J.target,I=D.name,L=!0,q=C(Y,I),B=(_)=>{L=Number.isNaN(_)||U0(_)&&isNaN(_.getTime())||D0(_,C(Z,I,_))},K=Tw(X.mode),E=Tw(X.reValidateMode);if(q){let _,u,o=D.type?Kw(q._f):i2(J),X0=J.type===E0.BLUR||J.type===E0.FOCUS_OUT,T0=!J7(q._f)&&!w.validate&&!X.resolver&&!C(G.errors,I)&&!q._f.deps||D7(X0,C(G.touchedFields,I),G.isSubmitted,E,K),X1=Hw(I,z,X0);if(x(Z,I,o),X0){if(!D||!D.readOnly)q._f.onBlur&&q._f.onBlur(J),M&&M(0)}else if(q._f.onChange)q._f.onChange(J);let G1=z0(I,o,X0),iw=!p(G1)||X1;if(!X0&&A.state.next({name:I,type:J.type,values:m(Z)}),T0){if(U.isValid||N.isValid){if(X.mode==="onBlur"){if(X0)g()}else if(!X0)g()}return iw&&A.state.next({name:I,...X1?{}:G1})}if(!X.resolver&&w.validate)await S({name:I,eventType:J.type});if(!X0&&X1&&A.state.next({...G}),X.resolver){let{errors:k1}=await r([I]);if(y([I]),B(o),L){let lw=Bw(G.errors,Y,I),g1=Bw(k1,Y,lw.name||I);_=g1.error,I=g1.name,u=p(k1)}}else if(y([I],!0),_=(await Ow(q,z.disabled,Z,k,X.shouldUseNativeValidation))[I],y([I]),B(o),L){if(_)u=!1;else if(U.isValid||N.isValid)u=await $({fields:Y,onlyCheckValid:!0,name:I,eventType:J.type})}if(L)q._f.deps&&(!Array.isArray(q._f.deps)||q._f.deps.length>0)&&a0(q._f.deps),a(I,u,_,G1)}},E1=(J,D)=>{if(C(G.errors,D)&&J.focus)return J.focus(),1;return},a0=async(J,D={})=>{let I,L,q=p0(J);if(X.resolver){let B=await M0(v(J)?J:q);I=p(B),L=J?!q.some((K)=>C(B,K)):I}else if(J)L=(await Promise.all(q.map(async(B)=>{let K=C(Y,B);return await $({fields:K&&K._f?{[B]:K}:K,eventType:E0.TRIGGER})}))).every(Boolean),!(!L&&!G.isValid)&&g();else L=I=await $({fields:Y,name:J,eventType:E0.TRIGGER});return A.state.next({...!n(J)||(U.isValid||N.isValid)&&I!==G.isValid?{}:{name:J},...X.resolver||!J?{isValid:I}:{},errors:G.errors}),D.shouldFocus&&!L&&x0(Y,E1,J?q:z.mount),L},j1=(J,D)=>{let I={...Q.mount?Z:W};if(D)I=$w(D.dirtyFields?G.dirtyFields:G.touchedFields,I);return v(J)?I:n(J)?C(I,J):J.map((L)=>C(I,L))},$1=(J,D)=>({invalid:!!C((D||G).errors,J),isDirty:!!C((D||G).dirtyFields,J),error:C((D||G).errors,J),isValidating:!!C(G.validatingFields,J),isTouched:!!C((D||G).touchedFields,J)}),F1=(J)=>{let D=J?p0(J):void 0;if(D===null||D===void 0||D.forEach((I)=>d(G.errors,I)),D)D.forEach((I)=>{A.state.next({name:I,errors:G.errors})});else A.state.next({errors:{}})},v0=(J,D,I)=>{let L=(C(Y,J,{_f:{}})._f||{}).ref,q=C(G.errors,J)||{},{ref:B,message:K,type:E,..._}=q;x(G.errors,J,{..._,...D,ref:L}),A.state.next({name:J,errors:G.errors,isValid:!1}),I&&I.shouldFocus&&L&&L.focus&&L.focus()},fw=(J,D)=>e(J)?A.state.subscribe({next:(I)=>("values"in I)&&J(I.values||c(void 0,D),I)}):c(J,D,!0),P1=(J)=>A.state.subscribe({next:(D)=>{if(Q7(J.name,D.name,J.exact)&&W7(D,J.formState||U,pw,J.reRenderRoot)){let I={...Z};J.callback({values:I,...G,...D,defaultValues:W})}}}).unsubscribe,cw=(J)=>{return Q.mount=!0,N={...N,...J.formState},P1({...J,formState:{...T,...J.formState}})},o0=(J,D={})=>{for(let I of J?p0(J):z.mount){if(z.mount.delete(I),z.array.delete(I),!D.keepValue)d(Y,I),d(Z,I);!D.keepError&&d(G.errors,I),!D.keepDirty&&d(G.dirtyFields,I),!D.keepTouched&&d(G.touchedFields,I),!D.keepIsValidating&&d(G.validatingFields,I),!X.shouldUnregister&&!D.keepDefaultValue&&d(W,I)}A.state.next({values:m(Z)}),A.state.next({...G,...!D.keepDirty?{}:{isDirty:b()}}),!D.keepIsValid&&g()},R1=({disabled:J,name:D})=>{if(Q0(J)&&Q.mount||!!J||z.disabled.has(D)){let q=z.disabled.has(D)!==!!J;J?z.disabled.add(D):z.disabled.delete(D),q&&Q.mount&&!Q.action&&g()}},e0=(J,D={})=>{let I=C(Y,J),L=Q0(D.disabled)||Q0(X.disabled),q=!z.registerName.has(J)&&I&&I._f&&!I._f.mount;if(x(Y,J,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:J}},name:J,mount:!0,...D}}),z.mount.add(J),I&&!q)R1({disabled:Q0(D.disabled)?D.disabled:X.disabled,name:J});else t(J,!0,D.value);return{...L?{disabled:D.disabled||X.disabled}:{},...X.progressive?{required:!!D.required,min:b0(D.min),max:b0(D.max),minLength:b0(D.minLength),maxLength:b0(D.maxLength),pattern:b0(D.pattern)}:{},name:J,onChange:A1,onBlur:A1,ref:(B)=>{if(B){z.registerName.add(J),e0(J,D),z.registerName.delete(J),I=C(Y,J);let K=v(B.value)?B.querySelectorAll?B.querySelectorAll("input,select,textarea")[0]||B:B:B,E=e2(K),_=I._f.refs||[];if(E?_.find((u)=>u===K):K===I._f.ref)return;x(Y,J,{_f:{...I._f,...E?{refs:[..._.filter(T1),K,...Array.isArray(C(W,J))?[{}]:[]],ref:{type:K.type,name:J}}:{ref:K}}}),t(J,!1,void 0,K)}else{if(I=C(Y,J,{}),I._f)I._f.mount=!1;(X.shouldUnregister||D.shouldUnregister)&&!(l2(z.array,J)&&Q.action)&&z.unMount.add(J)}}}},w1=()=>X.shouldFocusError&&!X.shouldUseNativeValidation&&x0(Y,E1,z.mount),mw=(J)=>{if(Q0(J))A.state.next({disabled:J}),x0(Y,(D,I)=>{let L=C(Y,I);if(L){if(D.disabled=L._f.disabled||J,Array.isArray(L._f.refs))L._f.refs.forEach((q)=>{q.disabled=L._f.disabled||J})}},0,!1)},_1=(J,D)=>async(I)=>{let L=void 0;if(I)I.preventDefault&&I.preventDefault(),I.persist&&I.persist();let q=m(Z);if(A.state.next({isSubmitting:!0}),X.resolver){let{errors:B,values:K}=await r();y(),G.errors=B,q=m(K)}else await $({fields:Y,eventType:E0.SUBMIT});if(z.disabled.size)for(let B of z.disabled)d(q,B);if(d(G.errors,Aw),p(G.errors)){A.state.next({errors:{}});try{await J(q,I)}catch(B){L=B}}else{if(D)await D({...G.errors},I);w1(),setTimeout(w1)}if(A.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:p(G.errors)&&!L,submitCount:G.submitCount+1,errors:G.errors}),L)throw L},uw=(J,D={})=>{if(C(Y,J)){if(v(D.defaultValue))F0(J,m(C(W,J)));else F0(J,D.defaultValue),x(W,J,m(D.defaultValue));if(!D.keepTouched)d(G.touchedFields,J);if(!D.keepDirty)d(G.dirtyFields,J),G.isDirty=D.defaultValue?b(J,m(C(W,J))):b();if(!D.keepError)d(G.errors,J),U.isValid&&g();A.state.next({...G})}},S1=(J,D={})=>{let I=J?m(J):W,L=m(I),q=p(J),B=L;if(!D.keepDefaultValues)W=I;if(!D.keepValues){if(D.keepDirtyValues){let K=new Set([...z.mount,...Object.keys(B0(W,Z))]);for(let E of Array.from(K)){let _=C(G.dirtyFields,E),u=C(Z,E),o=C(B,E);if(_&&!v(u))x(B,E,u);else if(!_&&!v(o))F0(E,o)}}else{if(n0&&v(J))for(let K of z.mount){let E=C(Y,K);if(E&&E._f){let _=Array.isArray(E._f.refs)?E._f.refs[0]:E._f.ref;if(i0(_)){let u=_.closest("form");if(u){u.reset();break}}}}if(D.keepFieldsRef)for(let K of z.mount)F0(K,C(B,K));else Y={}}if(X.shouldUnregister){if(Z=D.keepDefaultValues?m(W):{},D.keepFieldsRef)for(let K of z.mount)x(Z,K,C(B,K))}else Z=m(B);A.array.next({values:{...B}}),A.state.next({values:{...B}})}if(z={mount:D.keepDirtyValues?z.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},Q.mount=!U.isValid||!!D.keepIsValid||!!D.keepDirtyValues||!X.shouldUnregister&&!p(B),Q.watch=!!X.shouldUnregister,Q.keepIsValid=!!D.keepIsValid,Q.action=!1,!D.keepErrors)G.errors={};A.state.next({submitCount:D.keepSubmitCount?G.submitCount:0,isDirty:q?!1:D.keepDirty?G.isDirty:D.keepValues?b():!!(D.keepDefaultValues&&!D0(J,W)),isSubmitted:D.keepIsSubmitted?G.isSubmitted:!1,dirtyFields:q?{}:D.keepDirtyValues?D.keepDefaultValues&&Z?B0(W,Z):G.dirtyFields:D.keepDefaultValues&&J?B0(W,J):D.keepDirty?G.dirtyFields:{},touchedFields:D.keepTouched?G.touchedFields:{},errors:D.keepErrors?G.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?G.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:W})},b1=(J,D)=>S1(e(J)?J(Z):J,{...X.resetOptions,...D}),dw=(J,D={})=>{let I=C(Y,J),L=I&&I._f;if(L){let q=L.refs?L.refs[0]:L.ref;if(q.focus)setTimeout(()=>{q.focus(),D.shouldSelect&&e(q.select)&&q.select()})}},pw=(J)=>{G={...G,...J}},x1={control:{register:e0,unregister:o0,getFieldState:$1,handleSubmit:_1,setError:v0,_subscribe:P1,_runSchema:r,_updateIsValidating:y,_focusError:w1,_getWatch:c,_getDirty:b,_setValid:g,_setFieldArray:V,_setDisabledField:R1,_setErrors:O,_getFieldArray:w0,_reset:S1,_resetDefaultValues:()=>e(X.defaultValues)&&X.defaultValues().then((J)=>{b1(J,X.resetOptions),A.state.next({isLoading:!1})}),_removeUnmounted:R,_disableForm:mw,_subjects:A,_proxyFormState:U,get _fields(){return Y},get _formValues(){return Z},get _state(){return Q},set _state(J){Q=J},get _defaultValues(){return W},get _names(){return z},set _names(J){z=J},get _formState(){return G},get _options(){return X},set _options(J){X={...X,...J}}},subscribe:cw,trigger:a0,register:e0,handleSubmit:_1,watch:fw,setValue:F0,setValues:hw,getValues:j1,reset:b1,resetField:uw,resetDefaultValues:(J,D={})=>{if(W=m(J),!D.keepDirty){let I=B0(W,Z);G.dirtyFields=I,G.isDirty=!p(I)}if(!D.keepIsValid)g();A.state.next({...G,defaultValues:W})},clearErrors:F1,unregister:o0,setError:v0,setFocus:dw,getFieldState:$1};return{...x1,formControl:x1}}function FX(w={}){let X=l.default.useRef(void 0),G=l.default.useRef(void 0),[Y,W]=l.default.useState(()=>({...m(bw),isLoading:e(w.defaultValues),errors:w.errors||{},disabled:w.disabled||!1,defaultValues:e(w.defaultValues)?void 0:w.defaultValues}));if(!X.current)if(w.formControl){if(X.current={...w.formControl,formState:Y},w.defaultValues&&!e(w.defaultValues))w.formControl.reset(w.defaultValues,w.resetOptions)}else{let{formControl:Q,...z}=M7(w);X.current={...z,formState:Y}}let Z=X.current.control;return Z._options=w,t2(()=>{let Q=Z._subscribe({formState:Z._proxyFormState,callback:()=>W({...Z._formState,defaultValues:Z._defaultValues}),reRenderRoot:!0});return W((z)=>({...z,isReady:!0})),Z._formState.isReady=!0,Q},[Z]),l.default.useEffect(()=>Z._disableForm(w.disabled),[Z,w.disabled]),l.default.useEffect(()=>{if(w.mode)Z._options.mode=w.mode;if(w.reValidateMode)Z._options.reValidateMode=w.reValidateMode},[Z,w.mode,w.reValidateMode]),l.default.useEffect(()=>{if(w.errors)Z._setErrors(w.errors),Z._focusError()},[Z,w.errors]),l.default.useEffect(()=>{w.shouldUnregister&&Z._subjects.state.next({values:Z._getWatch()})},[Z,w.shouldUnregister]),l.default.useEffect(()=>{if(Z._proxyFormState.isDirty){let Q=Z._getDirty();if(Q!==Y.isDirty)Z._subjects.state.next({isDirty:Q})}},[Z,Y.isDirty]),l.default.useEffect(()=>{var Q;if(w.values&&!D0(w.values,G.current)){if(Z._reset(w.values,{keepFieldsRef:!0,...Z._options.resetOptions}),!((Q=Z._options.resetOptions)===null||Q===void 0?void 0:Q.keepIsValid))Z._setValid();G.current=w.values,W((z)=>({...z}))}else Z._resetDefaultValues()},[Z,w.values]),l.default.useEffect(()=>{if(!Z._state.mount)Z._setValid(),Z._state.mount=!0;if(Z._state.watch)Z._state.watch=!1,Z._subjects.state.next({...Z._formState});Z._removeUnmounted()}),X.current.formState=l.default.useMemo(()=>s2(Y,Z),[Z,Y]),X.current}var xw=(w,X,G)=>{if(w&&"reportValidity"in w){let Y=C(G,X);w.setCustomValidity(Y&&Y.message||""),w.reportValidity()}},t0=(w,X)=>{for(let G in X.fields){let Y=X.fields[G];Y&&Y.ref&&"reportValidity"in Y.ref?xw(Y.ref,G,w):Y&&Y.refs&&Y.refs.forEach((W)=>xw(W,G,w))}},O1=(w,X)=>{X.shouldUseNativeValidation&&t0(w,X);let G={};for(let Y in w){let W=C(X.fields,Y),Z=Object.assign(w[Y]||{},{ref:W&&W.ref});if(L7(X.names||Object.keys(w),Y)){let Q=Object.assign({},C(G,Y));x(Q,"root",Z),x(G,Y,Q)}else x(G,Y,Z)}return G},L7=(w,X)=>{let G=kw(X).replace(/[.*+?^${}()|\\]/g,"\\$&");return w.some((Y)=>kw(Y).match(`^${G}\\.\\d+`))};function kw(w){return w.replace(/[\[\]]/g,"")}function N1(){return N1=Object.assign?Object.assign.bind():function(w){for(var X=1;X<arguments.length;X++){var G=arguments[X];for(var Y in G)({}).hasOwnProperty.call(G,Y)&&(w[Y]=G[Y])}return w},N1.apply(null,arguments)}function gw(w,X){try{var G=w()}catch(Y){return X(Y)}return G&&G.then?G.then(void 0,X):G}function K7(w,X){for(var G={};w.length;){var Y=w[0],W=Y.code,Z=Y.message,Q=Y.path.join(".");if(!G[Q])if("unionErrors"in Y){var z=Y.unionErrors[0].errors[0];G[Q]={message:z.message,type:z.code}}else G[Q]={message:Z,type:W};if("unionErrors"in Y&&Y.unionErrors.forEach(function(T){return T.errors.forEach(function(U){return w.push(U)})}),X){var M=G[Q].types,H=M&&M[Y.code];G[Q]=s0(Q,X,G,W,H?[].concat(H,Y.message):Y.message)}w.shift()}return G}function T7(w,X){for(var G={},Y=function(){var W=w[0],Z=W.code,Q=W.message,z=W.path.join(".");if(!G[z])if(W.code==="invalid_union"&&W.errors.length>0){var M=W.errors[0][0];G[z]={message:M.message,type:M.code}}else G[z]={message:Q,type:Z};if(W.code==="invalid_union"&&W.errors.forEach(function(U){return U.forEach(function(N){return w.push(N1({},N,{path:[].concat(W.path,N.path)}))})}),X){var H=G[z].types,T=H&&H[W.code];G[z]=s0(z,X,G,Z,T?[].concat(T,W.message):W.message)}w.shift()};w.length;)Y();return G}function kX(w,X,G){if(G===void 0&&(G={}),function(Y){return"_def"in Y&&typeof Y._def=="object"&&"typeName"in Y._def}(w))return function(Y,W,Z){try{return Promise.resolve(gw(function(){return Promise.resolve(w[G.mode==="sync"?"parse":"parseAsync"](Y,X)).then(function(Q){return Z.shouldUseNativeValidation&&t0({},Z),{errors:{},values:G.raw?Object.assign({},Y):Q}})},function(Q){if(function(z){return Array.isArray(z==null?void 0:z.issues)}(Q))return{values:{},errors:O1(K7(Q.errors,!Z.shouldUseNativeValidation&&Z.criteriaMode==="all"),Z)};throw Q}))}catch(Q){return Promise.reject(Q)}};if(function(Y){return"_zod"in Y&&typeof Y._zod=="object"}(w))return function(Y,W,Z){try{return Promise.resolve(gw(function(){return Promise.resolve((G.mode==="sync"?vw:Vw)(w,Y,X)).then(function(Q){return Z.shouldUseNativeValidation&&t0({},Z),{errors:{},values:G.raw?Object.assign({},Y):Q}})},function(Q){if(function(z){return z instanceof yw}(Q))return{values:{},errors:O1(T7(Q.issues,!Z.shouldUseNativeValidation&&Z.criteriaMode==="all"),Z)};throw Q}))}catch(Q){return Promise.reject(Q)}};throw Error("Invalid input: not a Zod schema")}
|
|
4
|
-
export{TX as
|
|
4
|
+
export{TX as Fe,qX as Ge,BX as He,UX as Ie,EX as Je,FX as Ke,kX as Le};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{d as
|
|
1
|
+
import{Xl as r,cj as o}from"./chunk-yp9hvkc5.js";function d({className:t,...a}){return o("div",{"data-slot":"card",className:r("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function n({className:t,...a}){return o("div",{"data-slot":"card-header",className:r("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function c({className:t,...a}){return o("div",{"data-slot":"card-title",className:r("leading-none font-semibold",t),...a})}function s({className:t,...a}){return o("div",{"data-slot":"card-description",className:r("text-sm text-muted-foreground",t),...a})}function i({className:t,...a}){return o("div",{"data-slot":"card-content",className:r("px-6",t),...a})}function l({className:t,...a}){return o("div",{"data-slot":"card-footer",className:r("flex items-center px-6 [.border-t]:pt-6",t),...a})}
|
|
2
|
+
export{d as af,n as bf,c as cf,s as df,i as ef,l as ff};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
class z{queue=[];waiting=[];done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(b,k){this.isComplete=b,this.extractResult=k,this.finalResultPromise=new Promise((q)=>{this.resolveFinalResult=q})}push(b){if(this.done)return;if(this.isComplete(b))this.done=!0,this.resolveFinalResult(this.extractResult(b));let k=this.waiting.shift();if(k)k({value:b,done:!1});else this.queue.push(b)}end(b){if(this.done=!0,b!==void 0)this.resolveFinalResult(b);while(this.waiting.length>0)this.waiting.shift()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){while(!0)if(this.queue.length>0)yield this.queue.shift();else if(this.done)return;else{let b=await new Promise((k)=>this.waiting.push(k));if(b.done)return;yield b.value}}result(){return this.finalResultPromise}}class B extends z{constructor(){super((b)=>b.type==="done"||b.type==="error",(b)=>{if(b.type==="done")return b.message;else if(b.type==="error")return b.error;throw Error("Unexpected event type for final result")})}}function F(b){if(b instanceof Error)return b.message||b.name;if(typeof b==="string")return b;return String(b)}function G(b){if(!(b instanceof Error))return{name:"ThrownValue",message:F(b)};let k=b.code;return{name:b.name||void 0,message:b.message||b.name,stack:b.stack,code:typeof k==="string"||typeof k==="number"?k:void 0}}function I(b,k,q){return{type:b,timestamp:Date.now(),error:G(k),details:q}}function J(b,k){b.diagnostics=[...b.diagnostics??[],k]}
|
|
3
|
-
export{B as
|
|
3
|
+
export{B as on,F as pn,I as qn,J as rn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{yf as QF,zf as TF}from"./chunk-4r91fggc.js";import{Sg as UF,Tg as JF,Ug as ZF,bh as $F}from"./chunk-qrf0ady6.js";import{ih as fF}from"./chunk-k47md1g4.js";import{Ih as YF}from"./chunk-07h4b77v.js";import{ci as KF}from"./chunk-ps4xfp23.js";import{ei as r,gi as i,hi as n,ii as e}from"./chunk-b1ypjqgp.js";import{Bi as XF,Gi as O,Si as FF,Ui as PF,Vi as kF,Xi as BF,Zi as g,ui as x,xi as c,zi as j}from"./chunk-h0fxysxs.js";import{Aj as v,Bk as a,Gl as o,Xl as t,aj as S,bj as u,cj as P,dj as G,rm as s,sk as d,um as l}from"./chunk-yp9hvkc5.js";import{sn as m}from"./chunk-dxyq9h8n.js";var D=m(S(),1);function yF(k){if(!k)return null;try{let f=YF(k);if(isNaN(f.getTime()))return null;return KF(f,"MMM d, yyyy")}catch{return null}}function OF({version:k,displayVersionNumber:f,index:J,canEdit:Y,onRemove:Z}){let[B,F]=D.useState(!1),{ref:Q,handleRef:$}=TF({id:k.id,index:J,disabled:!Y}),U=yF(k.createdAt);return G("div",{ref:Q,className:"group flex items-center gap-3 p-2.5 rounded-lg border border-border bg-card hover:bg-accent/40 transition-colors",children:[G("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted text-muted-foreground rounded-full px-2.5 py-0.5 text-xs font-semibold select-none min-w-[2.25rem]",children:["v",f]}),Y?P("div",{ref:$,className:"cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground p-1 -m-1 rounded touch-none flex items-center justify-center",children:P(a,{className:"h-4 w-4"})}):P("div",{className:"w-4"}),P("div",{className:"h-12 w-20 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:k.previewUrl?P("img",{src:k.previewUrl,alt:k.name||"",className:"h-full w-full object-cover"}):P(d,{className:"h-5 w-5 text-muted-foreground"})}),G("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[P("span",{className:"truncate text-sm font-medium text-foreground",title:k.name||"",children:k.name||"Untitled"}),G("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground truncate",children:[P("span",{children:k.creator?.name||l.unknown()}),U&&G(u,{children:[P("span",{children:"•"}),P("span",{children:U})]})]})]}),Y&&G(r,{modal:!1,open:B,onOpenChange:F,children:[P(i,{asChild:!0,children:P(s,{variant:"ghost",size:"icon","aria-label":"More options",className:t("h-8 w-8 text-muted-foreground hover:text-foreground transition-opacity flex-shrink-0",B?"opacity-100":"opacity-0 group-hover:opacity-100 focus:opacity-100"),children:P(v,{className:"h-4 w-4"})})}),P(n,{align:"end",children:G(e,{onClick:()=>Z(k.id),className:"text-destructive focus:text-destructive cursor-pointer",children:[P(o,{className:"h-4 w-4 mr-2"}),P("span",{children:l.remove_from_stack()})]})})]})]})}function uF({open:k,onOpenChange:f,stackId:J,canEdit:Y=!0,onVersionRemoved:Z,onStackDissolved:B}){let F=x(),[Q,$]=D.useState([]),{data:U,isLoading:w}=c({queryKey:["version_stacks",J,"versions"],queryFn:async()=>{let K=await O.api.version_stacks[":stackId"].versions.$get({param:{stackId:J}});if(!K.ok)throw Error("Failed to fetch versions");return await K.json()},enabled:k&&!!J});D.useEffect(()=>{if(U)$(U)},[U]);let{mutate:M}=j({mutationFn:async({fileId:K,beforeId:X})=>{if(!(await O.api.version_stacks[":stackId"].order.$post({param:{stackId:J},json:{fileId:K,beforeId:X}})).ok)throw Error("Failed to reorder versions")},onSuccess:()=>{F.invalidateQueries({queryKey:["version_stacks"]}),F.invalidateQueries({queryKey:["files"]}),F.invalidateQueries({queryKey:["file"]}),F.invalidateQueries({queryKey:["search"]}),F.invalidateQueries({queryKey:["folders"]}),F.invalidateQueries({queryKey:["projects"]}),g.success(l.version_reordered_successfully())},onError:()=>{if(g.error(l.failed_to_reorder_versions()),U)$(U)}}),{mutate:_,isPending:C}=j({mutationFn:async(K)=>{if(!(await O.api.version_stacks[":stackId"].versions[":versionId"].$delete({param:{stackId:J,versionId:K}})).ok)throw Error("Failed to remove version from stack");return K},onSuccess:(K)=>{g.success(l.version_removed_successfully());let X=Q.filter((b)=>b.id!==K);if($(X),F.invalidateQueries({queryKey:["version_stacks"]}),F.invalidateQueries({queryKey:["files"]}),F.invalidateQueries({queryKey:["file"]}),F.invalidateQueries({queryKey:["search"]}),F.invalidateQueries({queryKey:["folders"]}),F.invalidateQueries({queryKey:["projects"]}),X.length<=1){let b=X[0];if(f(!1),b)B?.(b.id)}else Z?.(K,X)},onError:()=>{g.error(l.failed_to_remove_version())}}),p=(K)=>{if(K.canceled)return;let{source:X}=K.operation;if(!QF(X))return;let{initialIndex:b,index:y}=X;if(b===y)return;let z=[...Q],[V]=z.splice(b,1);z.splice(y,0,V),$(z);let h=y===z.length-1?"-1":z[y+1].id;M({fileId:V.id,beforeId:h})},W=(K)=>{if(C)return;_(K)};return P(FF,{open:k,onOpenChange:f,children:G(PF,{className:"max-w-lg p-0 gap-0 overflow-hidden",children:[P(kF,{className:"p-4 pb-3 border-b border-border",children:P(BF,{className:"text-base font-semibold",children:l.manage_versions_title()})}),P(fF,{className:"max-h-[60vh] p-4",children:w?P("div",{className:"py-8 text-center text-sm text-muted-foreground",children:l.loading?.()||"Loading..."}):Q.length===0?P("div",{className:"py-8 text-center text-sm text-muted-foreground",children:l.no_versions_found()}):P("div",{className:"space-y-2",children:P($F,{sensors:[ZF.configure({activationConstraints:[new JF.Distance({value:6})]}),UF],onDragEnd:p,children:Q.map((K,X)=>P(OF,{version:K,displayVersionNumber:Q.length-X,index:X,canEdit:Y,onRemove:W},K.id))})})})]})})}var dF=XF((k)=>({uploading:0,tasks:{},fileProgress:{},increment:()=>k((f)=>({uploading:f.uploading+1})),decrement:()=>k((f)=>({uploading:f.uploading-1})),startTask:(f,J,Y)=>k((Z)=>{let B={},F=0;Y.forEach((U)=>{B[U.fileId]={fileId:U.fileId,name:U.name,loaded:0,total:U.size,status:"uploading"},F+=U.size});let Q={...Z.tasks,[f]:{taskId:f,name:J,loaded:0,total:F,files:B}},$={...Z.fileProgress};return Y.forEach((U)=>{$[U.fileId]=B[U.fileId]}),{tasks:Q,fileProgress:$}}),updateFileProgress:(f,J,Y)=>k((Z)=>{let B=Z.tasks[f];if(!B)return{};let F=B.files[J];if(!F)return{};let Q={...F,loaded:Y},$={...B.files,[J]:Q},U=Object.values($).reduce((w,M)=>w+M.loaded,0);return{tasks:{...Z.tasks,[f]:{...B,loaded:U,files:$}},fileProgress:{...Z.fileProgress,[J]:Q}}}),completeFile:(f,J)=>k((Y)=>{let Z=Y.tasks[f];if(!Z)return{};let B=Z.files[J];if(!B)return{};let F={...B,status:"completed",loaded:B.total},Q={...Z.files,[J]:F},$=Object.values(Q).reduce((U,w)=>U+w.loaded,0);return{tasks:{...Y.tasks,[f]:{...Z,loaded:$,files:Q}},fileProgress:{...Y.fileProgress,[J]:F}}}),failFile:(f,J)=>k((Y)=>{let Z=Y.tasks[f];if(!Z)return{};let B=Z.files[J];if(!B)return{};let F={...B,status:"failed"},Q={...Z.files,[J]:F},$=Object.values(Q).reduce((U,w)=>U+w.loaded,0);return{tasks:{...Y.tasks,[f]:{...Z,loaded:$,files:Q}},fileProgress:{...Y.fileProgress,[J]:F}}})}));var T=m(S(),1);var R=10,I=10,NF=R*I,tF=({spriteUrl:k,thumbnailUrl:f,videoWidth:J,videoHeight:Y,className:Z=""})=>{let B=T.useRef(null),[F,Q]=T.useState({width:0,height:0}),[$,U]=T.useState({width:0,height:0}),[w,M]=T.useState(!1),[_,C]=T.useState(!1),[p,W]=T.useState(!1),[K,X]=T.useState(0),[b,y]=T.useState(0);T.useEffect(()=>{if(!B.current)return;let N=new ResizeObserver((E)=>{for(let A of E)Q({width:A.contentRect.width,height:A.contentRect.height})});return N.observe(B.current),()=>N.disconnect()},[]);let z=T.useCallback(()=>{if(_||p)return;W(!0);let N=new Image;N.src=k,N.onload=()=>{U({width:N.naturalWidth,height:N.naturalHeight}),C(!0),W(!1)},N.onerror=()=>{console.error("Failed to load sprite image"),W(!1)}},[k,_,p]),V=()=>{M(!0),z()},h=()=>{M(!1)},wF=(N)=>{if(!B.current)return;let E=B.current.getBoundingClientRect(),A=N.clientX-E.left,q=Math.max(0,Math.min(A,E.width));y(q);let H=q/E.width,L=Math.min(Math.floor(H*NF),NF-1);X(L)},GF=T.useMemo(()=>{if(F.width===0||F.height===0)return{};let N=J/Y;if($.width>0&&$.height>0){let qF=$.width/R,MF=$.height/I;N=qF/MF}let E=F.width/F.height,A,q;if(E>N)q=F.height,A=q*N;else A=F.width,q=A/N;let H=Math.ceil(A),L=Math.ceil(q),bF=H*R,lF=L*I,AF=K%R,_F=Math.floor(K/R),zF=-(AF*H),EF=-(_F*L);return{backgroundImage:`url(${k})`,backgroundSize:`${bF}px ${lF}px`,backgroundPosition:`${zF}px ${EF}px`,backgroundRepeat:"no-repeat",width:`${H}px`,height:`${L}px`,imageRendering:"auto"}},[F,J,Y,K,k,$]);return G("div",{ref:B,className:`relative w-full h-full overflow-hidden cursor-crosshair group bg-black select-none ${Z}`,onMouseEnter:V,onMouseLeave:h,onMouseMove:wF,children:[P("img",{src:f,alt:"Thumbnail",className:`absolute inset-0 w-full h-full object-contain transition-opacity duration-200 ${w&&_?"opacity-0":"opacity-100"}`,draggable:!1}),w&&!_&&P("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 z-10",children:P("div",{className:"w-6 h-6 border-2 border-white/30 border-t-white rounded-full animate-spin"})}),_&&P("div",{className:`absolute inset-0 flex items-center justify-center transition-opacity duration-75 ${w?"opacity-100":"opacity-0"}`,children:P("div",{style:GF})}),w&&P("div",{className:"absolute top-0 bottom-0 w-0.5 bg-red-500 shadow-[0_0_4px_rgba(255,0,0,0.8)] z-20 pointer-events-none",style:{transform:`translateX(${b}px)`}})]})};
|
|
2
|
+
export{tF as gf,uF as hf,dF as if};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{f as
|
|
1
|
+
import{Xl as t,Yl as a,Zl as o,cj as r}from"./chunk-yp9hvkc5.js";var c=a("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function f({className:i,variant:e="default",asChild:n=!1,...s}){let d=n?o.Root:"span";return r(d,{"data-slot":"badge","data-variant":e,className:t(c({variant:e}),i),...s})}
|
|
2
|
+
export{f as Kf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ie as R,Je as F,Ke as z,Le as A}from"./chunk-0t4n4d5w.js";import{ph as m}from"./chunk-ytypyfkc.js";import"./chunk-mq83a0kk.js";import{$i as g}from"./chunk-z1kjmf60.js";import{Ej as x,Kk as L,Qj as f,Uk as w,aj as T,bj as p,cj as e,dj as t,ij as k,kj as i,nj as y,rm as d,um as r,vj as P,vm as h,wj as S}from"./chunk-yp9hvkc5.js";import{sn as E}from"./chunk-dxyq9h8n.js";var s=E(T(),1);var I=m.object({password:m.string().min(3,r.password_min_length()),confirmPassword:m.string().min(3,r.password_min_length())}).refine((a)=>a.password===a.confirmPassword,{message:r.passwords_do_not_match(),path:["confirmPassword"]}),K=y("/reset-password")({component:V});function V(){let a=k(),n=K.useSearch().token||"",[v,l]=s.useState(null),[b,N]=s.useState(!1),[c,B]=s.useState(!1),o=z({resolver:A(I),defaultValues:{password:"",confirmPassword:""}});s.useEffect(()=>{if(c){let u=setTimeout(()=>{a({to:"/login"})},3000);return()=>clearTimeout(u)}},[c,a]);let C=async(u)=>{if(!n){l(r.invalid_reset_token());return}N(!0),l(null);let{error:_}=await R({newPassword:u.password,token:n});if(N(!1),_){l(_.message||r.invalid_reset_token());return}B(!0)};return t(F,{children:[t("div",{className:"mb-8",children:[e("h1",{className:"text-2xl font-bold tracking-tight text-foreground",children:r.reset_password()}),e("p",{className:"text-muted-foreground text-sm mt-1",children:r.reset_password_subtitle()})]}),!n?t("div",{className:"space-y-6",children:[t("div",{className:"p-4 bg-destructive/10 border border-destructive/20 text-destructive rounded-xl text-sm flex items-start gap-3",children:[e(P,{className:"w-5 h-5 shrink-0 mt-0.5"}),t("div",{className:"space-y-1",children:[e("p",{className:"font-semibold",children:r.invalid_reset_token()}),e("p",{className:"text-xs text-muted-foreground",children:r.invalid_reset_token_description()})]})]}),e(i,{to:"/login",className:"block w-full",children:t(d,{variant:"outline",className:"w-full h-11 rounded-xl flex items-center justify-center gap-2",children:[r.go_to_login(),e(f,{className:"w-4 h-4"})]})})]}):c?t("div",{className:"space-y-6",children:[t("div",{className:"p-4 bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 rounded-xl text-sm flex items-start gap-3",children:[e(S,{className:"w-5 h-5 shrink-0 mt-0.5"}),t("div",{className:"space-y-1",children:[e("p",{className:"font-semibold",children:r.password_reset_success()}),e("p",{className:"text-xs text-muted-foreground",children:r.password_reset_success_description()})]})]}),e(i,{to:"/login",className:"block w-full",children:t(d,{className:"w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0",children:[r.go_to_login(),e(f,{className:"w-4 h-4"})]})})]}):t("form",{onSubmit:o.handleSubmit(C),className:"space-y-5",children:[v&&e("div",{className:"p-3 bg-destructive/10 border border-destructive/20 text-destructive rounded-xl text-sm text-center font-medium",children:v}),t("div",{className:"space-y-2",children:[e(g,{htmlFor:"password",className:"text-xs font-semibold text-muted-foreground tracking-wide uppercase",children:r.new_password()}),t("div",{className:"relative group",children:[e(w,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground transition-colors group-focus-within:text-rose-500"}),e(h,{id:"password",type:"password",...o.register("password"),placeholder:r.new_password_placeholder(),className:"pl-10.5 h-11 border-border focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"})]}),o.formState.errors.password&&e("p",{className:"text-destructive text-xs font-medium",children:o.formState.errors.password.message})]}),t("div",{className:"space-y-2",children:[e(g,{htmlFor:"confirmPassword",className:"text-xs font-semibold text-muted-foreground tracking-wide uppercase",children:r.confirm_password()}),t("div",{className:"relative group",children:[e(w,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground transition-colors group-focus-within:text-rose-500"}),e(h,{id:"confirmPassword",type:"password",...o.register("confirmPassword"),placeholder:r.confirm_password_placeholder(),className:"pl-10.5 h-11 border-border focus-visible:ring-rose-500/50 focus-visible:border-rose-500 rounded-xl transition-all shadow-sm"})]}),o.formState.errors.confirmPassword&&e("p",{className:"text-destructive text-xs font-medium",children:o.formState.errors.confirmPassword.message})]}),e(d,{type:"submit",className:"w-full h-11 bg-gradient-to-r from-rose-500 to-orange-500 hover:from-rose-600 hover:to-orange-600 text-white font-semibold rounded-xl shadow-md shadow-rose-500/10 hover:shadow-rose-500/20 active:scale-[0.98] transition-all flex items-center justify-center gap-2 border-0",disabled:b,children:b?t(p,{children:[e(x,{className:"h-4 w-4 animate-spin"}),r.resetting_password()]}):t(p,{children:[e(L,{className:"w-4 h-4"}),r.reset_password()]})}),e("div",{className:"pt-2 text-center text-sm",children:e(i,{to:"/login",className:"font-semibold text-rose-500 hover:text-rose-600 dark:text-rose-400 dark:hover:text-rose-300 transition-colors hover:underline inline-flex items-center gap-1",children:r.go_to_login()})})]})]})}export{K as Route};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aj as L9,bj as K0,cj as Q0,dj as J0}from"./chunk-yp9hvkc5.js";import{sn as q7,tn as o5,un as QZ}from"./chunk-dxyq9h8n.js";var VZ=o5((I1,_Z)=>{var qZ=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,A0=/\n/g,z0=/^\s*/,T0=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,C0=/^:\s*/,O0=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,w0=/^[;\s]*/,P0=/^\s+|\s+$/g,I0=`
|
|
2
2
|
`,YZ="/",$Z="*",I5="",S0="comment",E0="declaration";function b0(Z,K){if(typeof Z!=="string")throw TypeError("First argument must be a string");if(!Z)return[];K=K||{};var Q=1,J=1;function X(F){var R=F.match(A0);if(R)Q+=R.length;var O=F.lastIndexOf(I0);J=~O?F.length-O:J+F.length}function H(){var F={line:Q,column:J};return function(R){return R.position=new W(F),$(),R}}function W(F){this.start=F,this.end={line:Q,column:J},this.source=K.source}W.prototype.content=Z;function G(F){var R=Error(K.source+":"+Q+":"+J+": "+F);if(R.reason=F,R.filename=K.source,R.line=Q,R.column=J,R.source=Z,K.silent);else throw R}function q(F){var R=F.exec(Z);if(!R)return;var O=R[0];return X(O),Z=Z.slice(O.length),R}function $(){q(z0)}function D(F){var R;F=F||[];while(R=N())if(R!==!1)F.push(R);return F}function N(){var F=H();if(YZ!=Z.charAt(0)||$Z!=Z.charAt(1))return;var R=2;while(I5!=Z.charAt(R)&&($Z!=Z.charAt(R)||YZ!=Z.charAt(R+1)))++R;if(R+=2,I5===Z.charAt(R-1))return G("End of comment missing");var O=Z.slice(2,R-2);return J+=2,X(O),Z=Z.slice(R),J+=2,F({type:S0,comment:O})}function _(){var F=H(),R=q(T0);if(!R)return;if(N(),!q(C0))return G("property missing ':'");var O=q(O0),j=F({type:E0,property:UZ(R[0].replace(qZ,I5)),value:O?UZ(O[0].replace(qZ,I5)):I5});return q(w0),j}function Y(){var F=[];D(F);var R;while(R=_())if(R!==!1)F.push(R),D(F);return F}return $(),Y()}function UZ(Z){return Z?Z.replace(P0,I5):I5}_Z.exports=b0});var NZ=o5((t5)=>{var g0=t5&&t5.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(t5,"__esModule",{value:!0});t5.default=x0;var y0=g0(VZ());function x0(Z,K){let Q=null;if(!Z||typeof Z!=="string")return Q;let J=(0,y0.default)(Z),X=typeof K==="function";return J.forEach((H)=>{if(H.type!=="declaration")return;let{property:W,value:G}=H;if(X)K(W,G,H);else if(G)Q=Q||{},Q[W]=G}),Q}});var FZ=o5((LZ)=>{Object.defineProperty(LZ,"__esModule",{value:!0});LZ.camelCase=void 0;var h0=/^--[a-zA-Z0-9_-]+$/,k0=/-([a-z])/g,m0=/^[^-]+$/,v0=/^-(webkit|moz|ms|o|khtml)-/,p0=/^-(ms)-/,u0=function(Z){return!Z||m0.test(Z)||h0.test(Z)},l0=function(Z,K){return K.toUpperCase()},MZ=function(Z,K){return"".concat(K,"-")},f0=function(Z,K){if(K===void 0)K={};if(u0(Z))return Z;if(Z=Z.toLowerCase(),K.reactCompat)Z=Z.replace(p0,MZ);else Z=Z.replace(v0,MZ);return Z.replace(k0,l0)};LZ.camelCase=f0});var jZ=o5((W7,RZ)=>{var i0=W7&&W7.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}},r0=i0(NZ()),a0=FZ();function H7(Z,K){var Q={};if(!Z||typeof Z!=="string")return Q;return(0,r0.default)(Z,function(J,X){if(J&&X)Q[(0,a0.camelCase)(J,K)]=X}),Q}H7.default=H7;RZ.exports=H7});var r4=o5((FH,i4)=>{var r6=Object.prototype.hasOwnProperty,f4=Object.prototype.toString,k4=Object.defineProperty,m4=Object.getOwnPropertyDescriptor,v4=function(K){if(typeof Array.isArray==="function")return Array.isArray(K);return f4.call(K)==="[object Array]"},p4=function(K){if(!K||f4.call(K)!=="[object Object]")return!1;var Q=r6.call(K,"constructor"),J=K.constructor&&K.constructor.prototype&&r6.call(K.constructor.prototype,"isPrototypeOf");if(K.constructor&&!Q&&!J)return!1;var X;for(X in K);return typeof X>"u"||r6.call(K,X)},u4=function(K,Q){if(k4&&Q.name==="__proto__")k4(K,Q.name,{enumerable:!0,configurable:!0,value:Q.newValue,writable:!0});else K[Q.name]=Q.newValue},l4=function(K,Q){if(Q==="__proto__"){if(!r6.call(K,Q))return;else if(m4)return m4(K,Q).value}return K[Q]};i4.exports=function Z(){var K,Q,J,X,H,W,G=arguments[0],q=1,$=arguments.length,D=!1;if(typeof G==="boolean")D=G,G=arguments[1]||{},q=2;if(G==null||typeof G!=="object"&&typeof G!=="function")G={};for(;q<$;++q)if(K=arguments[q],K!=null){for(Q in K)if(J=l4(G,Q),X=l4(K,Q),G!==X){if(D&&X&&(p4(X)||(H=v4(X)))){if(H)H=!1,W=J&&v4(J)?J:[];else W=J&&p4(J)?J:{};u4(G,{name:Q,newValue:Z(D,W,X)})}else if(typeof X<"u")u4(G,{name:Q,newValue:X})}}return G}});function Z5(){}function M6(){}function ZZ(Z,K){let Q=K||{};return(Z[Z.length-1]===""?[...Z,""]:Z).join((Q.padRight?" ":"")+","+(Q.padLeft===!1?"":" ")).trim()}var _0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N0={};function L6(Z,K){return((K||N0).jsx?V0:_0).test(Z)}var M0=/[ \t\n\f\r]/g;function n6(Z){return typeof Z==="object"?Z.type==="text"?KZ(Z.value):!1:KZ(Z)}function KZ(Z){return Z.replace(M0,"")===""}class R5{constructor(Z,K,Q){if(this.normal=K,this.property=Z,Q)this.space=Q}}R5.prototype.normal={};R5.prototype.property={};R5.prototype.space=void 0;function o6(Z,K){let Q={},J={};for(let X of Z)Object.assign(Q,X.property),Object.assign(J,X.normal);return new R5(Q,J,K)}function s5(Z){return Z.toLowerCase()}class o{constructor(Z,K){this.attribute=K,this.property=Z}}o.prototype.attribute="";o.prototype.booleanish=!1;o.prototype.boolean=!1;o.prototype.commaOrSpaceSeparated=!1;o.prototype.commaSeparated=!1;o.prototype.defined=!1;o.prototype.mustUseProperty=!1;o.prototype.number=!1;o.prototype.overloadedBoolean=!1;o.prototype.property="";o.prototype.spaceSeparated=!1;o.prototype.space=void 0;var n5={};QZ(n5,{spaceSeparated:()=>x,overloadedBoolean:()=>B6,number:()=>L,commaSeparated:()=>B5,commaOrSpaceSeparated:()=>Q5,booleanish:()=>i,boolean:()=>w});var L0=0,w=P5(),i=P5(),B6=P5(),L=P5(),x=P5(),B5=P5(),Q5=P5();function P5(){return 2**++L0}var t6=Object.keys(n5);class h5 extends o{constructor(Z,K,Q,J){let X=-1;super(Z,K);if(JZ(this,"space",J),typeof Q==="number")while(++X<t6.length){let H=t6[X];JZ(this,t6[X],(Q&n5[H])===n5[H])}}}h5.prototype.defined=!0;function JZ(Z,K,Q){if(Q)Z[K]=Q}function W5(Z){let K={},Q={};for(let[J,X]of Object.entries(Z.properties)){let H=new h5(J,Z.transform(Z.attributes||{},J),X,Z.space);if(Z.mustUseProperty&&Z.mustUseProperty.includes(J))H.mustUseProperty=!0;K[J]=H,Q[s5(J)]=J,Q[s5(H.attribute)]=J}return new R5(K,Q,Z.space)}var e6=W5({properties:{ariaActiveDescendant:null,ariaAtomic:i,ariaAutoComplete:null,ariaBusy:i,ariaChecked:i,ariaColCount:L,ariaColIndex:L,ariaColSpan:L,ariaControls:x,ariaCurrent:null,ariaDescribedBy:x,ariaDetails:null,ariaDisabled:i,ariaDropEffect:x,ariaErrorMessage:null,ariaExpanded:i,ariaFlowTo:x,ariaGrabbed:i,ariaHasPopup:null,ariaHidden:i,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:x,ariaLevel:L,ariaLive:null,ariaModal:i,ariaMultiLine:i,ariaMultiSelectable:i,ariaOrientation:null,ariaOwns:x,ariaPlaceholder:null,ariaPosInSet:L,ariaPressed:i,ariaReadOnly:i,ariaRelevant:null,ariaRequired:i,ariaRoleDescription:x,ariaRowCount:L,ariaRowIndex:L,ariaRowSpan:L,ariaSelected:i,ariaSetSize:L,ariaSort:null,ariaValueMax:L,ariaValueMin:L,ariaValueNow:L,ariaValueText:null,role:null},transform(Z,K){return K==="role"?K:"aria-"+K.slice(4).toLowerCase()}});function F6(Z,K){return K in Z?Z[K]:K}function R6(Z,K){return F6(Z,K.toLowerCase())}var XZ=W5({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:B5,acceptCharset:x,accessKey:x,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alpha:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:x,autoFocus:w,autoPlay:w,blocking:x,capture:null,charSet:null,checked:w,cite:null,className:x,closedBy:null,colorSpace:null,cols:L,colSpan:L,command:null,commandFor:null,content:null,contentEditable:i,controls:w,controlsList:x,coords:L|B5,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:B6,draggable:i,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:x,height:L,hidden:B6,high:L,href:null,hrefLang:null,htmlFor:x,httpEquiv:x,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:x,itemRef:x,itemScope:w,itemType:x,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:L,manifest:null,max:null,maxLength:L,media:null,method:null,min:null,minLength:L,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:L,pattern:null,ping:x,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:x,required:w,reversed:w,rows:L,rowSpan:L,sandbox:x,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootCustomElementRegistry:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shadowRootSerializable:w,shape:null,size:L,sizes:null,slot:null,span:L,spellCheck:i,src:null,srcDoc:null,srcLang:null,srcSet:null,start:L,step:null,style:null,tabIndex:L,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:i,width:L,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:x,axis:null,background:null,bgColor:null,border:L,borderColor:null,bottomMargin:L,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:L,leftMargin:L,link:null,longDesc:null,lowSrc:null,marginHeight:L,marginWidth:L,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:L,rules:null,scheme:null,scrolling:i,standby:null,summary:null,text:null,topMargin:L,valueType:null,version:null,vAlign:null,vLink:null,vSpace:L,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:w,disablePictureInPicture:w,disableRemotePlayback:w,exportParts:B5,part:x,prefix:null,property:null,results:L,security:null,unselectable:null},space:"html",transform:R6});var HZ=W5({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Q5,accentHeight:L,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:L,amplitude:L,arabicForm:null,ascent:L,attributeName:null,attributeType:null,azimuth:L,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:L,by:null,calcMode:null,capHeight:L,className:x,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:L,diffuseConstant:L,direction:null,display:null,dur:null,divisor:L,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:L,enableBackground:null,end:null,event:null,exponent:L,externalResourcesRequired:null,fill:null,fillOpacity:L,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:B5,g2:B5,glyphName:B5,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:L,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:L,horizOriginX:L,horizOriginY:L,id:null,ideographic:L,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:L,k:L,k1:L,k2:L,k3:L,k4:L,kernelMatrix:Q5,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:L,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:L,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:L,overlineThickness:L,paintOrder:null,panose1:null,path:null,pathLength:L,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:x,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:L,pointsAtY:L,pointsAtZ:L,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Q5,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Q5,rev:Q5,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Q5,requiredFeatures:Q5,requiredFonts:Q5,requiredFormats:Q5,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:L,specularExponent:L,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:L,strikethroughThickness:L,string:null,stroke:null,strokeDashArray:Q5,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:L,strokeOpacity:L,strokeWidth:null,style:null,surfaceScale:L,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Q5,tabIndex:L,tableValues:null,target:null,targetX:L,targetY:L,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Q5,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:L,underlineThickness:L,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:L,values:null,vAlphabetic:L,vMathematical:L,vectorEffect:null,vHanging:L,vIdeographic:L,version:null,vertAdvY:L,vertOriginX:L,vertOriginY:L,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:L,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F6});var Z7=W5({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(Z,K){return"xlink:"+K.slice(5).toLowerCase()}});var K7=W5({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:R6});var Q7=W5({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(Z,K){return"xml:"+K.slice(3).toLowerCase()}});var J7={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var B0=/[A-Z]/g,WZ=/-[a-z]/g,F0=/^data[-\w.:]+$/i;function X7(Z,K){let Q=s5(K),J=K,X=o;if(Q in Z.normal)return Z.property[Z.normal[Q]];if(Q.length>4&&Q.slice(0,4)==="data"&&F0.test(K)){if(K.charAt(4)==="-"){let H=K.slice(5).replace(WZ,j0);J="data"+H.charAt(0).toUpperCase()+H.slice(1)}else{let H=K.slice(4);if(!WZ.test(H)){let W=H.replace(B0,R0);if(W.charAt(0)!=="-")W="-"+W;K="data"+W}}X=h5}return new X(J,K)}function R0(Z){return"-"+Z.toLowerCase()}function j0(Z){return Z.charAt(1).toUpperCase()}var GZ=o6([e6,XZ,Z7,K7,Q7],"html"),j6=o6([e6,HZ,Z7,K7,Q7],"svg");function DZ(Z){return Z.join(" ").trim()}var CZ=q7(jZ(),1);var A6=AZ("end"),k5=AZ("start");function AZ(Z){return K;function K(Q){let J=Q&&Q.position&&Q.position[Z]||{};if(typeof J.line==="number"&&J.line>0&&typeof J.column==="number"&&J.column>0)return{line:J.line,column:J.column,offset:typeof J.offset==="number"&&J.offset>-1?J.offset:void 0}}}function G7(Z){let K=k5(Z),Q=A6(Z);if(K&&Q)return{start:K,end:Q}}function j5(Z){if(!Z||typeof Z!=="object")return"";if("position"in Z||"type"in Z)return zZ(Z.position);if("start"in Z||"end"in Z)return zZ(Z);if("line"in Z||"column"in Z)return D7(Z);return""}function D7(Z){return TZ(Z&&Z.line)+":"+TZ(Z&&Z.column)}function zZ(Z){return D7(Z&&Z.start)+"-"+D7(Z&&Z.end)}function TZ(Z){return Z&&typeof Z==="number"?Z:1}class d extends Error{constructor(Z,K,Q){super();if(typeof K==="string")Q=K,K=void 0;let J="",X={},H=!1;if(K)if("line"in K&&"column"in K)X={place:K};else if("start"in K&&"end"in K)X={place:K};else if("type"in K)X={ancestors:[K],place:K.position};else X={...K};if(typeof Z==="string")J=Z;else if(!X.cause&&Z)H=!0,J=Z.message,X.cause=Z;if(!X.ruleId&&!X.source&&typeof Q==="string"){let G=Q.indexOf(":");if(G===-1)X.ruleId=Q;else X.source=Q.slice(0,G),X.ruleId=Q.slice(G+1)}if(!X.place&&X.ancestors&&X.ancestors){let G=X.ancestors[X.ancestors.length-1];if(G)X.place=G.position}let W=X.place&&"start"in X.place?X.place.start:X.place;this.ancestors=X.ancestors||void 0,this.cause=X.cause||void 0,this.column=W?W.column:void 0,this.fatal=void 0,this.file="",this.message=J,this.line=W?W.line:void 0,this.name=j5(X.place)||"1:1",this.place=X.place||void 0,this.reason=this.message,this.ruleId=X.ruleId||void 0,this.source=X.source||void 0,this.stack=H&&X.cause&&typeof X.cause.stack==="string"?X.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}d.prototype.file="";d.prototype.name="";d.prototype.reason="";d.prototype.message="";d.prototype.stack="";d.prototype.column=void 0;d.prototype.line=void 0;d.prototype.ancestors=void 0;d.prototype.cause=void 0;d.prototype.fatal=void 0;d.prototype.place=void 0;d.prototype.ruleId=void 0;d.prototype.source=void 0;var Y7={}.hasOwnProperty,d0=new Map,c0=/[A-Z]/g,s0=new Set(["table","tbody","thead","tfoot","tr"]),n0=new Set(["td","th"]),OZ="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $7(Z,K){if(!K||K.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let Q=K.filePath||void 0,J;if(K.development){if(typeof K.jsxDEV!=="function")throw TypeError("Expected `jsxDEV` in options when `development: true`");J=XK(Q,K.jsxDEV)}else{if(typeof K.jsx!=="function")throw TypeError("Expected `jsx` in production options");if(typeof K.jsxs!=="function")throw TypeError("Expected `jsxs` in production options");J=JK(Q,K.jsx,K.jsxs)}let X={Fragment:K.Fragment,ancestors:[],components:K.components||{},create:J,elementAttributeNameCase:K.elementAttributeNameCase||"react",evaluater:K.createEvaluater?K.createEvaluater():void 0,filePath:Q,ignoreInvalidStyle:K.ignoreInvalidStyle||!1,passKeys:K.passKeys!==!1,passNode:K.passNode||!1,schema:K.space==="svg"?j6:GZ,stylePropertyNameCase:K.stylePropertyNameCase||"dom",tableCellAlignToStyle:K.tableCellAlignToStyle!==!1},H=wZ(X,Z,void 0);if(H&&typeof H!=="string")return H;return X.create(Z,X.Fragment,{children:H||void 0},void 0)}function wZ(Z,K,Q){if(K.type==="element")return o0(Z,K,Q);if(K.type==="mdxFlowExpression"||K.type==="mdxTextExpression")return t0(Z,K);if(K.type==="mdxJsxFlowElement"||K.type==="mdxJsxTextElement")return ZK(Z,K,Q);if(K.type==="mdxjsEsm")return e0(Z,K);if(K.type==="root")return KK(Z,K,Q);if(K.type==="text")return QK(Z,K)}function o0(Z,K,Q){let J=Z.schema,X=J;if(K.tagName.toLowerCase()==="svg"&&J.space==="html")X=j6,Z.schema=X;Z.ancestors.push(K);let H=IZ(Z,K.tagName,!1),W=HK(Z,K),G=_7(Z,K);if(s0.has(K.tagName))G=G.filter(function(q){return typeof q==="string"?!n6(q):!0});return PZ(Z,W,H,K),U7(W,G),Z.ancestors.pop(),Z.schema=J,Z.create(K,H,W,Q)}function t0(Z,K){if(K.data&&K.data.estree&&Z.evaluater){let J=K.data.estree.body[0];return Z5(J.type==="ExpressionStatement"),Z.evaluater.evaluateExpression(J.expression)}e5(Z,K.position)}function e0(Z,K){if(K.data&&K.data.estree&&Z.evaluater)return Z.evaluater.evaluateProgram(K.data.estree);e5(Z,K.position)}function ZK(Z,K,Q){let J=Z.schema,X=J;if(K.name==="svg"&&J.space==="html")X=j6,Z.schema=X;Z.ancestors.push(K);let H=K.name===null?Z.Fragment:IZ(Z,K.name,!0),W=WK(Z,K),G=_7(Z,K);return PZ(Z,W,H,K),U7(W,G),Z.ancestors.pop(),Z.schema=J,Z.create(K,H,W,Q)}function KK(Z,K,Q){let J={};return U7(J,_7(Z,K)),Z.create(K,Z.Fragment,J,Q)}function QK(Z,K){return K.value}function PZ(Z,K,Q,J){if(typeof Q!=="string"&&Q!==Z.Fragment&&Z.passNode)K.node=J}function U7(Z,K){if(K.length>0){let Q=K.length>1?K:K[0];if(Q)Z.children=Q}}function JK(Z,K,Q){return J;function J(X,H,W,G){let $=Array.isArray(W.children)?Q:K;return G?$(H,W,G):$(H,W)}}function XK(Z,K){return Q;function Q(J,X,H,W){let G=Array.isArray(H.children),q=k5(J);return K(X,H,W,G,{columnNumber:q?q.column-1:void 0,fileName:Z,lineNumber:q?q.line:void 0},void 0)}}function HK(Z,K){let Q={},J,X;for(X in K.properties)if(X!=="children"&&Y7.call(K.properties,X)){let H=GK(Z,X,K.properties[X]);if(H){let[W,G]=H;if(Z.tableCellAlignToStyle&&W==="align"&&typeof G==="string"&&n0.has(K.tagName))J=G;else Q[W]=G}}if(J){let H=Q.style||(Q.style={});H[Z.stylePropertyNameCase==="css"?"text-align":"textAlign"]=J}return Q}function WK(Z,K){let Q={};for(let J of K.attributes)if(J.type==="mdxJsxExpressionAttribute")if(J.data&&J.data.estree&&Z.evaluater){let H=J.data.estree.body[0];Z5(H.type==="ExpressionStatement");let W=H.expression;Z5(W.type==="ObjectExpression");let G=W.properties[0];Z5(G.type==="SpreadElement"),Object.assign(Q,Z.evaluater.evaluateExpression(G.argument))}else e5(Z,K.position);else{let X=J.name,H;if(J.value&&typeof J.value==="object")if(J.value.data&&J.value.data.estree&&Z.evaluater){let G=J.value.data.estree.body[0];Z5(G.type==="ExpressionStatement"),H=Z.evaluater.evaluateExpression(G.expression)}else e5(Z,K.position);else H=J.value===null?!0:J.value;Q[X]=H}return Q}function _7(Z,K){let Q=[],J=-1,X=Z.passKeys?new Map:d0;while(++J<K.children.length){let H=K.children[J],W;if(Z.passKeys){let q=H.type==="element"?H.tagName:H.type==="mdxJsxFlowElement"||H.type==="mdxJsxTextElement"?H.name:void 0;if(q){let $=X.get(q)||0;W=q+"-"+$,X.set(q,$+1)}}let G=wZ(Z,H,W);if(G!==void 0)Q.push(G)}return Q}function GK(Z,K,Q){let J=X7(Z.schema,K);if(Q===null||Q===void 0||typeof Q==="number"&&Number.isNaN(Q))return;if(Array.isArray(Q))Q=J.commaSeparated?ZZ(Q):DZ(Q);if(J.property==="style"){let X=typeof Q==="object"?Q:DK(Z,String(Q));if(Z.stylePropertyNameCase==="css")X=qK(X);return["style",X]}return[Z.elementAttributeNameCase==="react"&&J.space?J7[J.property]||J.property:J.attribute,Q]}function DK(Z,K){try{return CZ.default(K,{reactCompat:!0})}catch(Q){if(Z.ignoreInvalidStyle)return{};let J=Q,X=new d("Cannot parse `style` attribute",{ancestors:Z.ancestors,cause:J,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw X.file=Z.filePath||void 0,X.url=OZ+"#cannot-parse-style-attribute",X}}function IZ(Z,K,Q){let J;if(!Q)J={type:"Literal",value:K};else if(K.includes(".")){let X=K.split("."),H=-1,W;while(++H<X.length){let G=L6(X[H])?{type:"Identifier",name:X[H]}:{type:"Literal",value:X[H]};W=W?{type:"MemberExpression",object:W,property:G,computed:Boolean(H&&G.type==="Literal"),optional:!1}:G}Z5(W,"always a result"),J=W}else J=L6(K)&&!/^[a-z]/.test(K)?{type:"Identifier",name:K}:{type:"Literal",value:K};if(J.type==="Literal"){let X=J.value;return Y7.call(Z.components,X)?Z.components[X]:X}if(Z.evaluater)return Z.evaluater.evaluateExpression(J);e5(Z)}function e5(Z,K){let Q=new d("Cannot handle MDX estrees without `createEvaluater`",{ancestors:Z.ancestors,place:K,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw Q.file=Z.filePath||void 0,Q.url=OZ+"#cannot-handle-mdx-estrees-without-createevaluater",Q}function qK(Z){let K={},Q;for(Q in Z)if(Y7.call(Z,Q))K[YK(Q)]=Z[Q];return K}function YK(Z){let K=Z.replace(c0,$K);if(K.slice(0,3)==="ms-")K="-"+K;return K}function $K(Z){return"-"+Z.toLowerCase()}var Z6={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};var X0=q7(L9(),1);var UK={};function V7(Z,K){let Q=K||UK,J=typeof Q.includeImageAlt==="boolean"?Q.includeImageAlt:!0,X=typeof Q.includeHtml==="boolean"?Q.includeHtml:!0;return EZ(Z,J,X)}function EZ(Z,K,Q){if(_K(Z)){if("value"in Z)return Z.type==="html"&&!Q?"":Z.value;if(K&&"alt"in Z&&Z.alt)return Z.alt;if("children"in Z)return SZ(Z.children,K,Q)}if(Array.isArray(Z))return SZ(Z,K,Q);return""}function SZ(Z,K,Q){let J=[],X=-1;while(++X<Z.length)J[X]=EZ(Z[X],K,Q);return J.join("")}function _K(Z){return Boolean(Z&&typeof Z==="object")}var bZ=document.createElement("i");function m5(Z){let K="&"+Z+";";bZ.innerHTML=K;let Q=bZ.textContent;if(Q.charCodeAt(Q.length-1)===59&&Z!=="semi")return!1;return Q===K?!1:Q}function t(Z,K,Q,J){let X=Z.length,H=0,W;if(K<0)K=-K>X?0:X+K;else K=K>X?X:K;if(Q=Q>0?Q:0,J.length<1e4)W=Array.from(J),W.unshift(K,Q),Z.splice(...W);else{if(Q)Z.splice(K,Q);while(H<J.length)W=J.slice(H,H+1e4),W.unshift(K,0),Z.splice(...W),H+=1e4,K+=1e4}}function K5(Z,K){if(Z.length>0)return t(Z,Z.length,0,K),Z;return K}var gZ={}.hasOwnProperty;function yZ(Z){let K={},Q=-1;while(++Q<Z.length)VK(K,Z[Q]);return K}function VK(Z,K){let Q;for(Q in K){let X=(gZ.call(Z,Q)?Z[Q]:void 0)||(Z[Q]={}),H=K[Q],W;if(H)for(W in H){if(!gZ.call(X,W))X[W]=[];let G=H[W];NK(X[W],Array.isArray(G)?G:G?[G]:[])}}}function NK(Z,K){let Q=-1,J=[];while(++Q<K.length)(K[Q].add==="after"?Z:J).push(K[Q]);t(Z,0,0,J)}function z6(Z,K){let Q=Number.parseInt(Z,K);if(Q<9||Q===11||Q>13&&Q<32||Q>126&&Q<160||Q>55295&&Q<57344||Q>64975&&Q<65008||(Q&65535)===65535||(Q&65535)===65534||Q>1114111)return"�";return String.fromCodePoint(Q)}function F5(Z){return Z.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var X5=A5(/[A-Za-z]/),s=A5(/[\dA-Za-z]/),xZ=A5(/[#-'*+\--9=?A-Z^-~]/);function K6(Z){return Z!==null&&(Z<32||Z===127)}var Q6=A5(/\d/),hZ=A5(/[\dA-Fa-f]/),kZ=A5(/[!-/:-@[-`{-~]/);function z(Z){return Z!==null&&Z<-2}function r(Z){return Z!==null&&(Z<0||Z===32)}function P(Z){return Z===-2||Z===-1||Z===32}var mZ=A5(/\p{P}|\p{S}/u),vZ=A5(/\s/);function A5(Z){return K;function K(Q){return Q!==null&&Q>-1&&Z.test(String.fromCharCode(Q))}}function G5(Z){let K=[],Q=-1,J=0,X=0;while(++Q<Z.length){let H=Z.charCodeAt(Q),W="";if(H===37&&s(Z.charCodeAt(Q+1))&&s(Z.charCodeAt(Q+2)))X=2;else if(H<128){if(!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(H)))W=String.fromCharCode(H)}else if(H>55295&&H<57344){let G=Z.charCodeAt(Q+1);if(H<56320&&G>56319&&G<57344)W=String.fromCharCode(H,G),X=1;else W="�"}else W=String.fromCharCode(H);if(W)K.push(Z.slice(J,Q),encodeURIComponent(W)),J=Q+X+1,W="";if(X)Q+=X,X=0}return K.join("")+Z.slice(J)}function S(Z,K,Q,J){let X=J?J-1:Number.POSITIVE_INFINITY,H=0;return W;function W(q){if(P(q))return Z.enter(Q),G(q);return K(q)}function G(q){if(P(q)&&H++<X)return Z.consume(q),G;return Z.exit(Q),K(q)}}var pZ={tokenize:MK};function MK(Z){let K=Z.attempt(this.parser.constructs.contentInitial,J,X),Q;return K;function J(G){if(G===null){Z.consume(G);return}return Z.enter("lineEnding"),Z.consume(G),Z.exit("lineEnding"),S(Z,K,"linePrefix")}function X(G){return Z.enter("paragraph"),H(G)}function H(G){let q=Z.enter("chunkText",{contentType:"text",previous:Q});if(Q)Q.next=q;return Q=q,W(G)}function W(G){if(G===null){Z.exit("chunkText"),Z.exit("paragraph"),Z.consume(G);return}if(z(G))return Z.consume(G),Z.exit("chunkText"),H;return Z.consume(G),W}}var lZ={tokenize:LK},uZ={tokenize:BK};function LK(Z){let K=this,Q=[],J=0,X,H,W;return G;function G(T){if(J<Q.length){let p=Q[J];return K.containerState=p[1],Z.attempt(p[0].continuation,q,$)(T)}return $(T)}function q(T){if(J++,K.containerState._closeFlow){if(K.containerState._closeFlow=void 0,X)g();let p=K.events.length,l=p,B;while(l--)if(K.events[l][0]==="exit"&&K.events[l][1].type==="chunkFlow"){B=K.events[l][1].end;break}j(J);let v=p;while(v<K.events.length)K.events[v][1].end={...B},v++;return t(K.events,l+1,0,K.events.slice(p)),K.events.length=v,$(T)}return G(T)}function $(T){if(J===Q.length){if(!X)return _(T);if(X.currentConstruct&&X.currentConstruct.concrete)return F(T);K.interrupt=Boolean(X.currentConstruct&&!X._gfmTableDynamicInterruptHack)}return K.containerState={},Z.check(uZ,D,N)(T)}function D(T){if(X)g();return j(J),_(T)}function N(T){return K.parser.lazy[K.now().line]=J!==Q.length,W=K.now().offset,F(T)}function _(T){return K.containerState={},Z.attempt(uZ,Y,F)(T)}function Y(T){return J++,Q.push([K.currentConstruct,K.containerState]),_(T)}function F(T){if(T===null){if(X)g();j(0),Z.consume(T);return}return X=X||K.parser.flow(K.now()),Z.enter("chunkFlow",{_tokenizer:X,contentType:"flow",previous:H}),R(T)}function R(T){if(T===null){O(Z.exit("chunkFlow"),!0),j(0),Z.consume(T);return}if(z(T))return Z.consume(T),O(Z.exit("chunkFlow")),J=0,K.interrupt=void 0,G;return Z.consume(T),R}function O(T,p){let l=K.sliceStream(T);if(p)l.push(null);if(T.previous=H,H)H.next=T;if(H=T,X.defineSkip(T.start),X.write(l),K.parser.lazy[T.start.line]){let B=X.events.length;while(B--)if(X.events[B][1].start.offset<W&&(!X.events[B][1].end||X.events[B][1].end.offset>W))return;let v=K.events.length,a=v,h,u;while(a--)if(K.events[a][0]==="exit"&&K.events[a][1].type==="chunkFlow"){if(h){u=K.events[a][1].end;break}h=!0}j(J),B=v;while(B<K.events.length)K.events[B][1].end={...u},B++;t(K.events,a+1,0,K.events.slice(v)),K.events.length=B}}function j(T){let p=Q.length;while(p-- >T){let l=Q[p];K.containerState=l[1],l[0].exit.call(K,Z)}Q.length=T}function g(){X.write([null]),H=void 0,X=void 0,K.containerState._closeFlow=void 0}}function BK(Z,K,Q){return S(Z,Z.attempt(this.parser.constructs.document,K,Q),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function N7(Z){if(Z===null||r(Z)||vZ(Z))return 1;if(mZ(Z))return 2}function v5(Z,K,Q){let J=[],X=-1;while(++X<Z.length){let H=Z[X].resolveAll;if(H&&!J.includes(H))K=H(K,Q),J.push(H)}return K}var J6={name:"attention",resolveAll:FK,tokenize:RK};function FK(Z,K){let Q=-1,J,X,H,W,G,q,$,D;while(++Q<Z.length)if(Z[Q][0]==="enter"&&Z[Q][1].type==="attentionSequence"&&Z[Q][1]._close){J=Q;while(J--)if(Z[J][0]==="exit"&&Z[J][1].type==="attentionSequence"&&Z[J][1]._open&&K.sliceSerialize(Z[J][1]).charCodeAt(0)===K.sliceSerialize(Z[Q][1]).charCodeAt(0)){if((Z[J][1]._close||Z[Q][1]._open)&&(Z[Q][1].end.offset-Z[Q][1].start.offset)%3&&!((Z[J][1].end.offset-Z[J][1].start.offset+Z[Q][1].end.offset-Z[Q][1].start.offset)%3))continue;q=Z[J][1].end.offset-Z[J][1].start.offset>1&&Z[Q][1].end.offset-Z[Q][1].start.offset>1?2:1;let N={...Z[J][1].end},_={...Z[Q][1].start};if(fZ(N,-q),fZ(_,q),W={type:q>1?"strongSequence":"emphasisSequence",start:N,end:{...Z[J][1].end}},G={type:q>1?"strongSequence":"emphasisSequence",start:{...Z[Q][1].start},end:_},H={type:q>1?"strongText":"emphasisText",start:{...Z[J][1].end},end:{...Z[Q][1].start}},X={type:q>1?"strong":"emphasis",start:{...W.start},end:{...G.end}},Z[J][1].end={...W.start},Z[Q][1].start={...G.end},$=[],Z[J][1].end.offset-Z[J][1].start.offset)$=K5($,[["enter",Z[J][1],K],["exit",Z[J][1],K]]);if($=K5($,[["enter",X,K],["enter",W,K],["exit",W,K],["enter",H,K]]),$=K5($,v5(K.parser.constructs.insideSpan.null,Z.slice(J+1,Q),K)),$=K5($,[["exit",H,K],["enter",G,K],["exit",G,K],["exit",X,K]]),Z[Q][1].end.offset-Z[Q][1].start.offset)D=2,$=K5($,[["enter",Z[Q][1],K],["exit",Z[Q][1],K]]);else D=0;t(Z,J-1,Q-J+3,$),Q=J+$.length-D-2;break}}Q=-1;while(++Q<Z.length)if(Z[Q][1].type==="attentionSequence")Z[Q][1].type="data";return Z}function RK(Z,K){let Q=this.parser.constructs.attentionMarkers.null,J=this.previous,X=N7(J),H;return W;function W(q){return H=q,Z.enter("attentionSequence"),G(q)}function G(q){if(q===H)return Z.consume(q),G;let $=Z.exit("attentionSequence"),D=N7(q),N=!D||D===2&&X||Q.includes(q),_=!X||X===2&&D||Q.includes(J);return $._open=Boolean(H===42?N:N&&(X||!_)),$._close=Boolean(H===42?_:_&&(D||!N)),K(q)}}function fZ(Z,K){Z.column+=K,Z.offset+=K,Z._bufferIndex+=K}var M7={name:"autolink",tokenize:jK};function jK(Z,K,Q){let J=0;return X;function X(Y){return Z.enter("autolink"),Z.enter("autolinkMarker"),Z.consume(Y),Z.exit("autolinkMarker"),Z.enter("autolinkProtocol"),H}function H(Y){if(X5(Y))return Z.consume(Y),W;if(Y===64)return Q(Y);return $(Y)}function W(Y){if(Y===43||Y===45||Y===46||s(Y))return J=1,G(Y);return $(Y)}function G(Y){if(Y===58)return Z.consume(Y),J=0,q;if((Y===43||Y===45||Y===46||s(Y))&&J++<32)return Z.consume(Y),G;return J=0,$(Y)}function q(Y){if(Y===62)return Z.exit("autolinkProtocol"),Z.enter("autolinkMarker"),Z.consume(Y),Z.exit("autolinkMarker"),Z.exit("autolink"),K;if(Y===null||Y===32||Y===60||K6(Y))return Q(Y);return Z.consume(Y),q}function $(Y){if(Y===64)return Z.consume(Y),D;if(xZ(Y))return Z.consume(Y),$;return Q(Y)}function D(Y){return s(Y)?N(Y):Q(Y)}function N(Y){if(Y===46)return Z.consume(Y),J=0,D;if(Y===62)return Z.exit("autolinkProtocol").type="autolinkEmail",Z.enter("autolinkMarker"),Z.consume(Y),Z.exit("autolinkMarker"),Z.exit("autolink"),K;return _(Y)}function _(Y){if((Y===45||s(Y))&&J++<63){let F=Y===45?_:N;return Z.consume(Y),F}return Q(Y)}}var z5={partial:!0,tokenize:AK};function AK(Z,K,Q){return J;function J(H){return P(H)?S(Z,X,"linePrefix")(H):X(H)}function X(H){return H===null||z(H)?K(H):Q(H)}}var T6={continuation:{tokenize:TK},exit:CK,name:"blockQuote",tokenize:zK};function zK(Z,K,Q){let J=this;return X;function X(W){if(W===62){let G=J.containerState;if(!G.open)Z.enter("blockQuote",{_container:!0}),G.open=!0;return Z.enter("blockQuotePrefix"),Z.enter("blockQuoteMarker"),Z.consume(W),Z.exit("blockQuoteMarker"),H}return Q(W)}function H(W){if(P(W))return Z.enter("blockQuotePrefixWhitespace"),Z.consume(W),Z.exit("blockQuotePrefixWhitespace"),Z.exit("blockQuotePrefix"),K;return Z.exit("blockQuotePrefix"),K(W)}}function TK(Z,K,Q){let J=this;return X;function X(W){if(P(W))return S(Z,H,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W);return H(W)}function H(W){return Z.attempt(T6,K,Q)(W)}}function CK(Z){Z.exit("blockQuote")}var C6={name:"characterEscape",tokenize:OK};function OK(Z,K,Q){return J;function J(H){return Z.enter("characterEscape"),Z.enter("escapeMarker"),Z.consume(H),Z.exit("escapeMarker"),X}function X(H){if(kZ(H))return Z.enter("characterEscapeValue"),Z.consume(H),Z.exit("characterEscapeValue"),Z.exit("characterEscape"),K;return Q(H)}}var O6={name:"characterReference",tokenize:wK};function wK(Z,K,Q){let J=this,X=0,H,W;return G;function G(N){return Z.enter("characterReference"),Z.enter("characterReferenceMarker"),Z.consume(N),Z.exit("characterReferenceMarker"),q}function q(N){if(N===35)return Z.enter("characterReferenceMarkerNumeric"),Z.consume(N),Z.exit("characterReferenceMarkerNumeric"),$;return Z.enter("characterReferenceValue"),H=31,W=s,D(N)}function $(N){if(N===88||N===120)return Z.enter("characterReferenceMarkerHexadecimal"),Z.consume(N),Z.exit("characterReferenceMarkerHexadecimal"),Z.enter("characterReferenceValue"),H=6,W=hZ,D;return Z.enter("characterReferenceValue"),H=7,W=Q6,D(N)}function D(N){if(N===59&&X){let _=Z.exit("characterReferenceValue");if(W===s&&!m5(J.sliceSerialize(_)))return Q(N);return Z.enter("characterReferenceMarker"),Z.consume(N),Z.exit("characterReferenceMarker"),Z.exit("characterReference"),K}if(W(N)&&X++<H)return Z.consume(N),D;return Q(N)}}var iZ={partial:!0,tokenize:IK},w6={concrete:!0,name:"codeFenced",tokenize:PK};function PK(Z,K,Q){let J=this,X={partial:!0,tokenize:l},H=0,W=0,G;return q;function q(B){return $(B)}function $(B){let v=J.events[J.events.length-1];return H=v&&v[1].type==="linePrefix"?v[2].sliceSerialize(v[1],!0).length:0,G=B,Z.enter("codeFenced"),Z.enter("codeFencedFence"),Z.enter("codeFencedFenceSequence"),D(B)}function D(B){if(B===G)return W++,Z.consume(B),D;if(W<3)return Q(B);return Z.exit("codeFencedFenceSequence"),P(B)?S(Z,N,"whitespace")(B):N(B)}function N(B){if(B===null||z(B))return Z.exit("codeFencedFence"),J.interrupt?K(B):Z.check(iZ,R,p)(B);return Z.enter("codeFencedFenceInfo"),Z.enter("chunkString",{contentType:"string"}),_(B)}function _(B){if(B===null||z(B))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),N(B);if(P(B))return Z.exit("chunkString"),Z.exit("codeFencedFenceInfo"),S(Z,Y,"whitespace")(B);if(B===96&&B===G)return Q(B);return Z.consume(B),_}function Y(B){if(B===null||z(B))return N(B);return Z.enter("codeFencedFenceMeta"),Z.enter("chunkString",{contentType:"string"}),F(B)}function F(B){if(B===null||z(B))return Z.exit("chunkString"),Z.exit("codeFencedFenceMeta"),N(B);if(B===96&&B===G)return Q(B);return Z.consume(B),F}function R(B){return Z.attempt(X,p,O)(B)}function O(B){return Z.enter("lineEnding"),Z.consume(B),Z.exit("lineEnding"),j}function j(B){return H>0&&P(B)?S(Z,g,"linePrefix",H+1)(B):g(B)}function g(B){if(B===null||z(B))return Z.check(iZ,R,p)(B);return Z.enter("codeFlowValue"),T(B)}function T(B){if(B===null||z(B))return Z.exit("codeFlowValue"),g(B);return Z.consume(B),T}function p(B){return Z.exit("codeFenced"),K(B)}function l(B,v,a){let h=0;return u;function u(E){return B.enter("lineEnding"),B.consume(E),B.exit("lineEnding"),H5}function H5(E){return B.enter("codeFencedFence"),P(E)?S(B,k,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):k(E)}function k(E){if(E===G)return B.enter("codeFencedFenceSequence"),C(E);return a(E)}function C(E){if(E===G)return h++,B.consume(E),C;if(h>=W)return B.exit("codeFencedFenceSequence"),P(E)?S(B,b,"whitespace")(E):b(E);return a(E)}function b(E){if(E===null||z(E))return B.exit("codeFencedFence"),v(E);return a(E)}}}function IK(Z,K,Q){let J=this;return X;function X(W){if(W===null)return Q(W);return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),H}function H(W){return J.parser.lazy[J.now().line]?Q(W):K(W)}}var X6={name:"codeIndented",tokenize:EK},SK={partial:!0,tokenize:bK};function EK(Z,K,Q){let J=this;return X;function X($){return Z.enter("codeIndented"),S(Z,H,"linePrefix",5)($)}function H($){let D=J.events[J.events.length-1];return D&&D[1].type==="linePrefix"&&D[2].sliceSerialize(D[1],!0).length>=4?W($):Q($)}function W($){if($===null)return q($);if(z($))return Z.attempt(SK,W,q)($);return Z.enter("codeFlowValue"),G($)}function G($){if($===null||z($))return Z.exit("codeFlowValue"),W($);return Z.consume($),G}function q($){return Z.exit("codeIndented"),K($)}}function bK(Z,K,Q){let J=this;return X;function X(W){if(J.parser.lazy[J.now().line])return Q(W);if(z(W))return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),X;return S(Z,H,"linePrefix",5)(W)}function H(W){let G=J.events[J.events.length-1];return G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4?K(W):z(W)?X(W):Q(W)}}var L7={name:"codeText",previous:yK,resolve:gK,tokenize:xK};function gK(Z){let K=Z.length-4,Q=3,J,X;if((Z[Q][1].type==="lineEnding"||Z[Q][1].type==="space")&&(Z[K][1].type==="lineEnding"||Z[K][1].type==="space")){J=Q;while(++J<K)if(Z[J][1].type==="codeTextData"){Z[Q][1].type="codeTextPadding",Z[K][1].type="codeTextPadding",Q+=2,K-=2;break}}J=Q-1,K++;while(++J<=K)if(X===void 0){if(J!==K&&Z[J][1].type!=="lineEnding")X=J}else if(J===K||Z[J][1].type==="lineEnding"){if(Z[X][1].type="codeTextData",J!==X+2)Z[X][1].end=Z[J-1][1].end,Z.splice(X+2,J-X-2),K-=J-X-2,J=X+2;X=void 0}return Z}function yK(Z){return Z!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xK(Z,K,Q){let J=this,X=0,H,W;return G;function G(_){return Z.enter("codeText"),Z.enter("codeTextSequence"),q(_)}function q(_){if(_===96)return Z.consume(_),X++,q;return Z.exit("codeTextSequence"),$(_)}function $(_){if(_===null)return Q(_);if(_===32)return Z.enter("space"),Z.consume(_),Z.exit("space"),$;if(_===96)return W=Z.enter("codeTextSequence"),H=0,N(_);if(z(_))return Z.enter("lineEnding"),Z.consume(_),Z.exit("lineEnding"),$;return Z.enter("codeTextData"),D(_)}function D(_){if(_===null||_===32||_===96||z(_))return Z.exit("codeTextData"),$(_);return Z.consume(_),D}function N(_){if(_===96)return Z.consume(_),H++,N;if(H===X)return Z.exit("codeTextSequence"),Z.exit("codeText"),K(_);return W.type="codeTextData",D(_)}}class B7{constructor(Z){this.left=Z?[...Z]:[],this.right=[]}get(Z){if(Z<0||Z>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+Z+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");if(Z<this.left.length)return this.left[Z];return this.right[this.right.length-Z+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(Z,K){let Q=K===null||K===void 0?Number.POSITIVE_INFINITY:K;if(Q<this.left.length)return this.left.slice(Z,Q);if(Z>this.left.length)return this.right.slice(this.right.length-Q+this.left.length,this.right.length-Z+this.left.length).reverse();return this.left.slice(Z).concat(this.right.slice(this.right.length-Q+this.left.length).reverse())}splice(Z,K,Q){let J=K||0;this.setCursor(Math.trunc(Z));let X=this.right.splice(this.right.length-J,Number.POSITIVE_INFINITY);if(Q)H6(this.left,Q);return X.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(Z){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(Z)}pushMany(Z){this.setCursor(Number.POSITIVE_INFINITY),H6(this.left,Z)}unshift(Z){this.setCursor(0),this.right.push(Z)}unshiftMany(Z){this.setCursor(0),H6(this.right,Z.reverse())}setCursor(Z){if(Z===this.left.length||Z>this.left.length&&this.right.length===0||Z<0&&this.left.length===0)return;if(Z<this.left.length){let K=this.left.splice(Z,Number.POSITIVE_INFINITY);H6(this.right,K.reverse())}else{let K=this.right.splice(this.left.length+this.right.length-Z,Number.POSITIVE_INFINITY);H6(this.left,K.reverse())}}}function H6(Z,K){let Q=0;if(K.length<1e4)Z.push(...K);else while(Q<K.length)Z.push(...K.slice(Q,Q+1e4)),Q+=1e4}function P6(Z){let K={},Q=-1,J,X,H,W,G,q,$,D=new B7(Z);while(++Q<D.length){while(Q in K)Q=K[Q];if(J=D.get(Q),Q&&J[1].type==="chunkFlow"&&D.get(Q-1)[1].type==="listItemPrefix"){if(q=J[1]._tokenizer.events,H=0,H<q.length&&q[H][1].type==="lineEndingBlank")H+=2;if(H<q.length&&q[H][1].type==="content")while(++H<q.length){if(q[H][1].type==="content")break;if(q[H][1].type==="chunkText")q[H][1]._isInFirstContentOfListItem=!0,H++}}if(J[0]==="enter"){if(J[1].contentType)Object.assign(K,hK(D,Q)),Q=K[Q],$=!0}else if(J[1]._container){H=Q,X=void 0;while(H--)if(W=D.get(H),W[1].type==="lineEnding"||W[1].type==="lineEndingBlank"){if(W[0]==="enter"){if(X)D.get(X)[1].type="lineEndingBlank";W[1].type="lineEnding",X=H}}else if(W[1].type==="linePrefix"||W[1].type==="listItemIndent");else break;if(X)J[1].end={...D.get(X)[1].start},G=D.slice(X,Q),G.unshift(J),D.splice(X,Q-X+1,G)}}return t(Z,0,Number.POSITIVE_INFINITY,D.slice(0)),!$}function hK(Z,K){let Q=Z.get(K)[1],J=Z.get(K)[2],X=K-1,H=[],W=Q._tokenizer;if(!W){if(W=J.parser[Q.contentType](Q.start),Q._contentTypeTextTrailing)W._contentTypeTextTrailing=!0}let G=W.events,q=[],$={},D,N,_=-1,Y=Q,F=0,R=0,O=[R];while(Y){while(Z.get(++X)[1]!==Y);if(H.push(X),!Y._tokenizer){if(D=J.sliceStream(Y),!Y.next)D.push(null);if(N)W.defineSkip(Y.start);if(Y._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=!0;if(W.write(D),Y._isInFirstContentOfListItem)W._gfmTasklistFirstContentOfListItem=void 0}N=Y,Y=Y.next}Y=Q;while(++_<G.length)if(G[_][0]==="exit"&&G[_-1][0]==="enter"&&G[_][1].type===G[_-1][1].type&&G[_][1].start.line!==G[_][1].end.line)R=_+1,O.push(R),Y._tokenizer=void 0,Y.previous=void 0,Y=Y.next;if(W.events=[],Y)Y._tokenizer=void 0,Y.previous=void 0;else O.pop();_=O.length;while(_--){let j=G.slice(O[_],O[_+1]),g=H.pop();q.push([g,g+j.length-1]),Z.splice(g,2,j)}q.reverse(),_=-1;while(++_<q.length)$[F+q[_][0]]=F+q[_][1],F+=q[_][1]-q[_][0]-1;return $}var F7={resolve:mK,tokenize:vK},kK={partial:!0,tokenize:pK};function mK(Z){return P6(Z),Z}function vK(Z,K){let Q;return J;function J(G){return Z.enter("content"),Q=Z.enter("chunkContent",{contentType:"content"}),X(G)}function X(G){if(G===null)return H(G);if(z(G))return Z.check(kK,W,H)(G);return Z.consume(G),X}function H(G){return Z.exit("chunkContent"),Z.exit("content"),K(G)}function W(G){return Z.consume(G),Z.exit("chunkContent"),Q.next=Z.enter("chunkContent",{contentType:"content",previous:Q}),Q=Q.next,X}}function pK(Z,K,Q){let J=this;return X;function X(W){return Z.exit("chunkContent"),Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),S(Z,H,"linePrefix")}function H(W){if(W===null||z(W))return Q(W);let G=J.events[J.events.length-1];if(!J.parser.constructs.disable.null.includes("codeIndented")&&G&&G[1].type==="linePrefix"&&G[2].sliceSerialize(G[1],!0).length>=4)return K(W);return Z.interrupt(J.parser.constructs.flow,Q,K)(W)}}function I6(Z,K,Q,J,X,H,W,G,q){let $=q||Number.POSITIVE_INFINITY,D=0;return N;function N(j){if(j===60)return Z.enter(J),Z.enter(X),Z.enter(H),Z.consume(j),Z.exit(H),_;if(j===null||j===32||j===41||K6(j))return Q(j);return Z.enter(J),Z.enter(W),Z.enter(G),Z.enter("chunkString",{contentType:"string"}),R(j)}function _(j){if(j===62)return Z.enter(H),Z.consume(j),Z.exit(H),Z.exit(X),Z.exit(J),K;return Z.enter(G),Z.enter("chunkString",{contentType:"string"}),Y(j)}function Y(j){if(j===62)return Z.exit("chunkString"),Z.exit(G),_(j);if(j===null||j===60||z(j))return Q(j);return Z.consume(j),j===92?F:Y}function F(j){if(j===60||j===62||j===92)return Z.consume(j),Y;return Y(j)}function R(j){if(!D&&(j===null||j===41||r(j)))return Z.exit("chunkString"),Z.exit(G),Z.exit(W),Z.exit(J),K(j);if(D<$&&j===40)return Z.consume(j),D++,R;if(j===41)return Z.consume(j),D--,R;if(j===null||j===32||j===40||K6(j))return Q(j);return Z.consume(j),j===92?O:R}function O(j){if(j===40||j===41||j===92)return Z.consume(j),R;return R(j)}}function S6(Z,K,Q,J,X,H){let W=this,G=0,q;return $;function $(Y){return Z.enter(J),Z.enter(X),Z.consume(Y),Z.exit(X),Z.enter(H),D}function D(Y){if(G>999||Y===null||Y===91||Y===93&&!q||Y===94&&!G&&"_hiddenFootnoteSupport"in W.parser.constructs)return Q(Y);if(Y===93)return Z.exit(H),Z.enter(X),Z.consume(Y),Z.exit(X),Z.exit(J),K;if(z(Y))return Z.enter("lineEnding"),Z.consume(Y),Z.exit("lineEnding"),D;return Z.enter("chunkString",{contentType:"string"}),N(Y)}function N(Y){if(Y===null||Y===91||Y===93||z(Y)||G++>999)return Z.exit("chunkString"),D(Y);if(Z.consume(Y),!q)q=!P(Y);return Y===92?_:N}function _(Y){if(Y===91||Y===92||Y===93)return Z.consume(Y),G++,N;return N(Y)}}function E6(Z,K,Q,J,X,H){let W;return G;function G(_){if(_===34||_===39||_===40)return Z.enter(J),Z.enter(X),Z.consume(_),Z.exit(X),W=_===40?41:_,q;return Q(_)}function q(_){if(_===W)return Z.enter(X),Z.consume(_),Z.exit(X),Z.exit(J),K;return Z.enter(H),$(_)}function $(_){if(_===W)return Z.exit(H),q(W);if(_===null)return Q(_);if(z(_))return Z.enter("lineEnding"),Z.consume(_),Z.exit("lineEnding"),S(Z,$,"linePrefix");return Z.enter("chunkString",{contentType:"string"}),D(_)}function D(_){if(_===W||_===null||z(_))return Z.exit("chunkString"),$(_);return Z.consume(_),_===92?N:D}function N(_){if(_===W||_===92)return Z.consume(_),D;return D(_)}}function S5(Z,K){let Q;return J;function J(X){if(z(X))return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),Q=!0,J;if(P(X))return S(Z,J,Q?"linePrefix":"lineSuffix")(X);return K(X)}}var R7={name:"definition",tokenize:lK},uK={partial:!0,tokenize:fK};function lK(Z,K,Q){let J=this,X;return H;function H(Y){return Z.enter("definition"),W(Y)}function W(Y){return S6.call(J,Z,G,Q,"definitionLabel","definitionLabelMarker","definitionLabelString")(Y)}function G(Y){if(X=F5(J.sliceSerialize(J.events[J.events.length-1][1]).slice(1,-1)),Y===58)return Z.enter("definitionMarker"),Z.consume(Y),Z.exit("definitionMarker"),q;return Q(Y)}function q(Y){return r(Y)?S5(Z,$)(Y):$(Y)}function $(Y){return I6(Z,D,Q,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(Y)}function D(Y){return Z.attempt(uK,N,N)(Y)}function N(Y){return P(Y)?S(Z,_,"whitespace")(Y):_(Y)}function _(Y){if(Y===null||z(Y))return Z.exit("definition"),J.parser.defined.push(X),K(Y);return Q(Y)}}function fK(Z,K,Q){return J;function J(G){return r(G)?S5(Z,X)(G):Q(G)}function X(G){return E6(Z,H,Q,"definitionTitle","definitionTitleMarker","definitionTitleString")(G)}function H(G){return P(G)?S(Z,W,"whitespace")(G):W(G)}function W(G){return G===null||z(G)?K(G):Q(G)}}var j7={name:"hardBreakEscape",tokenize:iK};function iK(Z,K,Q){return J;function J(H){return Z.enter("hardBreakEscape"),Z.consume(H),X}function X(H){if(z(H))return Z.exit("hardBreakEscape"),K(H);return Q(H)}}var A7={name:"headingAtx",resolve:rK,tokenize:aK};function rK(Z,K){let Q=Z.length-2,J=3,X,H;if(Z[J][1].type==="whitespace")J+=2;if(Q-2>J&&Z[Q][1].type==="whitespace")Q-=2;if(Z[Q][1].type==="atxHeadingSequence"&&(J===Q-1||Q-4>J&&Z[Q-2][1].type==="whitespace"))Q-=J+1===Q?2:4;if(Q>J)X={type:"atxHeadingText",start:Z[J][1].start,end:Z[Q][1].end},H={type:"chunkText",start:Z[J][1].start,end:Z[Q][1].end,contentType:"text"},t(Z,J,Q-J+1,[["enter",X,K],["enter",H,K],["exit",H,K],["exit",X,K]]);return Z}function aK(Z,K,Q){let J=0;return X;function X(D){return Z.enter("atxHeading"),H(D)}function H(D){return Z.enter("atxHeadingSequence"),W(D)}function W(D){if(D===35&&J++<6)return Z.consume(D),W;if(D===null||r(D))return Z.exit("atxHeadingSequence"),G(D);return Q(D)}function G(D){if(D===35)return Z.enter("atxHeadingSequence"),q(D);if(D===null||z(D))return Z.exit("atxHeading"),K(D);if(P(D))return S(Z,G,"whitespace")(D);return Z.enter("atxHeadingText"),$(D)}function q(D){if(D===35)return Z.consume(D),q;return Z.exit("atxHeadingSequence"),G(D)}function $(D){if(D===null||D===35||r(D))return Z.exit("atxHeadingText"),G(D);return Z.consume(D),$}}var rZ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],z7=["pre","script","style","textarea"];var T7={concrete:!0,name:"htmlFlow",resolveTo:sK,tokenize:nK},dK={partial:!0,tokenize:tK},cK={partial:!0,tokenize:oK};function sK(Z){let K=Z.length;while(K--)if(Z[K][0]==="enter"&&Z[K][1].type==="htmlFlow")break;if(K>1&&Z[K-2][1].type==="linePrefix")Z[K][1].start=Z[K-2][1].start,Z[K+1][1].start=Z[K-2][1].start,Z.splice(K-2,2);return Z}function nK(Z,K,Q){let J=this,X,H,W,G,q;return $;function $(V){return D(V)}function D(V){return Z.enter("htmlFlow"),Z.enter("htmlFlowData"),Z.consume(V),N}function N(V){if(V===33)return Z.consume(V),_;if(V===47)return Z.consume(V),H=!0,R;if(V===63)return Z.consume(V),X=3,J.interrupt?K:U;if(X5(V))return Z.consume(V),W=String.fromCharCode(V),O;return Q(V)}function _(V){if(V===45)return Z.consume(V),X=2,Y;if(V===91)return Z.consume(V),X=5,G=0,F;if(X5(V))return Z.consume(V),X=4,J.interrupt?K:U;return Q(V)}function Y(V){if(V===45)return Z.consume(V),J.interrupt?K:U;return Q(V)}function F(V){if(V==="CDATA[".charCodeAt(G++)){if(Z.consume(V),G===6)return J.interrupt?K:k;return F}return Q(V)}function R(V){if(X5(V))return Z.consume(V),W=String.fromCharCode(V),O;return Q(V)}function O(V){if(V===null||V===47||V===62||r(V)){let q5=V===47,C5=W.toLowerCase();if(!q5&&!H&&z7.includes(C5))return X=1,J.interrupt?K(V):k(V);if(rZ.includes(W.toLowerCase())){if(X=6,q5)return Z.consume(V),j;return J.interrupt?K(V):k(V)}return X=7,J.interrupt&&!J.parser.lazy[J.now().line]?Q(V):H?g(V):T(V)}if(V===45||s(V))return Z.consume(V),W+=String.fromCharCode(V),O;return Q(V)}function j(V){if(V===62)return Z.consume(V),J.interrupt?K:k;return Q(V)}function g(V){if(P(V))return Z.consume(V),g;return u(V)}function T(V){if(V===47)return Z.consume(V),u;if(V===58||V===95||X5(V))return Z.consume(V),p;if(P(V))return Z.consume(V),T;return u(V)}function p(V){if(V===45||V===46||V===58||V===95||s(V))return Z.consume(V),p;return l(V)}function l(V){if(V===61)return Z.consume(V),B;if(P(V))return Z.consume(V),l;return T(V)}function B(V){if(V===null||V===60||V===61||V===62||V===96)return Q(V);if(V===34||V===39)return Z.consume(V),q=V,v;if(P(V))return Z.consume(V),B;return a(V)}function v(V){if(V===q)return Z.consume(V),q=null,h;if(V===null||z(V))return Q(V);return Z.consume(V),v}function a(V){if(V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||r(V))return l(V);return Z.consume(V),a}function h(V){if(V===47||V===62||P(V))return T(V);return Q(V)}function u(V){if(V===62)return Z.consume(V),H5;return Q(V)}function H5(V){if(V===null||z(V))return k(V);if(P(V))return Z.consume(V),H5;return Q(V)}function k(V){if(V===45&&X===2)return Z.consume(V),f;if(V===60&&X===1)return Z.consume(V),c;if(V===62&&X===4)return Z.consume(V),_5;if(V===63&&X===3)return Z.consume(V),U;if(V===93&&X===5)return Z.consume(V),U5;if(z(V)&&(X===6||X===7))return Z.exit("htmlFlowData"),Z.check(dK,V5,C)(V);if(V===null||z(V))return Z.exit("htmlFlowData"),C(V);return Z.consume(V),k}function C(V){return Z.check(cK,b,V5)(V)}function b(V){return Z.enter("lineEnding"),Z.consume(V),Z.exit("lineEnding"),E}function E(V){if(V===null||z(V))return C(V);return Z.enter("htmlFlowData"),k(V)}function f(V){if(V===45)return Z.consume(V),U;return k(V)}function c(V){if(V===47)return Z.consume(V),W="",D5;return k(V)}function D5(V){if(V===62){let q5=W.toLowerCase();if(z7.includes(q5))return Z.consume(V),_5;return k(V)}if(X5(V)&&W.length<8)return Z.consume(V),W+=String.fromCharCode(V),D5;return k(V)}function U5(V){if(V===93)return Z.consume(V),U;return k(V)}function U(V){if(V===62)return Z.consume(V),_5;if(V===45&&X===2)return Z.consume(V),U;return k(V)}function _5(V){if(V===null||z(V))return Z.exit("htmlFlowData"),V5(V);return Z.consume(V),_5}function V5(V){return Z.exit("htmlFlow"),K(V)}}function oK(Z,K,Q){let J=this;return X;function X(W){if(z(W))return Z.enter("lineEnding"),Z.consume(W),Z.exit("lineEnding"),H;return Q(W)}function H(W){return J.parser.lazy[J.now().line]?Q(W):K(W)}}function tK(Z,K,Q){return J;function J(X){return Z.enter("lineEnding"),Z.consume(X),Z.exit("lineEnding"),Z.attempt(z5,K,Q)}}var C7={name:"htmlText",tokenize:eK};function eK(Z,K,Q){let J=this,X,H,W;return G;function G(U){return Z.enter("htmlText"),Z.enter("htmlTextData"),Z.consume(U),q}function q(U){if(U===33)return Z.consume(U),$;if(U===47)return Z.consume(U),l;if(U===63)return Z.consume(U),T;if(X5(U))return Z.consume(U),a;return Q(U)}function $(U){if(U===45)return Z.consume(U),D;if(U===91)return Z.consume(U),H=0,F;if(X5(U))return Z.consume(U),g;return Q(U)}function D(U){if(U===45)return Z.consume(U),Y;return Q(U)}function N(U){if(U===null)return Q(U);if(U===45)return Z.consume(U),_;if(z(U))return W=N,c(U);return Z.consume(U),N}function _(U){if(U===45)return Z.consume(U),Y;return N(U)}function Y(U){return U===62?f(U):U===45?_(U):N(U)}function F(U){if(U==="CDATA[".charCodeAt(H++))return Z.consume(U),H===6?R:F;return Q(U)}function R(U){if(U===null)return Q(U);if(U===93)return Z.consume(U),O;if(z(U))return W=R,c(U);return Z.consume(U),R}function O(U){if(U===93)return Z.consume(U),j;return R(U)}function j(U){if(U===62)return f(U);if(U===93)return Z.consume(U),j;return R(U)}function g(U){if(U===null||U===62)return f(U);if(z(U))return W=g,c(U);return Z.consume(U),g}function T(U){if(U===null)return Q(U);if(U===63)return Z.consume(U),p;if(z(U))return W=T,c(U);return Z.consume(U),T}function p(U){return U===62?f(U):T(U)}function l(U){if(X5(U))return Z.consume(U),B;return Q(U)}function B(U){if(U===45||s(U))return Z.consume(U),B;return v(U)}function v(U){if(z(U))return W=v,c(U);if(P(U))return Z.consume(U),v;return f(U)}function a(U){if(U===45||s(U))return Z.consume(U),a;if(U===47||U===62||r(U))return h(U);return Q(U)}function h(U){if(U===47)return Z.consume(U),f;if(U===58||U===95||X5(U))return Z.consume(U),u;if(z(U))return W=h,c(U);if(P(U))return Z.consume(U),h;return f(U)}function u(U){if(U===45||U===46||U===58||U===95||s(U))return Z.consume(U),u;return H5(U)}function H5(U){if(U===61)return Z.consume(U),k;if(z(U))return W=H5,c(U);if(P(U))return Z.consume(U),H5;return h(U)}function k(U){if(U===null||U===60||U===61||U===62||U===96)return Q(U);if(U===34||U===39)return Z.consume(U),X=U,C;if(z(U))return W=k,c(U);if(P(U))return Z.consume(U),k;return Z.consume(U),b}function C(U){if(U===X)return Z.consume(U),X=void 0,E;if(U===null)return Q(U);if(z(U))return W=C,c(U);return Z.consume(U),C}function b(U){if(U===null||U===34||U===39||U===60||U===61||U===96)return Q(U);if(U===47||U===62||r(U))return h(U);return Z.consume(U),b}function E(U){if(U===47||U===62||r(U))return h(U);return Q(U)}function f(U){if(U===62)return Z.consume(U),Z.exit("htmlTextData"),Z.exit("htmlText"),K;return Q(U)}function c(U){return Z.exit("htmlTextData"),Z.enter("lineEnding"),Z.consume(U),Z.exit("lineEnding"),D5}function D5(U){return P(U)?S(Z,U5,"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):U5(U)}function U5(U){return Z.enter("htmlTextData"),W(U)}}var E5={name:"labelEnd",resolveAll:J2,resolveTo:X2,tokenize:H2},Z2={tokenize:W2},K2={tokenize:G2},Q2={tokenize:D2};function J2(Z){let K=-1,Q=[];while(++K<Z.length){let J=Z[K][1];if(Q.push(Z[K]),J.type==="labelImage"||J.type==="labelLink"||J.type==="labelEnd"){let X=J.type==="labelImage"?4:2;J.type="data",K+=X}}if(Z.length!==Q.length)t(Z,0,Z.length,Q);return Z}function X2(Z,K){let Q=Z.length,J=0,X,H,W,G;while(Q--)if(X=Z[Q][1],H){if(X.type==="link"||X.type==="labelLink"&&X._inactive)break;if(Z[Q][0]==="enter"&&X.type==="labelLink")X._inactive=!0}else if(W){if(Z[Q][0]==="enter"&&(X.type==="labelImage"||X.type==="labelLink")&&!X._balanced){if(H=Q,X.type!=="labelLink"){J=2;break}}}else if(X.type==="labelEnd")W=Q;let q={type:Z[H][1].type==="labelLink"?"link":"image",start:{...Z[H][1].start},end:{...Z[Z.length-1][1].end}},$={type:"label",start:{...Z[H][1].start},end:{...Z[W][1].end}},D={type:"labelText",start:{...Z[H+J+2][1].end},end:{...Z[W-2][1].start}};return G=[["enter",q,K],["enter",$,K]],G=K5(G,Z.slice(H+1,H+J+3)),G=K5(G,[["enter",D,K]]),G=K5(G,v5(K.parser.constructs.insideSpan.null,Z.slice(H+J+4,W-3),K)),G=K5(G,[["exit",D,K],Z[W-2],Z[W-1],["exit",$,K]]),G=K5(G,Z.slice(W+1)),G=K5(G,[["exit",q,K]]),t(Z,H,Z.length,G),Z}function H2(Z,K,Q){let J=this,X=J.events.length,H,W;while(X--)if((J.events[X][1].type==="labelImage"||J.events[X][1].type==="labelLink")&&!J.events[X][1]._balanced){H=J.events[X][1];break}return G;function G(_){if(!H)return Q(_);if(H._inactive)return N(_);return W=J.parser.defined.includes(F5(J.sliceSerialize({start:H.end,end:J.now()}))),Z.enter("labelEnd"),Z.enter("labelMarker"),Z.consume(_),Z.exit("labelMarker"),Z.exit("labelEnd"),q}function q(_){if(_===40)return Z.attempt(Z2,D,W?D:N)(_);if(_===91)return Z.attempt(K2,D,W?$:N)(_);return W?D(_):N(_)}function $(_){return Z.attempt(Q2,D,N)(_)}function D(_){return K(_)}function N(_){return H._balanced=!0,Q(_)}}function W2(Z,K,Q){return J;function J(N){return Z.enter("resource"),Z.enter("resourceMarker"),Z.consume(N),Z.exit("resourceMarker"),X}function X(N){return r(N)?S5(Z,H)(N):H(N)}function H(N){if(N===41)return D(N);return I6(Z,W,G,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(N)}function W(N){return r(N)?S5(Z,q)(N):D(N)}function G(N){return Q(N)}function q(N){if(N===34||N===39||N===40)return E6(Z,$,Q,"resourceTitle","resourceTitleMarker","resourceTitleString")(N);return D(N)}function $(N){return r(N)?S5(Z,D)(N):D(N)}function D(N){if(N===41)return Z.enter("resourceMarker"),Z.consume(N),Z.exit("resourceMarker"),Z.exit("resource"),K;return Q(N)}}function G2(Z,K,Q){let J=this;return X;function X(G){return S6.call(J,Z,H,W,"reference","referenceMarker","referenceString")(G)}function H(G){return J.parser.defined.includes(F5(J.sliceSerialize(J.events[J.events.length-1][1]).slice(1,-1)))?K(G):Q(G)}function W(G){return Q(G)}}function D2(Z,K,Q){return J;function J(H){return Z.enter("reference"),Z.enter("referenceMarker"),Z.consume(H),Z.exit("referenceMarker"),X}function X(H){if(H===93)return Z.enter("referenceMarker"),Z.consume(H),Z.exit("referenceMarker"),Z.exit("reference"),K;return Q(H)}}var O7={name:"labelStartImage",resolveAll:E5.resolveAll,tokenize:q2};function q2(Z,K,Q){let J=this;return X;function X(G){return Z.enter("labelImage"),Z.enter("labelImageMarker"),Z.consume(G),Z.exit("labelImageMarker"),H}function H(G){if(G===91)return Z.enter("labelMarker"),Z.consume(G),Z.exit("labelMarker"),Z.exit("labelImage"),W;return Q(G)}function W(G){return G===94&&"_hiddenFootnoteSupport"in J.parser.constructs?Q(G):K(G)}}var w7={name:"labelStartLink",resolveAll:E5.resolveAll,tokenize:Y2};function Y2(Z,K,Q){let J=this;return X;function X(W){return Z.enter("labelLink"),Z.enter("labelMarker"),Z.consume(W),Z.exit("labelMarker"),Z.exit("labelLink"),H}function H(W){return W===94&&"_hiddenFootnoteSupport"in J.parser.constructs?Q(W):K(W)}}var W6={name:"lineEnding",tokenize:$2};function $2(Z,K){return Q;function Q(J){return Z.enter("lineEnding"),Z.consume(J),Z.exit("lineEnding"),S(Z,K,"linePrefix")}}var b5={name:"thematicBreak",tokenize:U2};function U2(Z,K,Q){let J=0,X;return H;function H($){return Z.enter("thematicBreak"),W($)}function W($){return X=$,G($)}function G($){if($===X)return Z.enter("thematicBreakSequence"),q($);if(J>=3&&($===null||z($)))return Z.exit("thematicBreak"),K($);return Q($)}function q($){if($===X)return Z.consume($),J++,q;return Z.exit("thematicBreakSequence"),P($)?S(Z,G,"whitespace")($):G($)}}var e={continuation:{tokenize:M2},exit:B2,name:"list",tokenize:N2},_2={partial:!0,tokenize:F2},V2={partial:!0,tokenize:L2};function N2(Z,K,Q){let J=this,X=J.events[J.events.length-1],H=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,W=0;return G;function G(Y){let F=J.containerState.type||(Y===42||Y===43||Y===45?"listUnordered":"listOrdered");if(F==="listUnordered"?!J.containerState.marker||Y===J.containerState.marker:Q6(Y)){if(!J.containerState.type)J.containerState.type=F,Z.enter(F,{_container:!0});if(F==="listUnordered")return Z.enter("listItemPrefix"),Y===42||Y===45?Z.check(b5,Q,$)(Y):$(Y);if(!J.interrupt||Y===49)return Z.enter("listItemPrefix"),Z.enter("listItemValue"),q(Y)}return Q(Y)}function q(Y){if(Q6(Y)&&++W<10)return Z.consume(Y),q;if((!J.interrupt||W<2)&&(J.containerState.marker?Y===J.containerState.marker:Y===41||Y===46))return Z.exit("listItemValue"),$(Y);return Q(Y)}function $(Y){return Z.enter("listItemMarker"),Z.consume(Y),Z.exit("listItemMarker"),J.containerState.marker=J.containerState.marker||Y,Z.check(z5,J.interrupt?Q:D,Z.attempt(_2,_,N))}function D(Y){return J.containerState.initialBlankLine=!0,H++,_(Y)}function N(Y){if(P(Y))return Z.enter("listItemPrefixWhitespace"),Z.consume(Y),Z.exit("listItemPrefixWhitespace"),_;return Q(Y)}function _(Y){return J.containerState.size=H+J.sliceSerialize(Z.exit("listItemPrefix"),!0).length,K(Y)}}function M2(Z,K,Q){let J=this;return J.containerState._closeFlow=void 0,Z.check(z5,X,H);function X(G){return J.containerState.furtherBlankLines=J.containerState.furtherBlankLines||J.containerState.initialBlankLine,S(Z,K,"listItemIndent",J.containerState.size+1)(G)}function H(G){if(J.containerState.furtherBlankLines||!P(G))return J.containerState.furtherBlankLines=void 0,J.containerState.initialBlankLine=void 0,W(G);return J.containerState.furtherBlankLines=void 0,J.containerState.initialBlankLine=void 0,Z.attempt(V2,K,W)(G)}function W(G){return J.containerState._closeFlow=!0,J.interrupt=void 0,S(Z,Z.attempt(e,K,Q),"linePrefix",J.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G)}}function L2(Z,K,Q){let J=this;return S(Z,X,"listItemIndent",J.containerState.size+1);function X(H){let W=J.events[J.events.length-1];return W&&W[1].type==="listItemIndent"&&W[2].sliceSerialize(W[1],!0).length===J.containerState.size?K(H):Q(H)}}function B2(Z){Z.exit(this.containerState.type)}function F2(Z,K,Q){let J=this;return S(Z,X,"listItemPrefixWhitespace",J.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function X(H){let W=J.events[J.events.length-1];return!P(H)&&W&&W[1].type==="listItemPrefixWhitespace"?K(H):Q(H)}}var b6={name:"setextUnderline",resolveTo:R2,tokenize:j2};function R2(Z,K){let Q=Z.length,J,X,H;while(Q--)if(Z[Q][0]==="enter"){if(Z[Q][1].type==="content"){J=Q;break}if(Z[Q][1].type==="paragraph")X=Q}else{if(Z[Q][1].type==="content")Z.splice(Q,1);if(!H&&Z[Q][1].type==="definition")H=Q}let W={type:"setextHeading",start:{...Z[J][1].start},end:{...Z[Z.length-1][1].end}};if(Z[X][1].type="setextHeadingText",H)Z.splice(X,0,["enter",W,K]),Z.splice(H+1,0,["exit",Z[J][1],K]),Z[J][1].end={...Z[H][1].end};else Z[J][1]=W;return Z.push(["exit",W,K]),Z}function j2(Z,K,Q){let J=this,X;return H;function H($){let D=J.events.length,N;while(D--)if(J.events[D][1].type!=="lineEnding"&&J.events[D][1].type!=="linePrefix"&&J.events[D][1].type!=="content"){N=J.events[D][1].type==="paragraph";break}if(!J.parser.lazy[J.now().line]&&(J.interrupt||N))return Z.enter("setextHeadingLine"),X=$,W($);return Q($)}function W($){return Z.enter("setextHeadingLineSequence"),G($)}function G($){if($===X)return Z.consume($),G;return Z.exit("setextHeadingLineSequence"),P($)?S(Z,q,"lineSuffix")($):q($)}function q($){if($===null||z($))return Z.exit("setextHeadingLine"),K($);return Q($)}}var aZ={tokenize:A2};function A2(Z){let K=this,Q=Z.attempt(z5,J,Z.attempt(this.parser.constructs.flowInitial,X,S(Z,Z.attempt(this.parser.constructs.flow,X,Z.attempt(F7,X)),"linePrefix")));return Q;function J(H){if(H===null){Z.consume(H);return}return Z.enter("lineEndingBlank"),Z.consume(H),Z.exit("lineEndingBlank"),K.currentConstruct=void 0,Q}function X(H){if(H===null){Z.consume(H);return}return Z.enter("lineEnding"),Z.consume(H),Z.exit("lineEnding"),K.currentConstruct=void 0,Q}}var dZ={resolveAll:oZ()},cZ=nZ("string"),sZ=nZ("text");function nZ(Z){return{resolveAll:oZ(Z==="text"?z2:void 0),tokenize:K};function K(Q){let J=this,X=this.parser.constructs[Z],H=Q.attempt(X,W,G);return W;function W(D){return $(D)?H(D):G(D)}function G(D){if(D===null){Q.consume(D);return}return Q.enter("data"),Q.consume(D),q}function q(D){if($(D))return Q.exit("data"),H(D);return Q.consume(D),q}function $(D){if(D===null)return!0;let N=X[D],_=-1;if(N)while(++_<N.length){let Y=N[_];if(!Y.previous||Y.previous.call(J,J.previous))return!0}return!1}}}function oZ(Z){return K;function K(Q,J){let X=-1,H;while(++X<=Q.length)if(H===void 0){if(Q[X]&&Q[X][1].type==="data")H=X,X++}else if(!Q[X]||Q[X][1].type!=="data"){if(X!==H+2)Q[H][1].end=Q[X-1][1].end,Q.splice(H+2,X-H-2),X=H+2;H=void 0}return Z?Z(Q,J):Q}}function z2(Z,K){let Q=0;while(++Q<=Z.length)if((Q===Z.length||Z[Q][1].type==="lineEnding")&&Z[Q-1][1].type==="data"){let J=Z[Q-1][1],X=K.sliceStream(J),H=X.length,W=-1,G=0,q;while(H--){let $=X[H];if(typeof $==="string"){W=$.length;while($.charCodeAt(W-1)===32)G++,W--;if(W)break;W=-1}else if($===-2)q=!0,G++;else if($===-1);else{H++;break}}if(K._contentTypeTextTrailing&&Q===Z.length)G=0;if(G){let $={type:Q===Z.length||q||G<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:H?W:J.start._bufferIndex+W,_index:J.start._index+H,line:J.end.line,column:J.end.column-G,offset:J.end.offset-G},end:{...J.end}};if(J.end={...$.start},J.start.offset===J.end.offset)Object.assign(J,$);else Z.splice(Q,0,["enter",$,K],["exit",$,K]),Q+=2}Q++}return Z}var P7={};QZ(P7,{text:()=>I2,string:()=>P2,insideSpan:()=>S2,flowInitial:()=>O2,flow:()=>w2,document:()=>T2,disable:()=>b2,contentInitial:()=>C2,attentionMarkers:()=>E2});var T2={[42]:e,[43]:e,[45]:e,[48]:e,[49]:e,[50]:e,[51]:e,[52]:e,[53]:e,[54]:e,[55]:e,[56]:e,[57]:e,[62]:T6},C2={[91]:R7},O2={[-2]:X6,[-1]:X6,[32]:X6},w2={[35]:A7,[42]:b5,[45]:[b6,b5],[60]:T7,[61]:b6,[95]:b5,[96]:w6,[126]:w6},P2={[38]:O6,[92]:C6},I2={[-5]:W6,[-4]:W6,[-3]:W6,[33]:O7,[38]:O6,[42]:J6,[60]:[M7,C7],[91]:w7,[92]:[j7,C6],[93]:E5,[95]:J6,[96]:L7},S2={null:[J6,dZ]},E2={null:[42,95]},b2={null:[]};function tZ(Z,K,Q){let J={_bufferIndex:-1,_index:0,line:Q&&Q.line||1,column:Q&&Q.column||1,offset:Q&&Q.offset||0},X={},H=[],W=[],G=[],q=!0,$={attempt:h(v),check:h(a),consume:p,enter:l,exit:B,interrupt:h(a,{interrupt:!0})},D={code:null,containerState:{},defineSkip:j,events:[],now:O,parser:Z,previous:null,sliceSerialize:F,sliceStream:R,write:Y},N=K.tokenize.call(D,$),_;if(K.resolveAll)H.push(K);return D;function Y(C){if(W=K5(W,C),g(),W[W.length-1]!==null)return[];return u(K,0),D.events=v5(H,D.events,D),D.events}function F(C,b){return y2(R(C),b)}function R(C){return g2(W,C)}function O(){let{_bufferIndex:C,_index:b,line:E,column:f,offset:c}=J;return{_bufferIndex:C,_index:b,line:E,column:f,offset:c}}function j(C){X[C.line]=C.column,k()}function g(){let C;while(J._index<W.length){let b=W[J._index];if(typeof b==="string"){if(C=J._index,J._bufferIndex<0)J._bufferIndex=0;while(J._index===C&&J._bufferIndex<b.length)T(b.charCodeAt(J._bufferIndex))}else T(b)}}function T(C){q=void 0,_=C,N=N(C)}function p(C){if(z(C))J.line++,J.column=1,J.offset+=C===-3?2:1,k();else if(C!==-1)J.column++,J.offset++;if(J._bufferIndex<0)J._index++;else if(J._bufferIndex++,J._bufferIndex===W[J._index].length)J._bufferIndex=-1,J._index++;D.previous=C,q=!0}function l(C,b){let E=b||{};return E.type=C,E.start=O(),D.events.push(["enter",E,D]),G.push(E),E}function B(C){let b=G.pop();return b.end=O(),D.events.push(["exit",b,D]),b}function v(C,b){u(C,b.from)}function a(C,b){b.restore()}function h(C,b){return E;function E(f,c,D5){let U5,U,_5,V5;return Array.isArray(f)?q5(f):("tokenize"in f)?q5([f]):V(f);function V(n){return a5;function a5(N5){let O5=N5!==null&&n[N5],y5=N5!==null&&n.null,s6=[...Array.isArray(O5)?O5:O5?[O5]:[],...Array.isArray(y5)?y5:y5?[y5]:[]];return q5(s6)(N5)}}function q5(n){if(U5=n,U=0,n.length===0)return D5;return C5(n[U])}function C5(n){return a5;function a5(N5){if(V5=H5(),_5=n,!n.partial)D.currentConstruct=n;if(n.name&&D.parser.constructs.disable.null.includes(n.name))return N6(N5);return n.tokenize.call(b?Object.assign(Object.create(D),b):D,$,c6,N6)(N5)}}function c6(n){return q=!0,C(_5,V5),c}function N6(n){if(q=!0,V5.restore(),++U<U5.length)return C5(U5[U]);return D5}}}function u(C,b){if(C.resolveAll&&!H.includes(C))H.push(C);if(C.resolve)t(D.events,b,D.events.length-b,C.resolve(D.events.slice(b),D));if(C.resolveTo)D.events=C.resolveTo(D.events,D)}function H5(){let C=O(),b=D.previous,E=D.currentConstruct,f=D.events.length,c=Array.from(G);return{from:f,restore:D5};function D5(){J=C,D.previous=b,D.currentConstruct=E,D.events.length=f,G=c,k()}}function k(){if(J.line in X&&J.column<2)J.column=X[J.line],J.offset+=X[J.line]-1}}function g2(Z,K){let Q=K.start._index,J=K.start._bufferIndex,X=K.end._index,H=K.end._bufferIndex,W;if(Q===X)W=[Z[Q].slice(J,H)];else{if(W=Z.slice(Q,X),J>-1){let G=W[0];if(typeof G==="string")W[0]=G.slice(J);else W.shift()}if(H>0)W.push(Z[X].slice(0,H))}return W}function y2(Z,K){let Q=-1,J=[],X;while(++Q<Z.length){let H=Z[Q],W;if(typeof H==="string")W=H;else switch(H){case-5:{W="\r";break}case-4:{W=`
|
|
3
3
|
`;break}case-3:{W=`\r
|
|
4
4
|
`;break}case-2:{W=K?" ":"\t";break}case-1:{if(!K&&X)continue;W=" ";break}default:W=String.fromCharCode(H)}X=H===-2,J.push(W)}return J.join("")}function I7(Z){let J={constructs:yZ([P7,...(Z||{}).extensions||[]]),content:X(pZ),defined:[],document:X(lZ),flow:X(aZ),lazy:{},string:X(cZ),text:X(sZ)};return J;function X(H){return W;function W(G){return tZ(J,H,G)}}}function S7(Z){while(!P6(Z));return Z}var eZ=/[\0\t\n\r]/g;function E7(){let Z=1,K="",Q=!0,J;return X;function X(H,W,G){let q=[],$,D,N,_,Y;if(H=K+(typeof H==="string"?H.toString():new TextDecoder(W||void 0).decode(H)),N=0,K="",Q){if(H.charCodeAt(0)===65279)N++;Q=void 0}while(N<H.length){if(eZ.lastIndex=N,$=eZ.exec(H),_=$&&$.index!==void 0?$.index:H.length,Y=H.charCodeAt(_),!$){K=H.slice(N);break}if(Y===10&&N===_&&J)q.push(-3),J=void 0;else{if(J)q.push(-5),J=void 0;if(N<_)q.push(H.slice(N,_)),Z+=_-N;switch(Y){case 0:{q.push(65533),Z++;break}case 9:{D=Math.ceil(Z/4)*4,q.push(-2);while(Z++<D)q.push(-1);break}case 10:{q.push(-4),Z=1;break}default:J=!0,Z=1}}N=_+1}if(G){if(J)q.push(-5);if(K)q.push(K);q.push(null)}return q}}var x2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Z4(Z){return Z.replace(x2,h2)}function h2(Z,K,Q){if(K)return K;if(Q.charCodeAt(0)===35){let X=Q.charCodeAt(1),H=X===120||X===88;return z6(Q.slice(H?2:1),H?16:10)}return m5(Q)||Z}var Q4={}.hasOwnProperty;function b7(Z,K,Q){if(K&&typeof K==="object")Q=K,K=void 0;return k2(Q)(S7(I7(Q).document().write(E7()(Z,K,!0))))}function k2(Z){let K={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:H(t7),autolinkProtocol:h,autolinkEmail:h,atxHeading:H(s7),blockQuote:H(N5),characterEscape:h,characterReference:h,codeFenced:H(O5),codeFencedFenceInfo:W,codeFencedFenceMeta:W,codeIndented:H(O5,W),codeText:H(y5,W),codeTextData:h,data:h,codeFlowValue:h,definition:H(s6),definitionDestinationString:W,definitionLabelString:W,definitionTitleString:W,emphasis:H(W0),hardBreakEscape:H(n7),hardBreakTrailing:H(n7),htmlFlow:H(o7,W),htmlFlowData:h,htmlText:H(o7,W),htmlTextData:h,image:H(G0),label:W,link:H(t7),listItem:H(D0),listItemValue:_,listOrdered:H(e7,N),listUnordered:H(e7),paragraph:H(q0),reference:V,referenceString:W,resourceDestinationString:W,resourceTitleString:W,setextHeading:H(s7),strong:H(Y0),thematicBreak:H(U0)},exit:{atxHeading:q(),atxHeadingSequence:l,autolink:q(),autolinkEmail:a5,autolinkProtocol:n,blockQuote:q(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:C5,characterReferenceMarkerNumeric:C5,characterReferenceValue:c6,characterReference:N6,codeFenced:q(O),codeFencedFence:R,codeFencedFenceInfo:Y,codeFencedFenceMeta:F,codeFlowValue:u,codeIndented:q(j),codeText:q(E),codeTextData:u,data:u,definition:q(),definitionDestinationString:p,definitionLabelString:g,definitionTitleString:T,emphasis:q(),hardBreakEscape:q(k),hardBreakTrailing:q(k),htmlFlow:q(C),htmlFlowData:u,htmlText:q(b),htmlTextData:u,image:q(c),label:U5,labelText:D5,lineEnding:H5,link:q(f),listItem:q(),listOrdered:q(),listUnordered:q(),paragraph:q(),referenceString:q5,resourceDestinationString:U,resourceTitleString:_5,resource:V5,setextHeading:q(a),setextHeadingLineSequence:v,setextHeadingText:B,strong:q(),thematicBreak:q()}};J4(K,(Z||{}).mdastExtensions||[]);let Q={};return J;function J(M){let A={type:"root",children:[]},I={stack:[A],tokenStack:[],config:K,enter:G,exit:$,buffer:W,resume:D,data:Q},y=[],m=-1;while(++m<M.length)if(M[m][1].type==="listOrdered"||M[m][1].type==="listUnordered")if(M[m][0]==="enter")y.push(m);else{let Y5=y.pop();m=X(M,Y5,m)}m=-1;while(++m<M.length){let Y5=K[M[m][0]];if(Q4.call(Y5,M[m][1].type))Y5[M[m][1].type].call(Object.assign({sliceSerialize:M[m][2].sliceSerialize},I),M[m][1])}if(I.tokenStack.length>0){let Y5=I.tokenStack[I.tokenStack.length-1];(Y5[1]||K4).call(I,void 0,Y5[0])}A.position={start:T5(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:T5(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},m=-1;while(++m<K.transforms.length)A=K.transforms[m](A)||A;return A}function X(M,A,I){let y=A-1,m=-1,Y5=!1,w5,M5,d5,c5;while(++y<=I){let J5=M[y];switch(J5[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{if(J5[0]==="enter")m++;else m--;c5=void 0;break}case"lineEndingBlank":{if(J5[0]==="enter"){if(w5&&!c5&&!m&&!d5)d5=y;c5=void 0}break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:c5=void 0}if(!m&&J5[0]==="enter"&&J5[1].type==="listItemPrefix"||m===-1&&J5[0]==="exit"&&(J5[1].type==="listUnordered"||J5[1].type==="listOrdered")){if(w5){let x5=y;M5=void 0;while(x5--){let L5=M[x5];if(L5[1].type==="lineEnding"||L5[1].type==="lineEndingBlank"){if(L5[0]==="exit")continue;if(M5)M[M5][1].type="lineEndingBlank",Y5=!0;L5[1].type="lineEnding",M5=x5}else if(L5[1].type==="linePrefix"||L5[1].type==="blockQuotePrefix"||L5[1].type==="blockQuotePrefixWhitespace"||L5[1].type==="blockQuoteMarker"||L5[1].type==="listItemIndent");else break}if(d5&&(!M5||d5<M5))w5._spread=!0;w5.end=Object.assign({},M5?M[M5][1].start:J5[1].end),M.splice(M5||y,0,["exit",w5,J5[2]]),y++,I++}if(J5[1].type==="listItemPrefix"){let x5={type:"listItem",_spread:!1,start:Object.assign({},J5[1].start),end:void 0};w5=x5,M.splice(y,0,["enter",x5,J5[2]]),y++,I++,d5=void 0,c5=!0}}}return M[A][1]._spread=Y5,I}function H(M,A){return I;function I(y){if(G.call(this,M(y),y),A)A.call(this,y)}}function W(){this.stack.push({type:"fragment",children:[]})}function G(M,A,I){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([A,I||void 0]),M.position={start:T5(A.start),end:void 0}}function q(M){return A;function A(I){if(M)M.call(this,I);$.call(this,I)}}function $(M,A){let I=this.stack.pop(),y=this.tokenStack.pop();if(!y)throw Error("Cannot close `"+M.type+"` ("+j5({start:M.start,end:M.end})+"): it’s not open");else if(y[0].type!==M.type)if(A)A.call(this,M,y[0]);else(y[1]||K4).call(this,M,y[0]);I.position.end=T5(M.end)}function D(){return V7(this.stack.pop())}function N(){this.data.expectingFirstListItemValue=!0}function _(M){if(this.data.expectingFirstListItemValue){let A=this.stack[this.stack.length-2];A.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function Y(){let M=this.resume(),A=this.stack[this.stack.length-1];A.lang=M}function F(){let M=this.resume(),A=this.stack[this.stack.length-1];A.meta=M}function R(){if(this.data.flowCodeInside)return;this.buffer(),this.data.flowCodeInside=!0}function O(){let M=this.resume(),A=this.stack[this.stack.length-1];A.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){let M=this.resume(),A=this.stack[this.stack.length-1];A.value=M.replace(/(\r?\n|\r)$/g,"")}function g(M){let A=this.resume(),I=this.stack[this.stack.length-1];I.label=A,I.identifier=F5(this.sliceSerialize(M)).toLowerCase()}function T(){let M=this.resume(),A=this.stack[this.stack.length-1];A.title=M}function p(){let M=this.resume(),A=this.stack[this.stack.length-1];A.url=M}function l(M){let A=this.stack[this.stack.length-1];if(!A.depth){let I=this.sliceSerialize(M).length;A.depth=I}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function v(M){let A=this.stack[this.stack.length-1];A.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function a(){this.data.setextHeadingSlurpLineEnding=void 0}function h(M){let I=this.stack[this.stack.length-1].children,y=I[I.length-1];if(!y||y.type!=="text")y=$0(),y.position={start:T5(M.start),end:void 0},I.push(y);this.stack.push(y)}function u(M){let A=this.stack.pop();A.value+=this.sliceSerialize(M),A.position.end=T5(M.end)}function H5(M){let A=this.stack[this.stack.length-1];if(this.data.atHardBreak){let I=A.children[A.children.length-1];I.position.end=T5(M.end),this.data.atHardBreak=void 0;return}if(!this.data.setextHeadingSlurpLineEnding&&K.canContainEols.includes(A.type))h.call(this,M),u.call(this,M)}function k(){this.data.atHardBreak=!0}function C(){let M=this.resume(),A=this.stack[this.stack.length-1];A.value=M}function b(){let M=this.resume(),A=this.stack[this.stack.length-1];A.value=M}function E(){let M=this.resume(),A=this.stack[this.stack.length-1];A.value=M}function f(){let M=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=A,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function c(){let M=this.stack[this.stack.length-1];if(this.data.inReference){let A=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=A,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function D5(M){let A=this.sliceSerialize(M),I=this.stack[this.stack.length-2];I.label=Z4(A),I.identifier=F5(A).toLowerCase()}function U5(){let M=this.stack[this.stack.length-1],A=this.resume(),I=this.stack[this.stack.length-1];if(this.data.inReference=!0,I.type==="link"){let y=M.children;I.children=y}else I.alt=A}function U(){let M=this.resume(),A=this.stack[this.stack.length-1];A.url=M}function _5(){let M=this.resume(),A=this.stack[this.stack.length-1];A.title=M}function V5(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function q5(M){let A=this.resume(),I=this.stack[this.stack.length-1];I.label=A,I.identifier=F5(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function C5(M){this.data.characterReferenceType=M.type}function c6(M){let A=this.sliceSerialize(M),I=this.data.characterReferenceType,y;if(I)y=z6(A,I==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0;else y=m5(A);let m=this.stack[this.stack.length-1];m.value+=y}function N6(M){let A=this.stack.pop();A.position.end=T5(M.end)}function n(M){u.call(this,M);let A=this.stack[this.stack.length-1];A.url=this.sliceSerialize(M)}function a5(M){u.call(this,M);let A=this.stack[this.stack.length-1];A.url="mailto:"+this.sliceSerialize(M)}function N5(){return{type:"blockquote",children:[]}}function O5(){return{type:"code",lang:null,meta:null,value:""}}function y5(){return{type:"inlineCode",value:""}}function s6(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function W0(){return{type:"emphasis",children:[]}}function s7(){return{type:"heading",depth:0,children:[]}}function n7(){return{type:"break"}}function o7(){return{type:"html",value:""}}function G0(){return{type:"image",title:null,url:"",alt:null}}function t7(){return{type:"link",title:null,url:"",children:[]}}function e7(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function D0(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function q0(){return{type:"paragraph",children:[]}}function Y0(){return{type:"strong",children:[]}}function $0(){return{type:"text",value:""}}function U0(){return{type:"thematicBreak"}}}function T5(Z){return{line:Z.line,column:Z.column,offset:Z.offset}}function J4(Z,K){let Q=-1;while(++Q<K.length){let J=K[Q];if(Array.isArray(J))J4(Z,J);else m2(Z,J)}}function m2(Z,K){let Q;for(Q in K)if(Q4.call(K,Q))switch(Q){case"canContainEols":{let J=K[Q];if(J)Z[Q].push(...J);break}case"transforms":{let J=K[Q];if(J)Z[Q].push(...J);break}case"enter":case"exit":{let J=K[Q];if(J)Object.assign(Z[Q],J);break}}}function K4(Z,K){if(Z)throw Error("Cannot close `"+Z.type+"` ("+j5({start:Z.start,end:Z.end})+"): a different token (`"+K.type+"`, "+j5({start:K.start,end:K.end})+") is open");else throw Error("Cannot close document, a token (`"+K.type+"`, "+j5({start:K.start,end:K.end})+") is still open")}function g6(Z){let K=this;K.parser=Q;function Q(J){return b7(J,{...K.data("settings"),...Z,extensions:K.data("micromarkExtensions")||[],mdastExtensions:K.data("fromMarkdownExtensions")||[]})}}var y6=-1,p5=0,g5=1,u5=2,G6=3,D6=4,q6=5,Y6=6,x6=7,h6=8;var v2=typeof self==="object"?self:globalThis,X4=(Z,K)=>{switch(Z){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+Z)}return new v2[Z](K)},p2=(Z,K)=>{let Q=(X,H)=>{return Z.set(H,X),X},J=(X)=>{if(Z.has(X))return Z.get(X);let[H,W]=K[X];switch(H){case p5:case y6:return Q(W,X);case g5:{let G=Q([],X);for(let q of W)G.push(J(q));return G}case u5:{let G=Q({},X);for(let[q,$]of W)G[J(q)]=J($);return G}case G6:return Q(new Date(W),X);case D6:{let{source:G,flags:q}=W;return Q(new RegExp(G,q),X)}case q6:{let G=Q(new Map,X);for(let[q,$]of W)G.set(J(q),J($));return G}case Y6:{let G=Q(new Set,X);for(let q of W)G.add(J(q));return G}case x6:{let{name:G,message:q}=W;return Q(X4(G,q),X)}case h6:return Q(BigInt(W),X);case"BigInt":return Q(Object(BigInt(W)),X);case"ArrayBuffer":return Q(new Uint8Array(W).buffer,W);case"DataView":{let{buffer:G}=new Uint8Array(W);return Q(new DataView(G),W)}}return Q(X4(H,W),X)};return J},g7=(Z)=>p2(new Map,Z)(0);var l5="",{toString:u2}={},{keys:l2}=Object,$6=(Z)=>{let K=typeof Z;if(K!=="object"||!Z)return[p5,K];let Q=u2.call(Z).slice(8,-1);switch(Q){case"Array":return[g5,l5];case"Object":return[u5,l5];case"Date":return[G6,l5];case"RegExp":return[D6,l5];case"Map":return[q6,l5];case"Set":return[Y6,l5];case"DataView":return[g5,Q]}if(Q.includes("Array"))return[g5,Q];if(Q.includes("Error"))return[x6,Q];return[u5,Q]},k6=([Z,K])=>Z===p5&&(K==="function"||K==="symbol"),f2=(Z,K,Q,J)=>{let X=(W,G)=>{let q=J.push(W)-1;return Q.set(G,q),q},H=(W)=>{if(Q.has(W))return Q.get(W);let[G,q]=$6(W);switch(G){case p5:{let D=W;switch(q){case"bigint":G=h6,D=W.toString();break;case"function":case"symbol":if(Z)throw TypeError("unable to serialize "+q);D=null;break;case"undefined":return X([y6],W)}return X([G,D],W)}case g5:{if(q){let _=W;if(q==="DataView")_=new Uint8Array(W.buffer);else if(q==="ArrayBuffer")_=new Uint8Array(W);return X([q,[..._]],W)}let D=[],N=X([G,D],W);for(let _ of W)D.push(H(_));return N}case u5:{if(q)switch(q){case"BigInt":return X([q,W.toString()],W);case"Boolean":case"Number":case"String":return X([q,W.valueOf()],W)}if(K&&"toJSON"in W)return H(W.toJSON());let D=[],N=X([G,D],W);for(let _ of l2(W))if(Z||!k6($6(W[_])))D.push([H(_),H(W[_])]);return N}case G6:return X([G,W.toISOString()],W);case D6:{let{source:D,flags:N}=W;return X([G,{source:D,flags:N}],W)}case q6:{let D=[],N=X([G,D],W);for(let[_,Y]of W)if(Z||!(k6($6(_))||k6($6(Y))))D.push([H(_),H(Y)]);return N}case Y6:{let D=[],N=X([G,D],W);for(let _ of W)if(Z||!k6($6(_)))D.push(H(_));return N}}let{message:$}=W;return X([G,{name:q,message:$}],W)};return H},y7=(Z,{json:K,lossy:Q}={})=>{let J=[];return f2(!(K||Q),!!K,new Map,J)(Z),J};var f5=typeof structuredClone==="function"?(Z,K)=>K&&(("json"in K)||("lossy"in K))?g7(y7(Z,K)):structuredClone(Z):(Z,K)=>g7(y7(Z,K));function i2(Z,K){let Q=[{type:"text",value:"↩"}];if(K>1)Q.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(K)}]});return Q}function r2(Z,K){return"Back to reference "+(Z+1)+(K>1?"-"+K:"")}function H4(Z){let K=typeof Z.options.clobberPrefix==="string"?Z.options.clobberPrefix:"user-content-",Q=Z.options.footnoteBackContent||i2,J=Z.options.footnoteBackLabel||r2,X=Z.options.footnoteLabel||"Footnotes",H=Z.options.footnoteLabelTagName||"h2",W=Z.options.footnoteLabelProperties||{className:["sr-only"]},G=[],q=-1;while(++q<Z.footnoteOrder.length){let $=Z.footnoteById.get(Z.footnoteOrder[q]);if(!$)continue;let D=Z.all($),N=String($.identifier).toUpperCase(),_=G5(N.toLowerCase()),Y=0,F=[],R=Z.footnoteCounts.get(N);while(R!==void 0&&++Y<=R){if(F.length>0)F.push({type:"text",value:" "});let g=typeof Q==="string"?Q:Q(q,Y);if(typeof g==="string")g={type:"text",value:g};F.push({type:"element",tagName:"a",properties:{href:"#"+K+"fnref-"+_+(Y>1?"-"+Y:""),dataFootnoteBackref:"",ariaLabel:typeof J==="string"?J:J(q,Y),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}let O=D[D.length-1];if(O&&O.type==="element"&&O.tagName==="p"){let g=O.children[O.children.length-1];if(g&&g.type==="text")g.value+=" ";else O.children.push({type:"text",value:" "});O.children.push(...F)}else D.push(...F);let j={type:"element",tagName:"li",properties:{id:K+"fn-"+_},children:Z.wrap(D,!0)};Z.patch($,j),G.push(j)}if(G.length===0)return;return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:H,properties:{...f5(W),id:"footnote-label"},children:[{type:"text",value:X}]},{type:"text",value:`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Zf as k}from"./chunk-7pfjfrjg.js";import{jg as L}from"./chunk-4181tdds.js";import{ng as c}from"./chunk-62zx96pe.js";import{kh as F}from"./chunk-77m5p188.js";import{Jh as u}from"./chunk-07h4b77v.js";import{Gi as A,Si as O,Ui as C,Vi as S,Xi as E,Yi as b,xi as v}from"./chunk-h0fxysxs.js";import{El as B,aj as l,cj as G,dj as J,um as K}from"./chunk-yp9hvkc5.js";import{sn as d}from"./chunk-dxyq9h8n.js";var y=d(l(),1);var w=(H)=>{return H.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")};function e({sessionId:H,open:M,onOpenChange:p}){let{data:h,isLoading:g}=v({queryKey:["agent-sessions",H,"entries"],queryFn:async()=>{if(!H)return[];let V=await A.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:H}});if(!V.ok)throw Error("Failed to fetch session logs");return await V.json()},enabled:M&&!!H});return G(O,{open:M,onOpenChange:p,children:J(C,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[J(S,{className:"pb-4 border-b border-foreground/15",children:[J(E,{className:"flex items-center gap-2 text-xl font-bold",children:[G(B,{className:"w-5 h-5 text-violet-500"}),K.agent_session_logs()]}),G(b,{children:K.agent_logs_description()})]}),G("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:g?J("div",{className:"space-y-4",children:[J("div",{className:"flex gap-4",children:[G(F,{className:"h-5 w-5 rounded-full shrink-0"}),J("div",{className:"flex-1 space-y-2",children:[G(F,{className:"h-4 w-1/4"}),G(F,{className:"h-20 w-full"})]})]}),J("div",{className:"flex gap-4",children:[G(F,{className:"h-5 w-5 rounded-full shrink-0"}),J("div",{className:"flex-1 space-y-2",children:[G(F,{className:"h-4 w-1/4"}),G(F,{className:"h-12 w-full"})]})]})]}):h&&h.length>0?G("div",{className:"flex flex-col",children:h.map((V)=>{let W=V.entry,f=W?.timestamp||V.timestamp,X="";if(typeof f==="string"||typeof f==="number"){let P=new Date(f);if(!isNaN(P.getTime()))X=u(P.toISOString())}if(W&&typeof W==="object"){if(W.type==="custom_message"){if(W.customType==="context")return null;if(W.customType==="shumai_message"){let P=k(W.details),q=typeof W.content==="string"?W.content:"",z=P?`${q}
|
|
2
|
+
|
|
3
|
+
${P}`.trim():q,N="bg-primary/10 text-primary",D=K.role_user();return J("div",{className:"relative pl-6 pb-6 last:pb-0",children:[G("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),G("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center bg-primary"}),J("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[J("div",{className:"flex items-center justify-between gap-2",children:[J("div",{className:"flex items-center gap-2 flex-wrap",children:[G("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider bg-primary/10 text-primary",children:D}),J("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:K.entry_id(),children:[K.entry_id(),": ",V.id]})]}),G("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:X})]}),G("div",{className:"text-xs text-foreground/90 whitespace-pre-wrap leading-relaxed font-sans",children:z})]})]},V.id)}}if(W.type==="message"&&W.message){let P=W.message,q="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",z=String(P.role||"");if(P.role==="user")q="bg-primary/10 text-primary",z=K.role_user();else if(P.role==="assistant")q="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",z=K.role_agent();else if(P.role==="toolResult")q=P.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",z=K.tool_result_with_name({name:String(P.toolName||K.unknown())});else if(P.role==="thought")q="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",z=K.role_thinking();let N=(Y)=>{let U=Y;if(typeof Y==="string")try{U=JSON.parse(Y)}catch{}if(U&&typeof U==="object"&&!Array.isArray(U))return G("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(U).map(([Z,_])=>{let Q=_&&typeof _==="object"?JSON.stringify(_,null,2):String(_);return J("div",{className:"text-xs leading-relaxed break-words",children:[J("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[Z,":"]})," ",G("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:Q})]},Z)})});return G("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(Y)})},D=()=>{let Y=P.content;if(!Y)return null;if(typeof Y==="string"){if(!Y.trim())return null;return G("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:G(L,{children:w(Y)})})}if(Array.isArray(Y)){let U=[];if(Y.forEach(($,Z)=>{if(!$)return;if(typeof $==="string"){if(!$.trim())return;U.push(G("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:G(L,{children:w($)})},`str-${Z}`));return}if(typeof $==="object"){let _=$,Q=_.type;if(Q==="text"){let R=_.text;if(typeof R!=="string"||!R.trim())return;U.push(G("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:G(L,{children:w(R)})},`txt-${Z}`));return}if(Q==="toolCall"){let R=String(_.name||_.toolName||K.unknown()),I=_.arguments||_.args;U.push(J("div",{className:"text-xs space-y-2 py-1",children:[J("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[K.calling_tool()," ",G("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:R})]}),!!I&&J("div",{className:"space-y-1 pt-3",children:[G("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:K.tool_arguments()}),N(I)]})]},`tool-${Z}`));return}if(Q==="image"){U.push(G("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:K.image_object()},`img-${Z}`));return}let T=JSON.stringify($,null,2);if(T==="{}")return;U.push(G("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:T},`other-${Z}`))}}),U.length===0)return null;return G("div",{className:"space-y-3 w-full",children:U.map(($,Z)=>J(y.default.Fragment,{children:[Z>0&&G(c,{className:"my-3 opacity-50"}),$]},Z))})}return null};return J("div",{className:"relative pl-6 pb-6 last:pb-0",children:[G("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),G("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${P.role==="user"?"bg-primary":P.role==="assistant"?"bg-violet-500":P.role==="toolResult"?P.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),J("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[J("div",{className:"flex items-center justify-between gap-2",children:[J("div",{className:"flex items-center gap-2 flex-wrap",children:[G("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${q}`,children:z}),J("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:K.entry_id(),children:[K.entry_id(),": ",V.id]})]}),G("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:X})]}),D()]})]},V.id)}}return J("div",{className:"relative pl-6 pb-6 last:pb-0",children:[G("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),G("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),J("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[J("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[J("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",V.id]}),G("div",{className:"text-[10px] text-muted-foreground/60",children:X})]}),G("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(V.entry,null,2)})]})]},V.id)})}):J("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[G(B,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),G("p",{className:"text-sm font-medium",children:K.no_logs_found()}),G("p",{className:"text-xs text-muted-foreground/60 mt-1",children:K.session_no_entries_yet()})]})})]})})}
|
|
4
|
+
export{e as T};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{B as
|
|
1
|
+
import{pg as A}from"./chunk-63y0eb07.js";import{Gi as z}from"./chunk-h0fxysxs.js";import{cj as v,mj as w}from"./chunk-yp9hvkc5.js";var B=(b)=>({queryKey:["projects",b],queryFn:async()=>{let h=await z.api.projects[":projectId"].$get({param:{projectId:b}});if(!h.ok)throw Error("Failed to fetch project");return await h.json()}}),H=w("/projects/$projectId/folders/$folderId")({loader:({context:{queryClient:b},params:{projectId:h}})=>b.ensureQueryData(B(h)),pendingComponent:()=>v(A,{})});
|
|
2
|
+
export{B as ne,H as oe};
|