fluxy-bot 0.8.1 → 0.8.3
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/dist-fluxy/assets/{fluxy-SlJSOG0e.js → fluxy-C7pmHG9i.js} +1 -1
- package/dist-fluxy/assets/{globals-9_9HQM0-.js → globals-CP6y1O_V.js} +7 -7
- package/dist-fluxy/assets/globals-wnYSfEuA.css +1 -0
- package/dist-fluxy/assets/{onboard-DDxHz_AS.js → onboard-CrwD-dFw.js} +1 -1
- package/dist-fluxy/fluxy.html +3 -3
- package/dist-fluxy/onboard.html +3 -3
- package/package.json +4 -2
- package/supervisor/chat/OnboardWizard.tsx +64 -39
- package/supervisor/index.ts +6 -22
- package/worker/prompts/fluxy-system-prompt.txt +3 -3
- package/workspace/client/public/fluxy.svg +56 -0
- package/dist-fluxy/assets/globals-IRsJSQtJ.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as fe,r as C,j as h,A as Ht,m as Je,L as bl,a as hl,S as Yc,C as Eu,b as yu,g as Su,R as Ue,d as Kc,M as El,e as Xc,O as Zc}from"./globals-9_9HQM0-.js";const Qc=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],Jc=fe("bell-off",Qc);const ed=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],td=fe("bell-ring",ed);const nd=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],rd=fe("bell",nd);const ad=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],id=fe("camera",ad);const od=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sd=fe("chevron-left",od);const ld=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ud=fe("chevron-right",ld);const cd=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],dd=fe("download",cd);const pd=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],gd=fe("ellipsis-vertical",pd);const fd=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],md=fe("lock",fd);const bd=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Cn=fe("paperclip",bd);const hd=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Ed=fe("pause",hd);const yd=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Sd=fe("play",yd);const wd=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],kd=fe("send-horizontal",wd);const Td=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],Ad=fe("share",Td);const _d=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Id=fe("square",_d);const Nd=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],wu=fe("trash-2",Nd);const xd=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Rd=fe("wand-sparkles",xd);const vd=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yn=fe("x",vd);class Kn{ws=null;handlers=new Map;statusHandlers=new Set;reconnectTimer=null;heartbeatTimer=null;url;queue=[];intentionalClose=!1;reconnectDelay=1e3;static MAX_RECONNECT_DELAY=8e3;tokenGetter=null;constructor(t,n){const r=location.protocol==="https:"?"wss:":"ws:",a=location.host;this.url=t??`${r}//${a}/ws`,this.tokenGetter=n??null}connect(){this.intentionalClose=!1;let t=this.url;if(this.tokenGetter){const n=this.tokenGetter();if(n){const r=t.includes("?")?"&":"?";t=`${t}${r}token=${n}`}}this.ws=new WebSocket(t),this.ws.onopen=()=>{this.reconnectDelay=1e3,this.notifyStatus(!0),this.flushQueue(),this.startHeartbeat()},this.ws.onmessage=n=>{if(n.data==="pong")return;const r=JSON.parse(n.data);this.handlers.get(r.type)?.forEach(i=>i(r.data))},this.ws.onclose=()=>{this.stopHeartbeat(),this.notifyStatus(!1),this.intentionalClose||(this.reconnectTimer=setTimeout(()=>{this.reconnectDelay=Math.min(this.reconnectDelay*2,Kn.MAX_RECONNECT_DELAY),this.connect()},this.reconnectDelay))},this.ws.onerror=()=>this.ws?.close()}disconnect(){this.intentionalClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopHeartbeat(),this.ws?.close(),this.ws=null}on(t,n){return this.handlers.has(t)||this.handlers.set(t,new Set),this.handlers.get(t).add(n),()=>this.handlers.get(t)?.delete(n)}onStatus(t){return this.statusHandlers.add(t),()=>this.statusHandlers.delete(t)}send(t,n){const r={type:t,data:n};this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(r)):this.queue.push(r)}get connected(){return this.ws?.readyState===WebSocket.OPEN}flushQueue(){for(;this.queue.length>0&&this.ws?.readyState===WebSocket.OPEN;){const t=this.queue.shift();this.ws.send(JSON.stringify(t))}}notifyStatus(t){this.statusHandlers.forEach(n=>n(t))}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send("ping")},25e3)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}}const Xn="fluxy_token";let ku=null;function On(){return localStorage.getItem(Xn)}function Cd(e){localStorage.setItem(Xn,e)}function Tu(){localStorage.removeItem(Xn)}function Od(e){ku=e}async function He(e,t={}){const n=On(),r=new Headers(t.headers);n&&r.set("Authorization",`Bearer ${n}`);const a=await fetch(e,{...t,headers:r});return a.status===401&&n&&(Tu(),ku?.()),a}function Ld(e,t,n=!0){const[r,a]=C.useState([]),[i,o]=C.useState(null),[s,l]=C.useState(!1),[u,d]=C.useState(""),[c,g]=C.useState([]),[p,m]=C.useState(!1),k=C.useRef(!1),w=C.useRef(null),y=C.useRef(!1),A=C.useRef(!1);C.useEffect(()=>{w.current=i},[i]),C.useEffect(()=>{y.current=s},[s]);const _=C.useCallback(L=>{let b;L.audio_data&&(L.audio_data.startsWith("data:")?b=L.audio_data:L.audio_data.includes("/")?b=`/api/files/${L.audio_data}`:b=`data:audio/webm;base64,${L.audio_data}`);let I;if(L.attachments)try{I=JSON.parse(L.attachments)}catch{}return{id:L.id,role:L.role,content:L.content,timestamp:L.created_at,audioData:b,hasAttachments:!!(I&&I.length>0),attachments:I}},[]),N=C.useCallback(async()=>{try{const L=await He("/api/context/current").then(O=>O.json());if(!L.conversationId)return;o(L.conversationId);const b=20,I=await He(`/api/conversations/${L.conversationId}/messages?limit=${b}`);if(!I.ok)return;const v=await I.json();if(!v?.length)return;const M=v.filter(O=>O.role==="user"||O.role==="assistant");a(M.map(_)),m(v.length>=b)}catch{}},[_]),R=C.useCallback(async()=>{if(!(A.current||!w.current)){A.current=!0;try{const L=r[0]?.id;if(!L)return;const b=20,I=await He(`/api/conversations/${w.current}/messages?before=${L}&limit=${b}`);if(!I.ok)return;const v=await I.json();if(!v?.length){m(!1);return}const M=v.filter(O=>O.role==="user"||O.role==="assistant").map(_);a(O=>[...M,...O]),v.length<b&&m(!1)}catch{}finally{A.current=!1}}},[r,_]);C.useEffect(()=>{!n||k.current||(k.current=!0,N())},[n,N]),C.useEffect(()=>{n&&t&&t>0&&N()},[n,t,N]),C.useEffect(()=>{if(!n||!t||t===0||!s)return;const L=setInterval(()=>{if(!y.current){clearInterval(L);return}N()},3e3);return()=>clearInterval(L)},[n,t,s,N]),C.useEffect(()=>{if(!e)return;const L=[e.on("bot:typing",()=>{l(!0),g([])}),e.on("bot:token",b=>{d(I=>I+b.token)}),e.on("bot:tool",b=>{g(I=>I.find(M=>M.name===b.name&&M.status==="running")?I:[...I,{name:b.name,status:"running"}])}),e.on("bot:response",b=>{o(b.conversationId),a(I=>[...I,{id:b.messageId||Date.now().toString(),role:"assistant",content:b.content,timestamp:new Date().toISOString()}]),d(""),l(!1),g([])}),e.on("bot:error",b=>{d(""),l(!1),g([]),a(I=>[...I,{id:Date.now().toString(),role:"assistant",content:`Error: ${b.error}`,timestamp:new Date().toISOString()}])}),e.on("chat:sync",b=>{w.current&&b.conversationId!==w.current||a(I=>[...I,{id:Date.now().toString(),role:b.message.role,content:b.message.content,timestamp:b.message.timestamp}])}),e.on("chat:conversation-created",b=>{o(b.conversationId)}),e.on("chat:state",b=>{b.streaming&&(l(!0),b.conversationId&&o(b.conversationId),b.buffer&&d(b.buffer))}),e.on("chat:cleared",()=>{a([]),o(null),d(""),l(!1),g([]),k.current=!1})];return()=>L.forEach(b=>b())},[e]);const T=C.useCallback((L,b,I)=>{if(!e||!L.trim()&&(!b||b.length===0))return;const v={id:Date.now().toString(),role:"user",content:L,timestamp:new Date().toISOString(),hasAttachments:!!(b&&b.length>0),audioData:I?I.startsWith("data:")?I:`data:audio/webm;base64,${I}`:void 0};a(O=>[...O,v]);const M={conversationId:i,content:L};I&&(M.audioData=I.includes(",")?I.split(",")[1]:I),b?.length&&(M.attachments=b.map(O=>{const D=O.preview.match(/^data:([^;]+);base64,(.+)$/);return{type:O.type,name:O.name,mediaType:D?.[1]||"application/octet-stream",data:D?.[2]||""}})),e.send("user:message",M)},[e,i]),F=C.useCallback(()=>{e&&(e.send("user:stop",{conversationId:i}),l(!1),d(""),g([]))},[e,i]),B=C.useCallback(()=>{e&&e.send("user:clear-context",{}),a([]),o(null),d(""),l(!1),g([]),k.current=!1},[e]);return{messages:r,streaming:s,streamBuffer:u,conversationId:i,tools:c,hasMore:p,loadOlder:R,sendMessage:T,stopStreaming:F,clearContext:B}}const Mt="fluxy_login_totp";function Dd({onLogin:e,totpEnabled:t}){const[n,r]=C.useState(""),[a,i]=C.useState(""),[o,s]=C.useState(!1),[l,u]=C.useState("password"),[d,c]=C.useState(""),[g,p]=C.useState(""),[m,k]=C.useState(!0),[w,y]=C.useState(!1),A=C.useRef(null);C.useEffect(()=>{try{const b=sessionStorage.getItem(Mt);if(!b)return;const I=JSON.parse(b);I.pendingToken&&I.expiresAt>Date.now()?(p(I.pendingToken),u("totp")):sessionStorage.removeItem(Mt)}catch{}},[]),C.useEffect(()=>{l==="totp"&&setTimeout(()=>A.current?.focus(),100)},[l]);function _(b){try{sessionStorage.setItem(Mt,JSON.stringify({pendingToken:b,expiresAt:Date.now()+4.5*60*1e3}))}catch{}}function N(){try{sessionStorage.removeItem(Mt)}catch{}}const R=async()=>{if(!(!n.trim()||o)){s(!0),i("");try{const b=btoa(`admin:${n}`),I=await fetch("/api/portal/login",{headers:{Authorization:`Basic ${b}`},credentials:"include"}),v=await I.json();I.ok&&v.token?(N(),e(v.token)):I.ok&&v.requiresTOTP?(p(v.pendingToken),_(v.pendingToken),u("totp"),i("")):i(v.error||"Invalid password")}catch{i("Could not reach server")}finally{s(!1)}}},T=async()=>{if(!(!d.trim()||o)){s(!0),i("");try{const b=await fetch(`/api/portal/login/totp?pending=${encodeURIComponent(g)}&code=${encodeURIComponent(d)}&trust=${m?"1":"0"}`,{credentials:"include"}),I=await b.json();b.ok&&I.token?(N(),e(I.token)):i(I.error||"Invalid code")}catch{i("Could not reach server")}finally{s(!1)}}},F=b=>{b.key==="Enter"&&(l==="password"?R():T())},B=()=>{u("password"),i(""),c(""),y(!1),N()},L="w-full bg-white/[0.05] border border-white/[0.08] text-white rounded-xl px-4 py-3 text-base outline-none input-glow placeholder:text-white/20 transition-all";return h.jsx("div",{className:"flex flex-col items-center justify-center h-dvh px-6",children:h.jsx("div",{className:"w-full max-w-[320px] flex flex-col items-center",children:h.jsx(Ht,{mode:"wait",children:l==="password"?h.jsxs(Je.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"w-full flex flex-col items-center",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-white/[0.04] border border-white/[0.08] flex items-center justify-center mb-5",children:h.jsx(md,{className:"h-6 w-6 text-white/40"})}),h.jsx("h1",{className:"text-xl font-bold text-white tracking-tight mb-1",children:"Welcome back"}),h.jsx("p",{className:"text-white/40 text-[13px] mb-6",children:"Enter your password to continue."}),a&&h.jsx("div",{className:"w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4",children:h.jsx("p",{className:"text-red-400/90 text-[12px]",children:a})}),h.jsx("input",{type:"password",value:n,onChange:b=>r(b.target.value),onKeyDown:F,placeholder:"Password",autoFocus:!0,autoComplete:"current-password",className:L}),h.jsx("button",{onClick:R,disabled:!n.trim()||o,className:"w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40",children:o?h.jsxs(h.Fragment,{children:[h.jsx(bl,{className:"h-4 w-4 animate-spin"}),"Signing in..."]}):h.jsxs(h.Fragment,{children:["Sign In",h.jsx(hl,{className:"h-4 w-4"})]})})]},"password"):h.jsxs(Je.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},className:"w-full flex flex-col items-center",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#AF27E3]/10 border border-[#AF27E3]/20 flex items-center justify-center mb-5",children:h.jsx(Yc,{className:"h-6 w-6 text-[#AF27E3]"})}),h.jsx("h1",{className:"text-xl font-bold text-white tracking-tight mb-1",children:w?"Recovery code":"Enter your 2FA code"}),h.jsx("p",{className:"text-white/40 text-[13px] mb-6",children:w?"Enter one of your recovery codes.":"Open your authenticator app and enter the 6-digit code."}),a&&h.jsx("div",{className:"w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4",children:h.jsx("p",{className:"text-red-400/90 text-[12px]",children:a})}),h.jsx("input",{ref:A,type:"text",inputMode:w?"text":"numeric",autoComplete:"one-time-code",maxLength:w?20:6,value:d,onChange:b=>{c(w?b.target.value:b.target.value.replace(/\D/g,"")),i("")},onKeyDown:F,placeholder:w?"Recovery code":"000000",autoFocus:!0,className:L+(w?"":" tracking-[0.3em] text-center font-mono")}),h.jsxs("label",{className:"flex items-center gap-2.5 mt-4 w-full cursor-pointer",children:[h.jsx("div",{onClick:()=>k(b=>!b),className:`w-5 h-5 rounded-md border flex items-center justify-center transition-all ${m?"bg-[#AF27E3] border-[#AF27E3]":"bg-white/[0.04] border-white/[0.12]"}`,children:m&&h.jsx(Eu,{className:"h-3.5 w-3.5 text-white"})}),h.jsx("span",{className:"text-[13px] text-white/50",children:"Trust this device for 90 days"})]}),h.jsx("button",{onClick:T,disabled:!d.trim()||o,className:"w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40",children:o?h.jsxs(h.Fragment,{children:[h.jsx(bl,{className:"h-4 w-4 animate-spin"}),"Verifying..."]}):h.jsxs(h.Fragment,{children:["Verify",h.jsx(hl,{className:"h-4 w-4"})]})}),h.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[h.jsxs("button",{onClick:B,className:"text-[12px] text-white/30 hover:text-white/50 flex items-center gap-1 transition-colors",children:[h.jsx(yu,{className:"h-3 w-3"}),"Back"]}),h.jsx("button",{onClick:()=>{y(b=>!b),c(""),i("")},className:"text-[12px] text-white/30 hover:text-white/50 transition-colors",children:w?"Use authenticator code":"Use a recovery code"})]})]},"totp")})})})}function yl(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function Md(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ud=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bd={};function Sl(e,t){return(Bd.jsx?Ud:Fd).test(e)}const Pd=/[ \t\n\f\r]/g;function $d(e){return typeof e=="object"?e.type==="text"?wl(e.value):!1:wl(e)}function wl(e){return e.replace(Pd,"")===""}class _t{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_t.prototype.normal={};_t.prototype.property={};_t.prototype.space=void 0;function Au(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new _t(n,r,t)}function St(e){return e.toLowerCase()}class ke{constructor(t,n){this.attribute=n,this.property=t}}ke.prototype.attribute="";ke.prototype.booleanish=!1;ke.prototype.boolean=!1;ke.prototype.commaOrSpaceSeparated=!1;ke.prototype.commaSeparated=!1;ke.prototype.defined=!1;ke.prototype.mustUseProperty=!1;ke.prototype.number=!1;ke.prototype.overloadedBoolean=!1;ke.prototype.property="";ke.prototype.spaceSeparated=!1;ke.prototype.space=void 0;let zd=0;const q=We(),ce=We(),Ln=We(),U=We(),le=We(),et=We(),Ae=We();function We(){return 2**++zd}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:q,booleanish:ce,commaOrSpaceSeparated:Ae,commaSeparated:et,number:U,overloadedBoolean:Ln,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),dn=Object.keys(Dn);class Zn extends ke{constructor(t,n,r,a){let i=-1;if(super(t,n),kl(this,"space",a),typeof r=="number")for(;++i<dn.length;){const o=dn[i];kl(this,dn[i],(r&Dn[o])===Dn[o])}}}Zn.prototype.defined=!0;function kl(e,t,n){n&&(e[t]=n)}function nt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Zn(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[St(r)]=r,n[St(i.attribute)]=r}return new _t(t,n,e.space)}const _u=nt({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:le,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:U,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:le,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:ce,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Iu(e,t){return t in e?e[t]:t}function Nu(e,t){return Iu(e,t.toLowerCase())}const Gd=nt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:et,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:le,autoFocus:q,autoPlay:q,blocking:le,capture:null,charSet:null,checked:q,cite:null,className:le,cols:U,colSpan:null,content:null,contentEditable:ce,controls:q,controlsList:le,coords:U|et,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Ln,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:le,height:U,hidden:Ln,high:U,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:le,itemRef:le,itemScope:q,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:U,pattern:null,ping:le,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:le,required:q,reversed:q,rows:U,rowSpan:U,sandbox:le,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:ce,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Nu}),jd=nt({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",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:Ae,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:le,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:et,g2:et,glyphName:et,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:Ae,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ae,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ae,rev:Ae,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ae,requiredFeatures:Ae,requiredFonts:Ae,requiredFormats:Ae,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:Ae,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ae,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ae,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Iu}),xu=nt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ru=nt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nu}),vu=nt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hd={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"},Vd=/[A-Z]/g,Tl=/-[a-z]/g,Wd=/^data[-\w.:]+$/i;function Cu(e,t){const n=St(t);let r=t,a=ke;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Wd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Tl,Yd);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Tl.test(i)){let o=i.replace(Vd,qd);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Zn}return new a(r,t)}function qd(e){return"-"+e.toLowerCase()}function Yd(e){return e.charAt(1).toUpperCase()}const Ou=Au([_u,Gd,xu,Ru,vu],"html"),Kt=Au([_u,jd,xu,Ru,vu],"svg");function Al(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Kd(e){return e.join(" ").trim()}var Ke={},pn,_l;function Xd(){if(_l)return pn;_l=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
1
|
+
import{c as fe,r as C,j as h,A as Ht,m as Je,L as bl,a as hl,S as Yc,C as Eu,b as yu,g as Su,R as Ue,d as Kc,M as El,e as Xc,O as Zc}from"./globals-CP6y1O_V.js";const Qc=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],Jc=fe("bell-off",Qc);const ed=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],td=fe("bell-ring",ed);const nd=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],rd=fe("bell",nd);const ad=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],id=fe("camera",ad);const od=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sd=fe("chevron-left",od);const ld=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ud=fe("chevron-right",ld);const cd=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],dd=fe("download",cd);const pd=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],gd=fe("ellipsis-vertical",pd);const fd=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],md=fe("lock",fd);const bd=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Cn=fe("paperclip",bd);const hd=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Ed=fe("pause",hd);const yd=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Sd=fe("play",yd);const wd=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],kd=fe("send-horizontal",wd);const Td=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],Ad=fe("share",Td);const _d=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Id=fe("square",_d);const Nd=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],wu=fe("trash-2",Nd);const xd=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Rd=fe("wand-sparkles",xd);const vd=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Yn=fe("x",vd);class Kn{ws=null;handlers=new Map;statusHandlers=new Set;reconnectTimer=null;heartbeatTimer=null;url;queue=[];intentionalClose=!1;reconnectDelay=1e3;static MAX_RECONNECT_DELAY=8e3;tokenGetter=null;constructor(t,n){const r=location.protocol==="https:"?"wss:":"ws:",a=location.host;this.url=t??`${r}//${a}/ws`,this.tokenGetter=n??null}connect(){this.intentionalClose=!1;let t=this.url;if(this.tokenGetter){const n=this.tokenGetter();if(n){const r=t.includes("?")?"&":"?";t=`${t}${r}token=${n}`}}this.ws=new WebSocket(t),this.ws.onopen=()=>{this.reconnectDelay=1e3,this.notifyStatus(!0),this.flushQueue(),this.startHeartbeat()},this.ws.onmessage=n=>{if(n.data==="pong")return;const r=JSON.parse(n.data);this.handlers.get(r.type)?.forEach(i=>i(r.data))},this.ws.onclose=()=>{this.stopHeartbeat(),this.notifyStatus(!1),this.intentionalClose||(this.reconnectTimer=setTimeout(()=>{this.reconnectDelay=Math.min(this.reconnectDelay*2,Kn.MAX_RECONNECT_DELAY),this.connect()},this.reconnectDelay))},this.ws.onerror=()=>this.ws?.close()}disconnect(){this.intentionalClose=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopHeartbeat(),this.ws?.close(),this.ws=null}on(t,n){return this.handlers.has(t)||this.handlers.set(t,new Set),this.handlers.get(t).add(n),()=>this.handlers.get(t)?.delete(n)}onStatus(t){return this.statusHandlers.add(t),()=>this.statusHandlers.delete(t)}send(t,n){const r={type:t,data:n};this.ws?.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(r)):this.queue.push(r)}get connected(){return this.ws?.readyState===WebSocket.OPEN}flushQueue(){for(;this.queue.length>0&&this.ws?.readyState===WebSocket.OPEN;){const t=this.queue.shift();this.ws.send(JSON.stringify(t))}}notifyStatus(t){this.statusHandlers.forEach(n=>n(t))}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send("ping")},25e3)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}}const Xn="fluxy_token";let ku=null;function On(){return localStorage.getItem(Xn)}function Cd(e){localStorage.setItem(Xn,e)}function Tu(){localStorage.removeItem(Xn)}function Od(e){ku=e}async function He(e,t={}){const n=On(),r=new Headers(t.headers);n&&r.set("Authorization",`Bearer ${n}`);const a=await fetch(e,{...t,headers:r});return a.status===401&&n&&(Tu(),ku?.()),a}function Ld(e,t,n=!0){const[r,a]=C.useState([]),[i,o]=C.useState(null),[s,l]=C.useState(!1),[u,d]=C.useState(""),[c,g]=C.useState([]),[p,m]=C.useState(!1),k=C.useRef(!1),w=C.useRef(null),y=C.useRef(!1),A=C.useRef(!1);C.useEffect(()=>{w.current=i},[i]),C.useEffect(()=>{y.current=s},[s]);const _=C.useCallback(L=>{let b;L.audio_data&&(L.audio_data.startsWith("data:")?b=L.audio_data:L.audio_data.includes("/")?b=`/api/files/${L.audio_data}`:b=`data:audio/webm;base64,${L.audio_data}`);let I;if(L.attachments)try{I=JSON.parse(L.attachments)}catch{}return{id:L.id,role:L.role,content:L.content,timestamp:L.created_at,audioData:b,hasAttachments:!!(I&&I.length>0),attachments:I}},[]),N=C.useCallback(async()=>{try{const L=await He("/api/context/current").then(O=>O.json());if(!L.conversationId)return;o(L.conversationId);const b=20,I=await He(`/api/conversations/${L.conversationId}/messages?limit=${b}`);if(!I.ok)return;const v=await I.json();if(!v?.length)return;const M=v.filter(O=>O.role==="user"||O.role==="assistant");a(M.map(_)),m(v.length>=b)}catch{}},[_]),R=C.useCallback(async()=>{if(!(A.current||!w.current)){A.current=!0;try{const L=r[0]?.id;if(!L)return;const b=20,I=await He(`/api/conversations/${w.current}/messages?before=${L}&limit=${b}`);if(!I.ok)return;const v=await I.json();if(!v?.length){m(!1);return}const M=v.filter(O=>O.role==="user"||O.role==="assistant").map(_);a(O=>[...M,...O]),v.length<b&&m(!1)}catch{}finally{A.current=!1}}},[r,_]);C.useEffect(()=>{!n||k.current||(k.current=!0,N())},[n,N]),C.useEffect(()=>{n&&t&&t>0&&N()},[n,t,N]),C.useEffect(()=>{if(!n||!t||t===0||!s)return;const L=setInterval(()=>{if(!y.current){clearInterval(L);return}N()},3e3);return()=>clearInterval(L)},[n,t,s,N]),C.useEffect(()=>{if(!e)return;const L=[e.on("bot:typing",()=>{l(!0),g([])}),e.on("bot:token",b=>{d(I=>I+b.token)}),e.on("bot:tool",b=>{g(I=>I.find(M=>M.name===b.name&&M.status==="running")?I:[...I,{name:b.name,status:"running"}])}),e.on("bot:response",b=>{o(b.conversationId),a(I=>[...I,{id:b.messageId||Date.now().toString(),role:"assistant",content:b.content,timestamp:new Date().toISOString()}]),d(""),l(!1),g([])}),e.on("bot:error",b=>{d(""),l(!1),g([]),a(I=>[...I,{id:Date.now().toString(),role:"assistant",content:`Error: ${b.error}`,timestamp:new Date().toISOString()}])}),e.on("chat:sync",b=>{w.current&&b.conversationId!==w.current||a(I=>[...I,{id:Date.now().toString(),role:b.message.role,content:b.message.content,timestamp:b.message.timestamp}])}),e.on("chat:conversation-created",b=>{o(b.conversationId)}),e.on("chat:state",b=>{b.streaming&&(l(!0),b.conversationId&&o(b.conversationId),b.buffer&&d(b.buffer))}),e.on("chat:cleared",()=>{a([]),o(null),d(""),l(!1),g([]),k.current=!1})];return()=>L.forEach(b=>b())},[e]);const T=C.useCallback((L,b,I)=>{if(!e||!L.trim()&&(!b||b.length===0))return;const v={id:Date.now().toString(),role:"user",content:L,timestamp:new Date().toISOString(),hasAttachments:!!(b&&b.length>0),audioData:I?I.startsWith("data:")?I:`data:audio/webm;base64,${I}`:void 0};a(O=>[...O,v]);const M={conversationId:i,content:L};I&&(M.audioData=I.includes(",")?I.split(",")[1]:I),b?.length&&(M.attachments=b.map(O=>{const D=O.preview.match(/^data:([^;]+);base64,(.+)$/);return{type:O.type,name:O.name,mediaType:D?.[1]||"application/octet-stream",data:D?.[2]||""}})),e.send("user:message",M)},[e,i]),F=C.useCallback(()=>{e&&(e.send("user:stop",{conversationId:i}),l(!1),d(""),g([]))},[e,i]),B=C.useCallback(()=>{e&&e.send("user:clear-context",{}),a([]),o(null),d(""),l(!1),g([]),k.current=!1},[e]);return{messages:r,streaming:s,streamBuffer:u,conversationId:i,tools:c,hasMore:p,loadOlder:R,sendMessage:T,stopStreaming:F,clearContext:B}}const Mt="fluxy_login_totp";function Dd({onLogin:e,totpEnabled:t}){const[n,r]=C.useState(""),[a,i]=C.useState(""),[o,s]=C.useState(!1),[l,u]=C.useState("password"),[d,c]=C.useState(""),[g,p]=C.useState(""),[m,k]=C.useState(!0),[w,y]=C.useState(!1),A=C.useRef(null);C.useEffect(()=>{try{const b=sessionStorage.getItem(Mt);if(!b)return;const I=JSON.parse(b);I.pendingToken&&I.expiresAt>Date.now()?(p(I.pendingToken),u("totp")):sessionStorage.removeItem(Mt)}catch{}},[]),C.useEffect(()=>{l==="totp"&&setTimeout(()=>A.current?.focus(),100)},[l]);function _(b){try{sessionStorage.setItem(Mt,JSON.stringify({pendingToken:b,expiresAt:Date.now()+4.5*60*1e3}))}catch{}}function N(){try{sessionStorage.removeItem(Mt)}catch{}}const R=async()=>{if(!(!n.trim()||o)){s(!0),i("");try{const b=btoa(`admin:${n}`),I=await fetch("/api/portal/login",{headers:{Authorization:`Basic ${b}`},credentials:"include"}),v=await I.json();I.ok&&v.token?(N(),e(v.token)):I.ok&&v.requiresTOTP?(p(v.pendingToken),_(v.pendingToken),u("totp"),i("")):i(v.error||"Invalid password")}catch{i("Could not reach server")}finally{s(!1)}}},T=async()=>{if(!(!d.trim()||o)){s(!0),i("");try{const b=await fetch(`/api/portal/login/totp?pending=${encodeURIComponent(g)}&code=${encodeURIComponent(d)}&trust=${m?"1":"0"}`,{credentials:"include"}),I=await b.json();b.ok&&I.token?(N(),e(I.token)):i(I.error||"Invalid code")}catch{i("Could not reach server")}finally{s(!1)}}},F=b=>{b.key==="Enter"&&(l==="password"?R():T())},B=()=>{u("password"),i(""),c(""),y(!1),N()},L="w-full bg-white/[0.05] border border-white/[0.08] text-white rounded-xl px-4 py-3 text-base outline-none input-glow placeholder:text-white/20 transition-all";return h.jsx("div",{className:"flex flex-col items-center justify-center h-dvh px-6",children:h.jsx("div",{className:"w-full max-w-[320px] flex flex-col items-center",children:h.jsx(Ht,{mode:"wait",children:l==="password"?h.jsxs(Je.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"w-full flex flex-col items-center",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-white/[0.04] border border-white/[0.08] flex items-center justify-center mb-5",children:h.jsx(md,{className:"h-6 w-6 text-white/40"})}),h.jsx("h1",{className:"text-xl font-bold text-white tracking-tight mb-1",children:"Welcome back"}),h.jsx("p",{className:"text-white/40 text-[13px] mb-6",children:"Enter your password to continue."}),a&&h.jsx("div",{className:"w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4",children:h.jsx("p",{className:"text-red-400/90 text-[12px]",children:a})}),h.jsx("input",{type:"password",value:n,onChange:b=>r(b.target.value),onKeyDown:F,placeholder:"Password",autoFocus:!0,autoComplete:"current-password",className:L}),h.jsx("button",{onClick:R,disabled:!n.trim()||o,className:"w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40",children:o?h.jsxs(h.Fragment,{children:[h.jsx(bl,{className:"h-4 w-4 animate-spin"}),"Signing in..."]}):h.jsxs(h.Fragment,{children:["Sign In",h.jsx(hl,{className:"h-4 w-4"})]})})]},"password"):h.jsxs(Je.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},className:"w-full flex flex-col items-center",children:[h.jsx("div",{className:"w-14 h-14 rounded-2xl bg-[#AF27E3]/10 border border-[#AF27E3]/20 flex items-center justify-center mb-5",children:h.jsx(Yc,{className:"h-6 w-6 text-[#AF27E3]"})}),h.jsx("h1",{className:"text-xl font-bold text-white tracking-tight mb-1",children:w?"Recovery code":"Enter your 2FA code"}),h.jsx("p",{className:"text-white/40 text-[13px] mb-6",children:w?"Enter one of your recovery codes.":"Open your authenticator app and enter the 6-digit code."}),a&&h.jsx("div",{className:"w-full bg-red-500/8 border border-red-500/15 rounded-xl px-4 py-2.5 mb-4",children:h.jsx("p",{className:"text-red-400/90 text-[12px]",children:a})}),h.jsx("input",{ref:A,type:"text",inputMode:w?"text":"numeric",autoComplete:"one-time-code",maxLength:w?20:6,value:d,onChange:b=>{c(w?b.target.value:b.target.value.replace(/\D/g,"")),i("")},onKeyDown:F,placeholder:w?"Recovery code":"000000",autoFocus:!0,className:L+(w?"":" tracking-[0.3em] text-center font-mono")}),h.jsxs("label",{className:"flex items-center gap-2.5 mt-4 w-full cursor-pointer",children:[h.jsx("div",{onClick:()=>k(b=>!b),className:`w-5 h-5 rounded-md border flex items-center justify-center transition-all ${m?"bg-[#AF27E3] border-[#AF27E3]":"bg-white/[0.04] border-white/[0.12]"}`,children:m&&h.jsx(Eu,{className:"h-3.5 w-3.5 text-white"})}),h.jsx("span",{className:"text-[13px] text-white/50",children:"Trust this device for 90 days"})]}),h.jsx("button",{onClick:T,disabled:!d.trim()||o,className:"w-full mt-4 py-3 bg-gradient-brand hover:opacity-90 text-white text-[14px] font-semibold rounded-full transition-colors flex items-center justify-center gap-2 disabled:opacity-40",children:o?h.jsxs(h.Fragment,{children:[h.jsx(bl,{className:"h-4 w-4 animate-spin"}),"Verifying..."]}):h.jsxs(h.Fragment,{children:["Verify",h.jsx(hl,{className:"h-4 w-4"})]})}),h.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[h.jsxs("button",{onClick:B,className:"text-[12px] text-white/30 hover:text-white/50 flex items-center gap-1 transition-colors",children:[h.jsx(yu,{className:"h-3 w-3"}),"Back"]}),h.jsx("button",{onClick:()=>{y(b=>!b),c(""),i("")},className:"text-[12px] text-white/30 hover:text-white/50 transition-colors",children:w?"Use authenticator code":"Use a recovery code"})]})]},"totp")})})})}function yl(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const o=n.slice(a,r).trim();(o||!i)&&t.push(o),a=r+1,r=n.indexOf(",",a)}return t}function Md(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Fd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ud=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bd={};function Sl(e,t){return(Bd.jsx?Ud:Fd).test(e)}const Pd=/[ \t\n\f\r]/g;function $d(e){return typeof e=="object"?e.type==="text"?wl(e.value):!1:wl(e)}function wl(e){return e.replace(Pd,"")===""}class _t{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}_t.prototype.normal={};_t.prototype.property={};_t.prototype.space=void 0;function Au(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new _t(n,r,t)}function St(e){return e.toLowerCase()}class ke{constructor(t,n){this.attribute=n,this.property=t}}ke.prototype.attribute="";ke.prototype.booleanish=!1;ke.prototype.boolean=!1;ke.prototype.commaOrSpaceSeparated=!1;ke.prototype.commaSeparated=!1;ke.prototype.defined=!1;ke.prototype.mustUseProperty=!1;ke.prototype.number=!1;ke.prototype.overloadedBoolean=!1;ke.prototype.property="";ke.prototype.spaceSeparated=!1;ke.prototype.space=void 0;let zd=0;const q=We(),ce=We(),Ln=We(),U=We(),le=We(),et=We(),Ae=We();function We(){return 2**++zd}const Dn=Object.freeze(Object.defineProperty({__proto__:null,boolean:q,booleanish:ce,commaOrSpaceSeparated:Ae,commaSeparated:et,number:U,overloadedBoolean:Ln,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),dn=Object.keys(Dn);class Zn extends ke{constructor(t,n,r,a){let i=-1;if(super(t,n),kl(this,"space",a),typeof r=="number")for(;++i<dn.length;){const o=dn[i];kl(this,dn[i],(r&Dn[o])===Dn[o])}}}Zn.prototype.defined=!0;function kl(e,t,n){n&&(e[t]=n)}function nt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Zn(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[St(r)]=r,n[St(i.attribute)]=r}return new _t(t,n,e.space)}const _u=nt({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:le,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:U,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:le,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:ce,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Iu(e,t){return t in e?e[t]:t}function Nu(e,t){return Iu(e,t.toLowerCase())}const Gd=nt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:et,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:le,autoFocus:q,autoPlay:q,blocking:le,capture:null,charSet:null,checked:q,cite:null,className:le,cols:U,colSpan:null,content:null,contentEditable:ce,controls:q,controlsList:le,coords:U|et,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Ln,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:le,height:U,hidden:Ln,high:U,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:le,itemRef:le,itemScope:q,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:U,pattern:null,ping:le,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:le,required:q,reversed:q,rows:U,rowSpan:U,sandbox:le,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:ce,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:Nu}),jd=nt({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",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:Ae,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:le,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:et,g2:et,glyphName:et,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:Ae,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ae,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ae,rev:Ae,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ae,requiredFeatures:Ae,requiredFonts:Ae,requiredFormats:Ae,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:Ae,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ae,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ae,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Iu}),xu=nt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Ru=nt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nu}),vu=nt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hd={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"},Vd=/[A-Z]/g,Tl=/-[a-z]/g,Wd=/^data[-\w.:]+$/i;function Cu(e,t){const n=St(t);let r=t,a=ke;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Wd.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Tl,Yd);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Tl.test(i)){let o=i.replace(Vd,qd);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Zn}return new a(r,t)}function qd(e){return"-"+e.toLowerCase()}function Yd(e){return e.charAt(1).toUpperCase()}const Ou=Au([_u,Gd,xu,Ru,vu],"html"),Kt=Au([_u,jd,xu,Ru,vu],"svg");function Al(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Kd(e){return e.join(" ").trim()}var Ke={},pn,_l;function Xd(){if(_l)return pn;_l=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
|
|
2
2
|
`,u="/",d="*",c="",g="comment",p="declaration";function m(w,y){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];y=y||{};var A=1,_=1;function N(O){var D=O.match(t);D&&(A+=D.length);var j=O.lastIndexOf(l);_=~j?O.length-j:_+O.length}function R(){var O={line:A,column:_};return function(D){return D.position=new T(O),L(),D}}function T(O){this.start=O,this.end={line:A,column:_},this.source=y.source}T.prototype.content=w;function F(O){var D=new Error(y.source+":"+A+":"+_+": "+O);if(D.reason=O,D.filename=y.source,D.line=A,D.column=_,D.source=w,!y.silent)throw D}function B(O){var D=O.exec(w);if(D){var j=D[0];return N(j),w=w.slice(j.length),D}}function L(){B(n)}function b(O){var D;for(O=O||[];D=I();)D!==!1&&O.push(D);return O}function I(){var O=R();if(!(u!=w.charAt(0)||d!=w.charAt(1))){for(var D=2;c!=w.charAt(D)&&(d!=w.charAt(D)||u!=w.charAt(D+1));)++D;if(D+=2,c===w.charAt(D-1))return F("End of comment missing");var j=w.slice(2,D-2);return _+=2,N(j),w=w.slice(D),_+=2,O({type:g,comment:j})}}function v(){var O=R(),D=B(r);if(D){if(I(),!B(a))return F("property missing ':'");var j=B(i),W=O({type:p,property:k(D[0].replace(e,c)),value:j?k(j[0].replace(e,c)):c});return B(o),W}}function M(){var O=[];b(O);for(var D;D=v();)D!==!1&&(O.push(D),b(O));return O}return L(),M()}function k(w){return w?w.replace(s,c):c}return pn=m,pn}var Il;function Zd(){if(Il)return Ke;Il=1;var e=Ke&&Ke.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.default=n;const t=e(Xd());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const o=(0,t.default)(r),s=typeof a=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:d}=l;s?a(u,d,l):d&&(i=i||{},i[u]=d)}),i}return Ke}var pt={},Nl;function Qd(){if(Nl)return pt;Nl=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},o=function(u,d){return d.toUpperCase()},s=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(a,s):u=u.replace(r,s),u.replace(t,o))};return pt.camelCase=l,pt}var gt,xl;function Jd(){if(xl)return gt;xl=1;var e=gt&>.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Zd()),n=Qd();function r(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(s,l){s&&l&&(o[(0,n.camelCase)(s,i)]=l)}),o}return r.default=r,gt=r,gt}var ep=Jd();const tp=Su(ep),Lu=Du("end"),Qn=Du("start");function Du(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function np(e){const t=Qn(e),n=Lu(e);if(t&&n)return{start:t,end:n}}function bt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rl(e.position):"start"in e||"end"in e?Rl(e):"line"in e||"column"in e?Mn(e):""}function Mn(e){return vl(e&&e.line)+":"+vl(e&&e.column)}function Rl(e){return Mn(e&&e.start)+"-"+Mn(e&&e.end)}function vl(e){return e&&typeof e=="number"?e:1}class he extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=s?s.line:void 0,this.name=bt(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}he.prototype.file="";he.prototype.name="";he.prototype.reason="";he.prototype.message="";he.prototype.stack="";he.prototype.column=void 0;he.prototype.line=void 0;he.prototype.ancestors=void 0;he.prototype.cause=void 0;he.prototype.fatal=void 0;he.prototype.place=void 0;he.prototype.ruleId=void 0;he.prototype.source=void 0;const Jn={}.hasOwnProperty,rp=new Map,ap=/[A-Z]/g,ip=new Set(["table","tbody","thead","tfoot","tr"]),op=new Set(["td","th"]),Mu="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mp(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fp(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Kt:Ou,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Fu(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Fu(e,t,n){if(t.type==="element")return lp(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return up(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return dp(e,t,n);if(t.type==="mdxjsEsm")return cp(e,t);if(t.type==="root")return pp(e,t,n);if(t.type==="text")return gp(e,t)}function lp(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Kt,e.schema=a),e.ancestors.push(t);const i=Bu(e,t.tagName,!1),o=bp(e,t);let s=tr(e,t);return ip.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!$d(l):!0})),Uu(e,o,i,t),er(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function up(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}wt(e,t.position)}function cp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wt(e,t.position)}function dp(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Kt,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:Bu(e,t.name,!0),o=hp(e,t),s=tr(e,t);return Uu(e,o,i,t),er(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function pp(e,t,n){const r={};return er(r,tr(e,t)),e.create(t,e.Fragment,r,n)}function gp(e,t){return t.value}function Uu(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function er(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function fp(e,t,n){return r;function r(a,i,o,s){const u=Array.isArray(o.children)?n:t;return s?u(i,o,s):u(i,o)}}function mp(e,t){return n;function n(r,a,i,o){const s=Array.isArray(i.children),l=Qn(r);return t(a,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function bp(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Jn.call(t.properties,a)){const i=Ep(e,a,t.properties[a]);if(i){const[o,s]=i;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&op.has(t.tagName)?r=s:n[o]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function hp(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else wt(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else wt(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function tr(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:rp;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=a.get(l)||0;o=l+"-"+u,a.set(l,u+1)}}const s=Fu(e,i,o);s!==void 0&&n.push(s)}return n}function Ep(e,t,n){const r=Cu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Md(n):Kd(n)),r.property==="style"){let a=typeof n=="object"?n:yp(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Sp(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?Hd[r.property]||r.property:r.attribute,n]}}function yp(e,t){try{return tp(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new he("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Mu+"#cannot-parse-style-attribute",a}}function Bu(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const s=Sl(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=o}else r=Sl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Jn.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);wt(e)}function wt(e,t){const n=new he("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mu+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Sp(e){const t={};let n;for(n in e)Jn.call(e,n)&&(t[wp(n)]=e[n]);return t}function wp(e){let t=e.replace(ap,kp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kp(e){return"-"+e.toLowerCase()}const gn={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"]},Tp={};function nr(e,t){const n=Tp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pu(e,r,a)}function Pu(e,t,n){if(Ap(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Cl(e.children,t,n)}return Array.isArray(e)?Cl(e,t,n):""}function Cl(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Pu(e[a],t,n);return r.join("")}function Ap(e){return!!(e&&typeof e=="object")}const Ol=document.createElement("i");function kt(e){const t="&"+e+";";Ol.innerHTML=t;const n=Ol.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function _e(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Ne(e,t){return e.length>0?(_e(e,e.length,0,t),e):t}const Ll={}.hasOwnProperty;function $u(e){const t={};let n=-1;for(;++n<e.length;)_p(t,e[n]);return t}function _p(e,t){let n;for(n in t){const a=(Ll.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){Ll.call(a,o)||(a[o]=[]);const s=i[o];Ip(a[o],Array.isArray(s)?s:s?[s]:[])}}}function Ip(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);_e(e,0,0,r)}function zu(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ve(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Se=ze(/[A-Za-z]/),be=ze(/[\dA-Za-z]/),Np=ze(/[#-'*+\--9=?A-Z^-~]/);function Vt(e){return e!==null&&(e<32||e===127)}const Fn=ze(/\d/),xp=ze(/[\dA-Fa-f]/),Rp=ze(/[!-/:-@[-`{-~]/);function G(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function K(e){return e===-2||e===-1||e===32}const Xt=ze(new RegExp("\\p{P}|\\p{S}","u")),Ve=ze(/\s/);function ze(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function rt(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&be(e.charCodeAt(n+1))&&be(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function J(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return K(l)?(e.enter(n),s(l)):t(l)}function s(l){return K(l)&&i++<a?(e.consume(l),s):(e.exit(n),t(l))}}const vp={tokenize:Cp};function Cp(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),J(e,t,"linePrefix")}function a(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return G(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),o)}}const Op={tokenize:Lp},Dl={tokenize:Dp};function Lp(e){const t=this,n=[];let r=0,a,i,o;return s;function s(_){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,l,u)(_)}return u(_)}function l(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&A();const N=t.events.length;let R=N,T;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){T=t.events[R][1].end;break}y(r);let F=N;for(;F<t.events.length;)t.events[F][1].end={...T},F++;return _e(t.events,R+1,0,t.events.slice(N)),t.events.length=F,u(_)}return s(_)}function u(_){if(r===n.length){if(!a)return g(_);if(a.currentConstruct&&a.currentConstruct.concrete)return m(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dl,d,c)(_)}function d(_){return a&&A(),y(r),g(_)}function c(_){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(_)}function g(_){return t.containerState={},e.attempt(Dl,p,m)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),g(_)}function m(_){if(_===null){a&&A(),y(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),k(_)}function k(_){if(_===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return G(_)?(e.consume(_),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(_),k)}function w(_,N){const R=t.sliceStream(_);if(N&&R.push(null),_.previous=i,i&&(i.next=_),i=_,a.defineSkip(_.start),a.write(R),t.parser.lazy[_.start.line]){let T=a.events.length;for(;T--;)if(a.events[T][1].start.offset<o&&(!a.events[T][1].end||a.events[T][1].end.offset>o))return;const F=t.events.length;let B=F,L,b;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(L){b=t.events[B][1].end;break}L=!0}for(y(r),T=F;T<t.events.length;)t.events[T][1].end={...b},T++;_e(t.events,B+1,0,t.events.slice(F)),t.events.length=T}}function y(_){let N=n.length;for(;N-- >_;){const R=n[N];t.containerState=R[1],R[0].exit.call(t,e)}n.length=_}function A(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Dp(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function tt(e){if(e===null||oe(e)||Ve(e))return 1;if(Xt(e))return 2}function Zt(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Un={name:"attention",resolveAll:Mp,tokenize:Fp};function Mp(e,t){let n=-1,r,a,i,o,s,l,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},g={...e[n][1].start};Ml(c,-l),Ml(g,l),o={type:l>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ne(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ne(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Ne(u,Zt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ne(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ne(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,_e(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Fp(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=tt(r);let i;return o;function o(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const u=e.exit("attentionSequence"),d=tt(l),c=!d||d===2&&a||n.includes(l),g=!a||a===2&&d||n.includes(r);return u._open=!!(i===42?c:c&&(a||!g)),u._close=!!(i===42?g:g&&(d||!c)),t(l)}}function Ml(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Up={name:"autolink",tokenize:Bp};function Bp(e,t,n){let r=0;return a;function a(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Se(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||be(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||be(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Vt(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):Np(p)?(e.consume(p),u):n(p)}function d(p){return be(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):g(p)}function g(p){if((p===45||be(p))&&r++<63){const m=p===45?g:c;return e.consume(p),m}return n(p)}}const It={partial:!0,tokenize:Pp};function Pp(e,t,n){return r;function r(i){return K(i)?J(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||G(i)?t(i):n(i)}}const Gu={continuation:{tokenize:zp},exit:Gp,name:"blockQuote",tokenize:$p};function $p(e,t,n){const r=this;return a;function a(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return K(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function zp(e,t,n){const r=this;return a;function a(o){return K(o)?J(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(Gu,t,n)(o)}}function Gp(e){e.exit("blockQuote")}const ju={name:"characterEscape",tokenize:jp};function jp(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Rp(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Hu={name:"characterReference",tokenize:Hp};function Hp(e,t,n){const r=this;let a=0,i,o;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),l}function l(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=be,d(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=xp,d):(e.enter("characterReferenceValue"),i=7,o=Fn,d(c))}function d(c){if(c===59&&a){const g=e.exit("characterReferenceValue");return o===be&&!kt(r.sliceSerialize(g))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&a++<i?(e.consume(c),d):n(c)}}const Fl={partial:!0,tokenize:Wp},Ul={concrete:!0,name:"codeFenced",tokenize:Vp};function Vp(e,t,n){const r=this,a={partial:!0,tokenize:R};let i=0,o=0,s;return l;function l(T){return u(T)}function u(T){const F=r.events[r.events.length-1];return i=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===s?(o++,e.consume(T),d):o<3?n(T):(e.exit("codeFencedFenceSequence"),K(T)?J(e,c,"whitespace")(T):c(T))}function c(T){return T===null||G(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(Fl,k,N)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||G(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(T)):K(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),J(e,p,"whitespace")(T)):T===96&&T===s?n(T):(e.consume(T),g)}function p(T){return T===null||G(T)?c(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(T))}function m(T){return T===null||G(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(T)):T===96&&T===s?n(T):(e.consume(T),m)}function k(T){return e.attempt(a,N,w)(T)}function w(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),y}function y(T){return i>0&&K(T)?J(e,A,"linePrefix",i+1)(T):A(T)}function A(T){return T===null||G(T)?e.check(Fl,k,N)(T):(e.enter("codeFlowValue"),_(T))}function _(T){return T===null||G(T)?(e.exit("codeFlowValue"),A(T)):(e.consume(T),_)}function N(T){return e.exit("codeFenced"),t(T)}function R(T,F,B){let L=0;return b;function b(D){return T.enter("lineEnding"),T.consume(D),T.exit("lineEnding"),I}function I(D){return T.enter("codeFencedFence"),K(D)?J(T,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):v(D)}function v(D){return D===s?(T.enter("codeFencedFenceSequence"),M(D)):B(D)}function M(D){return D===s?(L++,T.consume(D),M):L>=o?(T.exit("codeFencedFenceSequence"),K(D)?J(T,O,"whitespace")(D):O(D)):B(D)}function O(D){return D===null||G(D)?(T.exit("codeFencedFence"),F(D)):B(D)}}}function Wp(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const fn={name:"codeIndented",tokenize:Yp},qp={partial:!0,tokenize:Kp};function Yp(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),J(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):G(u)?e.attempt(qp,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||G(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function Kp(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):G(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):J(e,i,"linePrefix",5)(o)}function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):G(o)?a(o):n(o)}}const Xp={name:"codeText",previous:Qp,resolve:Zp,tokenize:Jp};function Zp(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Qp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jp(e,t,n){let r=0,a,i;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),l):c===96?(i=e.enter("codeTextSequence"),a=0,d(c)):G(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||G(c)?(e.exit("codeTextData"),l(c)):(e.consume(c),u)}function d(c){return c===96?(e.consume(c),a++,d):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(i.type="codeTextData",u(c))}}class eg{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&ft(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ft(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ft(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ft(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ft(this.left,n.reverse())}}}function ft(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Vu(e){const t={};let n=-1,r,a,i,o,s,l,u;const d=new eg(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,tg(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=d.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},s=d.slice(a,n),s.unshift(r),d.splice(a,n-a+1,s))}}return _e(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function tg(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],u={};let d,c,g=-1,p=n,m=0,k=0;const w=[k];for(;p;){for(;e.get(++a)[1]!==p;);i.push(a),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),c&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++g<s.length;)s[g][0]==="exit"&&s[g-1][0]==="enter"&&s[g][1].type===s[g-1][1].type&&s[g][1].start.line!==s[g][1].end.line&&(k=g+1,w.push(k),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),g=w.length;g--;){const y=s.slice(w[g],w[g+1]),A=i.pop();l.push([A,A+y.length-1]),e.splice(A,2,y)}for(l.reverse(),g=-1;++g<l.length;)u[m+l[g][0]]=m+l[g][1],m+=l[g][1]-l[g][0]-1;return u}const ng={resolve:ag,tokenize:ig},rg={partial:!0,tokenize:og};function ag(e){return Vu(e),e}function ig(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(s)}function a(s){return s===null?i(s):G(s)?e.check(rg,o,i)(s):(e.consume(s),a)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function og(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),J(e,i,"linePrefix")}function i(o){if(o===null||G(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Wu(e,t,n,r,a,i,o,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return c;function c(y){return y===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(y),e.exit(i),g):y===null||y===32||y===41||Vt(y)?n(y):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),k(y))}function g(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(s),g(y)):y===null||y===60||G(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function k(y){return!d&&(y===null||y===41||oe(y))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(y)):d<u&&y===40?(e.consume(y),d++,k):y===41?(e.consume(y),d--,k):y===null||y===32||y===40||Vt(y)?n(y):(e.consume(y),y===92?w:k)}function w(y){return y===40||y===41||y===92?(e.consume(y),k):k(y)}}function qu(e,t,n,r,a,i){const o=this;let s=0,l;return u;function u(p){return e.enter(r),e.enter(a),e.consume(p),e.exit(a),e.enter(i),d}function d(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(i),e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):G(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||G(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!K(p)),p===92?g:c)}function g(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function Yu(e,t,n,r,a,i){let o;return s;function s(g){return g===34||g===39||g===40?(e.enter(r),e.enter(a),e.consume(g),e.exit(a),o=g===40?41:g,l):n(g)}function l(g){return g===o?(e.enter(a),e.consume(g),e.exit(a),e.exit(r),t):(e.enter(i),u(g))}function u(g){return g===o?(e.exit(i),l(o)):g===null?n(g):G(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),J(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===o||g===null||G(g)?(e.exit("chunkString"),u(g)):(e.consume(g),g===92?c:d)}function c(g){return g===o||g===92?(e.consume(g),d):d(g)}}function ht(e,t){let n;return r;function r(a){return G(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):K(a)?J(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const sg={name:"definition",tokenize:ug},lg={partial:!0,tokenize:cg};function ug(e,t,n){const r=this;let a;return i;function i(p){return e.enter("definition"),o(p)}function o(p){return qu.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return a=ve(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return oe(p)?ht(e,u)(p):u(p)}function u(p){return Wu(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(lg,c,c)(p)}function c(p){return K(p)?J(e,g,"whitespace")(p):g(p)}function g(p){return p===null||G(p)?(e.exit("definition"),r.parser.defined.push(a),t(p)):n(p)}}function cg(e,t,n){return r;function r(s){return oe(s)?ht(e,a)(s):n(s)}function a(s){return Yu(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return K(s)?J(e,o,"whitespace")(s):o(s)}function o(s){return s===null||G(s)?t(s):n(s)}}const dg={name:"hardBreakEscape",tokenize:pg};function pg(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return G(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const gg={name:"headingAtx",resolve:fg,tokenize:mg};function fg(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},_e(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function mg(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||oe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||G(d)?(e.exit("atxHeading"),t(d)):K(d)?J(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||oe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const bg=["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"],Bl=["pre","script","style","textarea"],hg={concrete:!0,name:"htmlFlow",resolveTo:Sg,tokenize:wg},Eg={partial:!0,tokenize:Tg},yg={partial:!0,tokenize:kg};function Sg(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function wg(e,t,n){const r=this;let a,i,o,s,l;return u;function u(E){return d(E)}function d(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),g):E===47?(e.consume(E),i=!0,k):E===63?(e.consume(E),a=3,r.interrupt?t:S):Se(E)?(e.consume(E),o=String.fromCharCode(E),w):n(E)}function g(E){return E===45?(e.consume(E),a=2,p):E===91?(e.consume(E),a=5,s=0,m):Se(E)?(e.consume(E),a=4,r.interrupt?t:S):n(E)}function p(E){return E===45?(e.consume(E),r.interrupt?t:S):n(E)}function m(E){const Q="CDATA[";return E===Q.charCodeAt(s++)?(e.consume(E),s===Q.length?r.interrupt?t:v:m):n(E)}function k(E){return Se(E)?(e.consume(E),o=String.fromCharCode(E),w):n(E)}function w(E){if(E===null||E===47||E===62||oe(E)){const Q=E===47,re=o.toLowerCase();return!Q&&!i&&Bl.includes(re)?(a=1,r.interrupt?t(E):v(E)):bg.includes(o.toLowerCase())?(a=6,Q?(e.consume(E),y):r.interrupt?t(E):v(E)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):i?A(E):_(E))}return E===45||be(E)?(e.consume(E),o+=String.fromCharCode(E),w):n(E)}function y(E){return E===62?(e.consume(E),r.interrupt?t:v):n(E)}function A(E){return K(E)?(e.consume(E),A):b(E)}function _(E){return E===47?(e.consume(E),b):E===58||E===95||Se(E)?(e.consume(E),N):K(E)?(e.consume(E),_):b(E)}function N(E){return E===45||E===46||E===58||E===95||be(E)?(e.consume(E),N):R(E)}function R(E){return E===61?(e.consume(E),T):K(E)?(e.consume(E),R):_(E)}function T(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),l=E,F):K(E)?(e.consume(E),T):B(E)}function F(E){return E===l?(e.consume(E),l=null,L):E===null||G(E)?n(E):(e.consume(E),F)}function B(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||oe(E)?R(E):(e.consume(E),B)}function L(E){return E===47||E===62||K(E)?_(E):n(E)}function b(E){return E===62?(e.consume(E),I):n(E)}function I(E){return E===null||G(E)?v(E):K(E)?(e.consume(E),I):n(E)}function v(E){return E===45&&a===2?(e.consume(E),j):E===60&&a===1?(e.consume(E),W):E===62&&a===4?(e.consume(E),ee):E===63&&a===3?(e.consume(E),S):E===93&&a===5?(e.consume(E),se):G(E)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Eg,$,M)(E)):E===null||G(E)?(e.exit("htmlFlowData"),M(E)):(e.consume(E),v)}function M(E){return e.check(yg,O,$)(E)}function O(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),D}function D(E){return E===null||G(E)?M(E):(e.enter("htmlFlowData"),v(E))}function j(E){return E===45?(e.consume(E),S):v(E)}function W(E){return E===47?(e.consume(E),o="",ae):v(E)}function ae(E){if(E===62){const Q=o.toLowerCase();return Bl.includes(Q)?(e.consume(E),ee):v(E)}return Se(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),ae):v(E)}function se(E){return E===93?(e.consume(E),S):v(E)}function S(E){return E===62?(e.consume(E),ee):E===45&&a===2?(e.consume(E),S):v(E)}function ee(E){return E===null||G(E)?(e.exit("htmlFlowData"),$(E)):(e.consume(E),ee)}function $(E){return e.exit("htmlFlow"),t(E)}}function kg(e,t,n){const r=this;return a;function a(o){return G(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Tg(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(It,t,n)}}const Ag={name:"htmlText",tokenize:_g};function _g(e,t,n){const r=this;let a,i,o;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),l}function l(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),R):S===63?(e.consume(S),_):Se(S)?(e.consume(S),B):n(S)}function u(S){return S===45?(e.consume(S),d):S===91?(e.consume(S),i=0,m):Se(S)?(e.consume(S),A):n(S)}function d(S){return S===45?(e.consume(S),p):n(S)}function c(S){return S===null?n(S):S===45?(e.consume(S),g):G(S)?(o=c,W(S)):(e.consume(S),c)}function g(S){return S===45?(e.consume(S),p):c(S)}function p(S){return S===62?j(S):S===45?g(S):c(S)}function m(S){const ee="CDATA[";return S===ee.charCodeAt(i++)?(e.consume(S),i===ee.length?k:m):n(S)}function k(S){return S===null?n(S):S===93?(e.consume(S),w):G(S)?(o=k,W(S)):(e.consume(S),k)}function w(S){return S===93?(e.consume(S),y):k(S)}function y(S){return S===62?j(S):S===93?(e.consume(S),y):k(S)}function A(S){return S===null||S===62?j(S):G(S)?(o=A,W(S)):(e.consume(S),A)}function _(S){return S===null?n(S):S===63?(e.consume(S),N):G(S)?(o=_,W(S)):(e.consume(S),_)}function N(S){return S===62?j(S):_(S)}function R(S){return Se(S)?(e.consume(S),T):n(S)}function T(S){return S===45||be(S)?(e.consume(S),T):F(S)}function F(S){return G(S)?(o=F,W(S)):K(S)?(e.consume(S),F):j(S)}function B(S){return S===45||be(S)?(e.consume(S),B):S===47||S===62||oe(S)?L(S):n(S)}function L(S){return S===47?(e.consume(S),j):S===58||S===95||Se(S)?(e.consume(S),b):G(S)?(o=L,W(S)):K(S)?(e.consume(S),L):j(S)}function b(S){return S===45||S===46||S===58||S===95||be(S)?(e.consume(S),b):I(S)}function I(S){return S===61?(e.consume(S),v):G(S)?(o=I,W(S)):K(S)?(e.consume(S),I):L(S)}function v(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,M):G(S)?(o=v,W(S)):K(S)?(e.consume(S),v):(e.consume(S),O)}function M(S){return S===a?(e.consume(S),a=void 0,D):S===null?n(S):G(S)?(o=M,W(S)):(e.consume(S),M)}function O(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||oe(S)?L(S):(e.consume(S),O)}function D(S){return S===47||S===62||oe(S)?L(S):n(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function W(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),ae}function ae(S){return K(S)?J(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):se(S)}function se(S){return e.enter("htmlTextData"),o(S)}}const rr={name:"labelEnd",resolveAll:Rg,resolveTo:vg,tokenize:Cg},Ig={tokenize:Og},Ng={tokenize:Lg},xg={tokenize:Dg};function Rg(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&_e(e,0,e.length,n),e}function vg(e,t){let n=e.length,r=0,a,i,o,s;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Ne(s,e.slice(i+1,i+r+3)),s=Ne(s,[["enter",d,t]]),s=Ne(s,Zt(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Ne(s,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),s=Ne(s,e.slice(o+1)),s=Ne(s,[["exit",l,t]]),_e(e,i,e.length,s),e}function Cg(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return s;function s(g){return i?i._inactive?c(g):(o=r.parser.defined.includes(ve(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),l):n(g)}function l(g){return g===40?e.attempt(Ig,d,o?d:c)(g):g===91?e.attempt(Ng,d,o?u:c)(g):o?d(g):c(g)}function u(g){return e.attempt(xg,d,c)(g)}function d(g){return t(g)}function c(g){return i._balanced=!0,n(g)}}function Og(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),a}function a(c){return oe(c)?ht(e,i)(c):i(c)}function i(c){return c===41?d(c):Wu(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return oe(c)?ht(e,l)(c):d(c)}function s(c){return n(c)}function l(c){return c===34||c===39||c===40?Yu(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function u(c){return oe(c)?ht(e,d)(c):d(c)}function d(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Lg(e,t,n){const r=this;return a;function a(s){return qu.call(r,e,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(ve(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function Dg(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const Mg={name:"labelStartImage",resolveAll:rr.resolveAll,tokenize:Fg};function Fg(e,t,n){const r=this;return a;function a(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ug={name:"labelStartLink",resolveAll:rr.resolveAll,tokenize:Bg};function Bg(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const mn={name:"lineEnding",tokenize:Pg};function Pg(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),J(e,t,"linePrefix")}}const zt={name:"thematicBreak",tokenize:$g};function $g(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return a=u,s(u)}function s(u){return u===a?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||G(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===a?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),K(u)?J(e,s,"whitespace")(u):s(u))}}const we={continuation:{tokenize:Hg},exit:Wg,name:"list",tokenize:jg},zg={partial:!0,tokenize:qg},Gg={partial:!0,tokenize:Vg};function jg(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Fn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(zt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Fn(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(It,r.interrupt?n:d,e.attempt(zg,g,c))}function d(p){return r.containerState.initialBlankLine=!0,i++,g(p)}function c(p){return K(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),g):n(p)}function g(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Hg(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(It,a,i);function a(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!K(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Gg,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(we,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Vg(e,t,n){const r=this;return J(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function Wg(e){e.exit(this.containerState.type)}function qg(e,t,n){const r=this;return J(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!K(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Pl={name:"setextUnderline",resolveTo:Yg,tokenize:Kg};function Yg(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Kg(e,t,n){const r=this;let a;return i;function i(u){let d=r.events.length,c;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){c=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===a?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),K(u)?J(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||G(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Xg={tokenize:Zg};function Zg(e){const t=this,n=e.attempt(It,r,e.attempt(this.parser.constructs.flowInitial,a,J(e,e.attempt(this.parser.constructs.flow,a,e.attempt(ng,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Qg={resolveAll:Xu()},Jg=Ku("string"),ef=Ku("text");function Ku(e){return{resolveAll:Xu(e==="text"?tf:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,s);return o;function o(d){return u(d)?i(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const c=a[d];let g=-1;if(c)for(;++g<c.length;){const p=c[g];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Xu(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function tf(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,o=-1,s=0,l;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const nf={42:we,43:we,45:we,48:we,49:we,50:we,51:we,52:we,53:we,54:we,55:we,56:we,57:we,62:Gu},rf={91:sg},af={[-2]:fn,[-1]:fn,32:fn},of={35:gg,42:zt,45:[Pl,zt],60:hg,61:Pl,95:zt,96:Ul,126:Ul},sf={38:Hu,92:ju},lf={[-5]:mn,[-4]:mn,[-3]:mn,33:Mg,38:Hu,42:Un,60:[Up,Ag],91:Ug,92:[dg,ju],93:rr,95:Un,96:Xp},uf={null:[Un,Qg]},cf={null:[42,95]},df={null:[]},pf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cf,contentInitial:rf,disable:df,document:nf,flow:of,flowInitial:af,insideSpan:uf,string:sf,text:lf},Symbol.toStringTag,{value:"Module"}));function gf(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],s=[];const l={attempt:F(R),check:F(T),consume:A,enter:_,exit:N,interrupt:F(T,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:m,parser:e,previous:null,sliceSerialize:g,sliceStream:p,write:c};let d=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function c(I){return o=Ne(o,I),w(),o[o.length-1]!==null?[]:(B(t,0),u.events=Zt(i,u.events,u),u.events)}function g(I,v){return mf(p(I),v)}function p(I){return ff(o,I)}function m(){const{_bufferIndex:I,_index:v,line:M,column:O,offset:D}=r;return{_bufferIndex:I,_index:v,line:M,column:O,offset:D}}function k(I){a[I.line]=I.column,b()}function w(){let I;for(;r._index<o.length;){const v=o[r._index];if(typeof v=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<v.length;)y(v.charCodeAt(r._bufferIndex));else y(v)}}function y(I){d=d(I)}function A(I){G(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,b()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function _(I,v){const M=v||{};return M.type=I,M.start=m(),u.events.push(["enter",M,u]),s.push(M),M}function N(I){const v=s.pop();return v.end=m(),u.events.push(["exit",v,u]),v}function R(I,v){B(I,v.from)}function T(I,v){v.restore()}function F(I,v){return M;function M(O,D,j){let W,ae,se,S;return Array.isArray(O)?$(O):"tokenize"in O?$([O]):ee(O);function ee(te){return de;function de(z){const Y=z!==null&&te[z],V=z!==null&&te.null,ne=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(V)?V:V?[V]:[]];return $(ne)(z)}}function $(te){return W=te,ae=0,te.length===0?j:E(te[ae])}function E(te){return de;function de(z){return S=L(),se=te,te.partial||(u.currentConstruct=te),te.name&&u.parser.constructs.disable.null.includes(te.name)?re():te.tokenize.call(v?Object.assign(Object.create(u),v):u,l,Q,re)(z)}}function Q(te){return I(se,S),D}function re(te){return S.restore(),++ae<W.length?E(W[ae]):j}}}function B(I,v){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&_e(u.events,v,u.events.length-v,I.resolve(u.events.slice(v),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function L(){const I=m(),v=u.previous,M=u.currentConstruct,O=u.events.length,D=Array.from(s);return{from:O,restore:j};function j(){r=I,u.previous=v,u.currentConstruct=M,u.events.length=O,s=D,b()}}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function ff(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function mf(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
|
|
3
3
|
`;break}case-3:{o=`\r
|
|
4
4
|
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function bf(e){const r={constructs:$u([pf,...(e||{}).extensions||[]]),content:a(vp),defined:[],document:a(Op),flow:a(Xg),lazy:{},string:a(Jg),text:a(ef)};return r;function a(i){return o;function o(s){return gf(r,i,s)}}}function hf(e){for(;!Vu(e););return e}const $l=/[\0\t\n\r]/g;function Ef(){let e=1,t="",n=!0,r;return a;function a(i,o,s){const l=[];let u,d,c,g,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),c=0,t="",n&&(i.charCodeAt(0)===65279&&c++,n=void 0);c<i.length;){if($l.lastIndex=c,u=$l.exec(i),g=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(g),!u){t=i.slice(c);break}if(p===10&&c===g&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<g&&(l.push(i.slice(c,g)),e+=g-c),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=g+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const yf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sf(e){return e.replace(yf,wf)}function wf(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return zu(n.slice(i?2:1),i?16:10)}return kt(n)||e}const Zu={}.hasOwnProperty;function kf(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Tf(n)(hf(bf(n).document().write(Ef()(e,t,!0))))}function Tf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(fl),autolinkProtocol:L,autolinkEmail:L,atxHeading:i(Ie),blockQuote:i(V),characterEscape:L,characterReference:L,codeFenced:i(ne),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(ne,o),codeText:i(pe,o),codeTextData:L,data:L,codeFlowValue:L,definition:i(ue),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(xe),hardBreakEscape:i(De),hardBreakTrailing:i(De),htmlFlow:i(Dt,o),htmlFlowData:L,htmlText:i(Dt,o),htmlTextData:L,image:i(Gc),label:o,link:i(fl),listItem:i(jc),listItemValue:g,listOrdered:i(ml,c),listUnordered:i(ml),paragraph:i(Hc),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Ie),strong:i(Vc),thematicBreak:i(qc)},exit:{atxHeading:l(),atxHeadingSequence:R,autolink:l(),autolinkEmail:Y,autolinkProtocol:z,blockQuote:l(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:te,characterReference:de,codeFenced:l(w),codeFencedFence:k,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:b,codeIndented:l(y),codeText:l(D),codeTextData:b,data:b,definition:l(),definitionDestinationString:N,definitionLabelString:A,definitionTitleString:_,emphasis:l(),hardBreakEscape:l(v),hardBreakTrailing:l(v),htmlFlow:l(M),htmlFlowData:b,htmlText:l(O),htmlTextData:b,image:l(W),label:se,labelText:ae,lineEnding:I,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:S,resourceTitleString:ee,resource:$,setextHeading:l(B),setextHeadingLineSequence:F,setextHeadingText:T,strong:l(),thematicBreak:l()}};Qu(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(x){let P={type:"root",children:[]};const H={stack:[P],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:d,data:n},Z=[];let ie=-1;for(;++ie<x.length;)if(x[ie][1].type==="listOrdered"||x[ie][1].type==="listUnordered")if(x[ie][0]==="enter")Z.push(ie);else{const Re=Z.pop();ie=a(x,Re,ie)}for(ie=-1;++ie<x.length;){const Re=t[x[ie][0]];Zu.call(Re,x[ie][1].type)&&Re[x[ie][1].type].call(Object.assign({sliceSerialize:x[ie][2].sliceSerialize},H),x[ie][1])}if(H.tokenStack.length>0){const Re=H.tokenStack[H.tokenStack.length-1];(Re[1]||zl).call(H,void 0,Re[0])}for(P.position={start:Pe(x.length>0?x[0][1].start:{line:1,column:1,offset:0}),end:Pe(x.length>0?x[x.length-2][1].end:{line:1,column:1,offset:0})},ie=-1;++ie<t.transforms.length;)P=t.transforms[ie](P)||P;return P}function a(x,P,H){let Z=P-1,ie=-1,Re=!1,Ge,Me,ct,dt;for(;++Z<=H;){const Te=x[Z];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?ie++:ie--,dt=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(Ge&&!dt&&!ie&&!ct&&(ct=Z),dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dt=void 0}if(!ie&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||ie===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(Ge){let Ye=Z;for(Me=void 0;Ye--;){const Fe=x[Ye];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;Me&&(x[Me][1].type="lineEndingBlank",Re=!0),Fe[1].type="lineEnding",Me=Ye}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}ct&&(!Me||ct<Me)&&(Ge._spread=!0),Ge.end=Object.assign({},Me?x[Me][1].start:Te[1].end),x.splice(Me||Z,0,["exit",Ge,Te[2]]),Z++,H++}if(Te[1].type==="listItemPrefix"){const Ye={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};Ge=Ye,x.splice(Z,0,["enter",Ye,Te[2]]),Z++,H++,ct=void 0,dt=!0}}}return x[P][1]._spread=Re,H}function i(x,P){return H;function H(Z){s.call(this,x(Z),Z),P&&P.call(this,Z)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(x,P,H){this.stack[this.stack.length-1].children.push(x),this.stack.push(x),this.tokenStack.push([P,H||void 0]),x.position={start:Pe(P.start),end:void 0}}function l(x){return P;function P(H){x&&x.call(this,H),u.call(this,H)}}function u(x,P){const H=this.stack.pop(),Z=this.tokenStack.pop();if(Z)Z[0].type!==x.type&&(P?P.call(this,x,Z[0]):(Z[1]||zl).call(this,x,Z[0]));else throw new Error("Cannot close `"+x.type+"` ("+bt({start:x.start,end:x.end})+"): it’s not open");H.position.end=Pe(x.end)}function d(){return nr(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function g(x){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(x),10),this.data.expectingFirstListItemValue=void 0}}function p(){const x=this.resume(),P=this.stack[this.stack.length-1];P.lang=x}function m(){const x=this.resume(),P=this.stack[this.stack.length-1];P.meta=x}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const x=this.resume(),P=this.stack[this.stack.length-1];P.value=x.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const x=this.resume(),P=this.stack[this.stack.length-1];P.value=x.replace(/(\r?\n|\r)$/g,"")}function A(x){const P=this.resume(),H=this.stack[this.stack.length-1];H.label=P,H.identifier=ve(this.sliceSerialize(x)).toLowerCase()}function _(){const x=this.resume(),P=this.stack[this.stack.length-1];P.title=x}function N(){const x=this.resume(),P=this.stack[this.stack.length-1];P.url=x}function R(x){const P=this.stack[this.stack.length-1];if(!P.depth){const H=this.sliceSerialize(x).length;P.depth=H}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function F(x){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(x).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function L(x){const H=this.stack[this.stack.length-1].children;let Z=H[H.length-1];(!Z||Z.type!=="text")&&(Z=Wc(),Z.position={start:Pe(x.start),end:void 0},H.push(Z)),this.stack.push(Z)}function b(x){const P=this.stack.pop();P.value+=this.sliceSerialize(x),P.position.end=Pe(x.end)}function I(x){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const H=P.children[P.children.length-1];H.position.end=Pe(x.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(L.call(this,x),b.call(this,x))}function v(){this.data.atHardBreak=!0}function M(){const x=this.resume(),P=this.stack[this.stack.length-1];P.value=x}function O(){const x=this.resume(),P=this.stack[this.stack.length-1];P.value=x}function D(){const x=this.resume(),P=this.stack[this.stack.length-1];P.value=x}function j(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=P,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function W(){const x=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";x.type+="Reference",x.referenceType=P,delete x.url,delete x.title}else delete x.identifier,delete x.label;this.data.referenceType=void 0}function ae(x){const P=this.sliceSerialize(x),H=this.stack[this.stack.length-2];H.label=Sf(P),H.identifier=ve(P).toLowerCase()}function se(){const x=this.stack[this.stack.length-1],P=this.resume(),H=this.stack[this.stack.length-1];if(this.data.inReference=!0,H.type==="link"){const Z=x.children;H.children=Z}else H.alt=P}function S(){const x=this.resume(),P=this.stack[this.stack.length-1];P.url=x}function ee(){const x=this.resume(),P=this.stack[this.stack.length-1];P.title=x}function $(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Q(x){const P=this.resume(),H=this.stack[this.stack.length-1];H.label=P,H.identifier=ve(this.sliceSerialize(x)).toLowerCase(),this.data.referenceType="full"}function re(x){this.data.characterReferenceType=x.type}function te(x){const P=this.sliceSerialize(x),H=this.data.characterReferenceType;let Z;H?(Z=zu(P,H==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Z=kt(P);const ie=this.stack[this.stack.length-1];ie.value+=Z}function de(x){const P=this.stack.pop();P.position.end=Pe(x.end)}function z(x){b.call(this,x);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(x)}function Y(x){b.call(this,x);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(x)}function V(){return{type:"blockquote",children:[]}}function ne(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function ue(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xe(){return{type:"emphasis",children:[]}}function Ie(){return{type:"heading",depth:0,children:[]}}function De(){return{type:"break"}}function Dt(){return{type:"html",value:""}}function Gc(){return{type:"image",title:null,url:"",alt:null}}function fl(){return{type:"link",title:null,url:"",children:[]}}function ml(x){return{type:"list",ordered:x.type==="listOrdered",start:null,spread:x._spread,children:[]}}function jc(x){return{type:"listItem",spread:x._spread,checked:null,children:[]}}function Hc(){return{type:"paragraph",children:[]}}function Vc(){return{type:"strong",children:[]}}function Wc(){return{type:"text",value:""}}function qc(){return{type:"thematicBreak"}}}function Pe(e){return{line:e.line,column:e.column,offset:e.offset}}function Qu(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Qu(e,r):Af(e,r)}}function Af(e,t){let n;for(n in t)if(Zu.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zl(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+bt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+bt({start:t.start,end:t.end})+") is still open")}function _f(e){const t=this;t.parser=n;function n(r){return kf(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function If(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Nf(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|