juneau 0.5.2 → 0.5.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/README.md CHANGED
@@ -384,6 +384,9 @@ import { AiChatProvider } from 'juneau';
384
384
  | `context` | `Record<string, unknown>` | Initial context forwarded to every adapter call. Update per-page via `setContext()`. |
385
385
  | `onProposalConfirm` | `(id, payload) => void` | Called when user confirms a proposal card. |
386
386
  | `onProposalCancel` | `(id) => void` | Called when user cancels a proposal card. |
387
+ | `initialMessages` | `AiMessage[]` | Restored conversation to start with (see Chat history). |
388
+ | `historyLimit` | `number` | Max messages sent to the adapter per request. Rendering never trimmed. |
389
+ | `onMessagesChange` | `(messages) => void` | Called when the conversation settles. Use to persist. |
387
390
 
388
391
  **Updating context per page:**
389
392
 
@@ -407,6 +410,27 @@ function InvoicesPage() {
407
410
  }
408
411
  ```
409
412
 
413
+ **Replace vs merge:** passing an object to `setContext` **replaces** the whole context. To keep existing keys (e.g. a `sessionId` set elsewhere) while updating others, use the updater form:
414
+
415
+ ```tsx
416
+ setContext(prev => ({ ...prev, page: 'invoices' }));
417
+ ```
418
+
419
+ **Consuming chat state outside a guaranteed provider:**
420
+
421
+ `useAiChatContext()` throws when called outside `<AiChatProvider>` — fail fast is right for components that require it. For components that may render outside the provider (e.g. during sign-out transitions), use the exported `AiChatContext` with plain `useContext` and handle `null`:
422
+
423
+ ```tsx
424
+ import { useContext } from 'react';
425
+ import { AiChatContext } from 'juneau';
426
+
427
+ function OptionalChatButton() {
428
+ const chat = useContext(AiChatContext); // AiChatContextValue | null
429
+ if (!chat) return null;
430
+ return <button onClick={() => chat.sendMessageWithText('Help')}>Ask AI</button>;
431
+ }
432
+ ```
433
+
410
434
  ---
411
435
 
412
436
  ## Components
@@ -4,8 +4,15 @@ export type AiChatContextValue = UseAiChatReturn & {
4
4
  * Update the context forwarded to every adapter.sendMessage call.
5
5
  * Call this on each page/view to tell the AI where the user is,
6
6
  * what tools are available, etc.
7
+ *
8
+ * Passing an object REPLACES the whole context. To merge with what's
9
+ * already there (e.g. keep a sessionId while updating the page), use the
10
+ * updater form:
11
+ *
12
+ * @example
13
+ * setContext(prev => ({ ...prev, pageId: 'invoices' }));
7
14
  */
8
- setContext: (ctx: Record<string, unknown>) => void;
15
+ setContext: (ctx: Record<string, unknown> | ((prev: Record<string, unknown> | undefined) => Record<string, unknown>)) => void;
9
16
  };
10
17
  export declare const AiChatContext: import("react").Context<AiChatContextValue | null>;
11
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AiChatContext.d.ts","sourceRoot":"","sources":["../../src/context/AiChatContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG;IACjD;;;;OAIG;IACH,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CASrD"}
1
+ {"version":3,"file":"AiChatContext.d.ts","sourceRoot":"","sources":["../../src/context/AiChatContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG;IACjD;;;;;;;;;;;OAWG;IACH,UAAU,EAAE,CACV,GAAG,EACC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACzE,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CASrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"AiChatProvider.d.ts","sourceRoot":"","sources":["../../src/context/AiChatProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,gBAAgB,CAAC;IAC1B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,2FAA2F;IAC3F,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAO,EAAE,cAAc,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,QAAQ,GACT,EAAE,KAAK,+BAsBP"}
1
+ {"version":3,"file":"AiChatProvider.d.ts","sourceRoot":"","sources":["../../src/context/AiChatProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,gBAAgB,CAAC;IAC1B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,2FAA2F;IAC3F,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAO,EAAE,cAAc,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,QAAQ,GACT,EAAE,KAAK,+BAgCP"}
package/dist/index.cjs CHANGED
@@ -20,7 +20,7 @@ Try asking: *"Show me the data"* or *"Can you suggest something?"*`,25),yield{ty
20
20
  `,22),await Z(150),yield*re(`- Say **"error"** or **"fail"** → simulates an error response
21
21
  `,22),yield{type:"done"}}async function*re(e,t){for(let r=0;r<e.length;r+=3)yield{type:"text",text:e.slice(r,r+3)},await Z(t)}function Ar(e){if(!e||e==="[DONE]")return[];let t;try{t=JSON.parse(e)}catch{return[]}switch(t.type){case"text":return t.text?[{type:"text",text:t.text}]:[];case"activity":return[{type:"part",part:{type:"activity",id:t.id,title:t.title,description:t.description,status:t.status,metadata:t.metadata}}];case"part":return[{type:"part",part:t.part}];case"done":return[{type:"done"}];case"error":return[{type:"error",message:t.message}];default:return[]}}function pl(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,getMessages:l,parseEvent:a=dl,credentials:s}=t;return{async*sendMessage(u){const f=i?await i(u):{},c=l?await l(u.messages):u.messages,h={...u,messages:c},p=o?o(h):{messages:h.messages,context:h.context},g=await fetch(e,{method:n,credentials:s,headers:{"Content-Type":"application/json",...r,...f},body:JSON.stringify(p)});if(!g.ok){const C=await g.text().catch(()=>`HTTP ${g.status}`);yield{type:"error",message:`Request failed (${g.status}): ${C}`};return}if(!g.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*hl(g.body,a)}}}async function*hl(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
22
22
  `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!(!u||u.startsWith(":"))&&u.startsWith("data: ")){const f=u.slice(6);if(f==="[DONE]"){yield{type:"done"};return}const c=t(f);for(const h of c)if(yield h,h.type==="done"||h.type==="error")return}}}}finally{n.releaseLock()}yield{type:"done"}}const dl=e=>{if(!e||e==="[DONE]")return[];const t=Ar(e);if(t.length>0)return t;try{const n=JSON.parse(e);if(n.error?.message)return[{type:"error",message:n.error.message}];const r=n.choices?.[0]?.delta;return n.choices?.[0]?.finish_reason==="stop"?[{type:"done"}]:r?.content?[{type:"text",text:r.content}]:[]}catch{return[]}};function ml(e,t={}){const{method:n="POST",headers:r={},getHeaders:i,getBody:o,parseChunk:l=yl,credentials:a}=t;return{async*sendMessage(s){const u=i?await i(s):{},f=o?o(s):{messages:s.messages,context:s.context},c=await fetch(e,{method:n,credentials:a,headers:{"Content-Type":"application/json",...r,...u},body:JSON.stringify(f)});if(!c.ok){const h=await c.text().catch(()=>`HTTP ${c.status}`);yield{type:"error",message:`Request failed (${c.status}): ${h}`};return}if(!c.body){yield{type:"error",message:"Response body is empty — server may not support streaming."};return}yield*gl(c.body,l)}}}async function*gl(e,t){const n=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:o,value:l}=await n.read();if(o)break;i+=r.decode(l,{stream:!0});const a=i.split(`
23
- `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const yl=e=>{const t=Ar(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let xl=0;const ct=()=>`msg-${++xl}-${Date.now()}`,Pn=Cr;function Er({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}){const[a,s]=q.useState(i??[]),[u,f]=q.useState(""),[c,h]=q.useState(!1),[p,g]=q.useState(!1),[C,S]=q.useState(null),y=q.useRef(null),_=q.useRef(!1),A=q.useRef(l);q.useEffect(()=>{A.current=l}),q.useEffect(()=>{!_.current||c||(_.current=!1,A.current?.(a))},[a,c]);const L=q.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;if(v.type==="activity"&&v.id){const Y=[...O.parts],Q=Y.findIndex(d=>d.type==="activity"&&d.id===v.id);if(Q!==-1)return Y[Q]=v,[...M.slice(0,-1),{...O,parts:Y}]}return[...M.slice(0,-1),{...O,parts:[...O.parts,v]}]})},[]),D=q.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;const Y=[...O.parts],Q=Y[Y.length-1];return Q?.type==="text"?Y[Y.length-1]={type:"text",text:Q.text+v}:Y.push({type:"text",text:v}),[...M.slice(0,-1),{...O,parts:Y}]})},[]),b=q.useCallback(async(v,M)=>{S(null);const O={id:ct(),role:"user",parts:[{type:"text",text:v}],createdAt:new Date},Y=ct();let Q=!1;const d=()=>{if(Q)return;Q=!0;const ee={id:Y,role:"assistant",parts:[],createdAt:new Date};s(m=>[...m,ee])};s(ee=>[...ee,O]),h(!0),g(!0),y.current?.abort();const ae=new AbortController;y.current=ae;try{const ee=vr([...M,O],o??Number.POSITIVE_INFINITY),m=e.sendMessage({messages:Pn(ee),context:t});await qt(m,te=>{switch(g(!1),te.type){case"text":d(),D(te.text);break;case"part":d(),L(te.part);break;case"error":d(),L({type:"error",message:te.message}),S(te.message);break;case"done":break}},ae.signal)}catch(ee){const m=ee instanceof Error?ee.message:"Unknown error occurred";S(m),d(),L({type:"error",message:m})}finally{_.current=!0,h(!1),g(!1)}},[e,t,o,D,L]),N=q.useCallback(async()=>{const v=u.trim();!v||c||(f(""),await b(v,a))},[u,c,a,b]),U=q.useCallback(async v=>{!v.trim()||c||await b(v,a)},[c,a,b]),H=q.useCallback(async v=>{if(c)return;S(null),h(!0),g(!0);const M={id:ct(),role:"assistant",parts:[],createdAt:new Date};s(Q=>[...Q,M]),y.current?.abort();const O=new AbortController;y.current=O;const Y={id:ct(),role:"system",parts:[{type:"text",text:v}],createdAt:new Date};try{const Q=e.sendMessage({messages:Pn([Y]),context:t});await qt(Q,d=>{switch(g(!1),d.type){case"text":D(d.text);break;case"part":L(d.part);break;case"error":L({type:"error",message:d.message}),S(d.message);break;case"done":break}},O.signal)}catch(Q){const d=Q instanceof Error?Q.message:"Unknown error occurred";S(d),L({type:"error",message:d})}finally{_.current=!0,h(!1),g(!1)}},[c,e,t,D,L]),k=q.useCallback(()=>{y.current?.abort(),h(!1),g(!1)},[]),z=q.useCallback(v=>{y.current?.abort(),_.current=!0,s(v??[]),f(""),S(null),h(!1),g(!1)},[]),T=q.useCallback((v,M)=>{_.current=!0,s(O=>O.map(Y=>({...Y,parts:Y.parts.map(Q=>rn(Q)&&Q.proposal.id===v?{...Q,proposal:{...Q.proposal,resolved:M}}:Q)})))},[]),W=q.useCallback((v,M)=>{T(v,"confirmed"),n?.(v,M)},[n,T]),P=q.useCallback(v=>{T(v,"cancelled"),r?.(v)},[r,T]);return{messages:a,input:u,setInput:f,sendMessage:N,sendMessageWithText:U,sendGreeting:H,stop:k,isLoading:c,isConnecting:p,error:C,reset:z,confirmProposal:W,cancelProposal:P}}const ln={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",proposalConfirmed:"Confirmed",proposalCancelled:"Cancelled",proposalExpired:"No longer available",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules",historyEmpty:"No previous chats",historyDeleteChat:"Delete chat"},_r=q.createContext(ln);function Ee(){return q.useContext(_r)}const kl="_root_1etc2_1",bl={root:kl};function wl({children:e,theme:t,labels:n,defaultTitle:r,className:i,style:o}){const l={...ln,...r?{sidebarTitle:r}:{},...n},a=t?Cl(t):void 0;return x.jsx(_r.Provider,{value:l,children:x.jsx("div",{className:[bl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function Cl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const on=q.createContext(null);function Ir(){const e=q.useContext(on);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function Sl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l,children:a}){const[s,u]=q.useState(t),f=q.useCallback(h=>{u(h)},[]),c=Er({adapter:e,context:s,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l});return x.jsx(on.Provider,{value:{...c,setContext:f},children:a})}const vl={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",proposalConfirmed:"Potvrzeno",proposalCancelled:"Zrušeno",proposalExpired:"Již není k dispozici",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla",historyEmpty:"Žádné předchozí konverzace",historyDeleteChat:"Smazat konverzaci"};function Tr({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function Al({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function El({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function _l({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function Il({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function Tl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function zl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function Pl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function Ll({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function jl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function Dl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ml=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fl={};function Ln(e,t){return(Fl.jsx?Rl:Ml).test(e)}const Nl=/[ \t\n\f\r]/g;function Ol(e){return typeof e=="object"?e.type==="text"?jn(e.value):!1:jn(e)}function jn(e){return e.replace(Nl,"")===""}class ot{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ot.prototype.normal={};ot.prototype.property={};ot.prototype.space=void 0;function zr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ot(n,r,t)}function Wt(e){return e.toLowerCase()}class ue{constructor(t,n){this.attribute=n,this.property=t}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let Bl=0;const R=Re(),K=Re(),Qt=Re(),E=Re(),J=Re(),De=Re(),fe=Re();function Re(){return 2**++Bl}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:K,commaOrSpaceSeparated:fe,commaSeparated:De,number:E,overloadedBoolean:Qt,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),It=Object.keys(Yt);class an extends ue{constructor(t,n,r,i){let o=-1;if(super(t,n),Dn(this,"space",i),typeof r=="number")for(;++o<It.length;){const l=It[o];Dn(this,It[o],(r&Yt[l])===Yt[l])}}}an.prototype.defined=!0;function Dn(e,t,n){n&&(e[t]=n)}function Ve(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new an(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Wt(r)]=r,n[Wt(o.attribute)]=r}return new ot(t,n,e.space)}const Pr=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:K,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:J,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:E,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:J,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:K,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Lr(e,t){return t in e?e[t]:t}function jr(e,t){return Lr(e,t.toLowerCase())}const $l=Ve({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:J,autoFocus:R,autoPlay:R,blocking:J,capture:null,charSet:null,checked:R,cite:null,className:J,closedBy:null,colorSpace:null,cols:E,colSpan:E,command:null,commandFor:null,content:null,contentEditable:K,controls:R,controlsList:J,coords:E|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Qt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:J,height:E,hidden:Qt,high:E,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:J,itemRef:J,itemScope:R,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:E,pattern:null,ping:J,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:J,required:R,reversed:R,rows:E,rowSpan:E,sandbox:J,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:K,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:De,part:J,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:jr}),Hl=Ve({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fe,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:J,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lr}),Dr=Ve({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()}}),Mr=Ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Rr=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vl={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"},Ul=/[A-Z]/g,Mn=/-[a-z]/g,ql=/^data[-\w.:]+$/i;function Wl(e,t){const n=Wt(t);let r=t,i=ue;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ql.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Mn,Yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Mn.test(o)){let l=o.replace(Ul,Ql);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=an}return new i(r,t)}function Ql(e){return"-"+e.toLowerCase()}function Yl(e){return e.charAt(1).toUpperCase()}const Xl=zr([Pr,$l,Dr,Mr,Rr],"html"),sn=zr([Pr,Hl,Dr,Mr,Rr],"svg");function Jl(e){return e.join(" ").trim()}function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be={},Tt,Rn;function Gl(){if(Rn)return Tt;Rn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
23
+ `);i=a.pop()??"";for(const s of a){const u=s.trim();if(!u)continue;const f=t(u);for(const c of f)if(yield c,c.type==="done"||c.type==="error")return}}if(i.trim()){const o=t(i.trim());for(const l of o)if(yield l,l.type==="done"||l.type==="error")return}}finally{n.releaseLock()}yield{type:"done"}}const yl=e=>{const t=Ar(e);return t.length>0?t:e?[{type:"text",text:e}]:[]};let xl=0;const ct=()=>`msg-${++xl}-${Date.now()}`,Pn=Cr;function Er({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l}){const[a,s]=q.useState(i??[]),[u,f]=q.useState(""),[c,h]=q.useState(!1),[p,g]=q.useState(!1),[C,S]=q.useState(null),y=q.useRef(null),_=q.useRef(!1),A=q.useRef(l);q.useEffect(()=>{A.current=l}),q.useEffect(()=>{!_.current||c||(_.current=!1,A.current?.(a))},[a,c]);const L=q.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;if(v.type==="activity"&&v.id){const Y=[...O.parts],Q=Y.findIndex(d=>d.type==="activity"&&d.id===v.id);if(Q!==-1)return Y[Q]=v,[...M.slice(0,-1),{...O,parts:Y}]}return[...M.slice(0,-1),{...O,parts:[...O.parts,v]}]})},[]),D=q.useCallback(v=>{s(M=>{const O=M[M.length-1];if(!O||O.role!=="assistant")return M;const Y=[...O.parts],Q=Y[Y.length-1];return Q?.type==="text"?Y[Y.length-1]={type:"text",text:Q.text+v}:Y.push({type:"text",text:v}),[...M.slice(0,-1),{...O,parts:Y}]})},[]),b=q.useCallback(async(v,M)=>{S(null);const O={id:ct(),role:"user",parts:[{type:"text",text:v}],createdAt:new Date},Y=ct();let Q=!1;const d=()=>{if(Q)return;Q=!0;const ee={id:Y,role:"assistant",parts:[],createdAt:new Date};s(m=>[...m,ee])};s(ee=>[...ee,O]),h(!0),g(!0),y.current?.abort();const ae=new AbortController;y.current=ae;try{const ee=vr([...M,O],o??Number.POSITIVE_INFINITY),m=e.sendMessage({messages:Pn(ee),context:t});await qt(m,te=>{switch(g(!1),te.type){case"text":d(),D(te.text);break;case"part":d(),L(te.part);break;case"error":d(),L({type:"error",message:te.message}),S(te.message);break;case"done":break}},ae.signal)}catch(ee){const m=ee instanceof Error?ee.message:"Unknown error occurred";S(m),d(),L({type:"error",message:m})}finally{_.current=!0,h(!1),g(!1)}},[e,t,o,D,L]),N=q.useCallback(async()=>{const v=u.trim();!v||c||(f(""),await b(v,a))},[u,c,a,b]),U=q.useCallback(async v=>{!v.trim()||c||await b(v,a)},[c,a,b]),H=q.useCallback(async v=>{if(c)return;S(null),h(!0),g(!0);const M={id:ct(),role:"assistant",parts:[],createdAt:new Date};s(Q=>[...Q,M]),y.current?.abort();const O=new AbortController;y.current=O;const Y={id:ct(),role:"system",parts:[{type:"text",text:v}],createdAt:new Date};try{const Q=e.sendMessage({messages:Pn([Y]),context:t});await qt(Q,d=>{switch(g(!1),d.type){case"text":D(d.text);break;case"part":L(d.part);break;case"error":L({type:"error",message:d.message}),S(d.message);break;case"done":break}},O.signal)}catch(Q){const d=Q instanceof Error?Q.message:"Unknown error occurred";S(d),L({type:"error",message:d})}finally{_.current=!0,h(!1),g(!1)}},[c,e,t,D,L]),k=q.useCallback(()=>{y.current?.abort(),h(!1),g(!1)},[]),z=q.useCallback(v=>{y.current?.abort(),_.current=!0,s(v??[]),f(""),S(null),h(!1),g(!1)},[]),T=q.useCallback((v,M)=>{_.current=!0,s(O=>O.map(Y=>({...Y,parts:Y.parts.map(Q=>rn(Q)&&Q.proposal.id===v?{...Q,proposal:{...Q.proposal,resolved:M}}:Q)})))},[]),W=q.useCallback((v,M)=>{T(v,"confirmed"),n?.(v,M)},[n,T]),P=q.useCallback(v=>{T(v,"cancelled"),r?.(v)},[r,T]);return{messages:a,input:u,setInput:f,sendMessage:N,sendMessageWithText:U,sendGreeting:H,stop:k,isLoading:c,isConnecting:p,error:C,reset:z,confirmProposal:W,cancelProposal:P}}const ln={sidebarTitle:"AI Assistant",clearConversation:"Clear conversation",resetConversation:"Reset conversation",minimizeSidebar:"Minimize",expandSidebar:"Expand",userLabel:"You",inputPlaceholder:"Ask a question… (Enter to send)",sendMessage:"Send message",stopMessage:"Stop",typingMessage:"Assistant is typing",connectingMessage:"Connecting…",emptyStateText:"How can I help you today?",emptyStateHint:'Try: "Show me the data" or "Can you suggest something?"',proposalConfirm:"Confirm",proposalCancel:"Cancel",proposalConfirmed:"Confirmed",proposalCancelled:"Cancelled",proposalExpired:"No longer available",errorDismiss:"Dismiss",actionAddFile:"Add file",actionQuickActions:"Quick actions",actionNew:"New",actionHistory:"History",actionRules:"Rules",historyEmpty:"No previous chats",historyDeleteChat:"Delete chat"},_r=q.createContext(ln);function Ee(){return q.useContext(_r)}const kl="_root_1etc2_1",bl={root:kl};function wl({children:e,theme:t,labels:n,defaultTitle:r,className:i,style:o}){const l={...ln,...r?{sidebarTitle:r}:{},...n},a=t?Cl(t):void 0;return x.jsx(_r.Provider,{value:l,children:x.jsx("div",{className:[bl.root,i].filter(Boolean).join(" "),style:{...a,...o},children:e})})}function Cl(e){const t={"--juneau-color-primary":e.colorPrimary,"--juneau-color-primary-dark":e.colorPrimaryDark,"--juneau-color-primary-light":e.colorPrimaryLight,"--juneau-color-primary-border":e.colorPrimaryBorder,"--juneau-color-accent":e.colorAccent,"--juneau-color-accent-dark":e.colorAccentDark,"--juneau-color-accent-light":e.colorAccentLight,"--juneau-color-accent-border":e.colorAccentBorder,"--juneau-color-surface":e.colorSurface,"--juneau-color-surface-raised":e.colorSurfaceRaised,"--juneau-color-surface-hover":e.colorSurfaceHover,"--juneau-color-border":e.colorBorder,"--juneau-color-border-subtle":e.colorBorderSubtle,"--juneau-color-text-primary":e.colorTextPrimary,"--juneau-color-text-secondary":e.colorTextSecondary,"--juneau-color-text-muted":e.colorTextMuted,"--juneau-color-text-faint":e.colorTextFaint,"--juneau-color-text-inverse":e.colorTextInverse,"--juneau-color-assistant-avatar":e.colorAssistantAvatar,"--juneau-radius-sm":e.radiusSm,"--juneau-radius-md":e.radiusMd,"--juneau-radius-lg":e.radiusLg,"--juneau-font-family":e.fontFamily};return Object.fromEntries(Object.entries(t).filter(([,n])=>n!==void 0))}const on=q.createContext(null);function Ir(){const e=q.useContext(on);if(!e)throw new Error("useAiChatContext must be used inside <AiChatProvider>. Wrap your app (or layout) with <AiChatProvider adapter={...}>.");return e}function Sl({adapter:e,context:t,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l,children:a}){const[s,u]=q.useState(t),f=q.useCallback(h=>{u(typeof h=="function"?p=>h(p):h)},[]),c=Er({adapter:e,context:s,onProposalConfirm:n,onProposalCancel:r,initialMessages:i,historyLimit:o,onMessagesChange:l});return x.jsx(on.Provider,{value:{...c,setContext:f},children:a})}const vl={sidebarTitle:"AI Asistent",clearConversation:"Vymazat konverzaci",resetConversation:"Resetovat konverzaci",minimizeSidebar:"Minimalizovat",expandSidebar:"Rozbalit",userLabel:"Vy",inputPlaceholder:"Zeptejte se na cokoliv… (Enter pro odeslání)",sendMessage:"Odeslat zprávu",stopMessage:"Zastavit",typingMessage:"Asistent píše",connectingMessage:"Připojování…",emptyStateText:"Jak vám mohu dnes pomoci?",emptyStateHint:'Zkuste: „Ukáž mi data" nebo „Máš nějaký návrh?"',proposalConfirm:"Potvrdit",proposalCancel:"Zrušit",proposalConfirmed:"Potvrzeno",proposalCancelled:"Zrušeno",proposalExpired:"Již není k dispozici",errorDismiss:"Zavřít",actionAddFile:"Přidat soubor",actionQuickActions:"Rychlé akce",actionNew:"Nový",actionHistory:"Historie",actionRules:"Pravidla",historyEmpty:"Žádné předchozí konverzace",historyDeleteChat:"Smazat konverzaci"};function Tr({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M456 0c-48.6 0-88 39.4-88 88l0 29.2L12.5 390.6c-14 10.8-16.6 30.9-5.9 44.9s30.9 16.6 44.9 5.9L126.1 384l133.1 0 46.6 113.1c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3L311.1 384l40.9 0c1.1 0 2.1 0 3.2 0l46.6 113.2c5 12.3 19.1 18.1 31.3 13.1s18.1-19.1 13.1-31.3l-42-102C484.9 354.1 544 280 544 192l0-64 0-8 80.5-20.1c8.6-2.1 13.8-10.8 11.6-19.4C629 52 603.4 32 574 32l-50.1 0C507.7 12.5 483.3 0 456 0zm0 64a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"})})}function Al({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s6.2-22.8 16.4-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})})}function El({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M364.2 83.8c-24.4-24.4-64-24.4-88.4 0l-184 184c-42.1 42.1-42.1 110.3 0 152.4s110.3 42.1 152.4 0l152-152c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-152 152c-64 64-167.6 64-231.6 0s-64-167.6 0-231.6l184-184c46.3-46.3 121.3-46.3 167.6 0s46.3 121.3 0 167.6l-176 176c-28.6 28.6-75 28.6-103.6 0s-28.6-75 0-103.6l144-144c10.9-10.9 28.7-10.9 39.6 0s10.9 28.7 0 39.6l-144 144c-6.7 6.7-6.7 17.7 0 24.4s17.7 6.7 24.4 0l176-176c24.4-24.4 24.4-64 0-88.4z"})})}function _l({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"})})}function Il({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"})})}function Tl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M75 75L41 41C25.9 25.9 0 36.6 0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-31.8-31.8C143.9 83.5 196.2 64 252.6 64C370.8 64 464 157.8 464 276c0 77.5-40.8 145.4-102 182.9c-15.1 9.2-19.9 29-10.7 44.1s29 19.9 44.1 10.7C471 467.5 528 378.4 528 276C528 124.1 404.5 0 252.6 0C186 0 125.3 26.4 80 70.2L75 75zM256 152c-13.3 0-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1c0-13.3-10.7-24-24-24z"})})}function zl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 192 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-26.6 0c-25.8 50.9-72.7 88.5-129.4 99.8L384 416l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0 0-72.2C135.3 332.5 88.4 294.9 62.6 244L48 244c-26.5 0-48-21.5-48-48L0 80zM128 240c0 70.7 57.3 128 128 128s128-57.3 128-128l0-128L128 112l0 128zM512 176l0-64-64 0 0 64-48 0 0 16c0 8.8-.7 17.4-2 25.8c3.3 .1 6.6 .2 9.9 .2l56 0c26.5 0 48-21.5 48-48l0-64zM48 176c0 26.5 21.5 48 48 48l56 0c3.4 0 6.7-.1 9.9-.2c-1.3-8.4-2-17-2-25.8l0-16-48 0 0-64-64 0 0 58z"})})}function Pl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l448 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416z"})})}function Ll({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{d:"M432 64L208 64c-8.8 0-16 7.2-16 16l0 16-64 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-64 16 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192zm64 32c0 17.7 14.3 32 32 32l192 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 192c-17.7 0-32 14.3-32 32z"})})}function jl({className:e,style:t,"aria-hidden":n=!0}){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",width:"1em",height:"1em",fill:"currentColor",className:e,style:t,"aria-hidden":n,children:x.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})})}function Dl(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ml=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fl={};function Ln(e,t){return(Fl.jsx?Rl:Ml).test(e)}const Nl=/[ \t\n\f\r]/g;function Ol(e){return typeof e=="object"?e.type==="text"?jn(e.value):!1:jn(e)}function jn(e){return e.replace(Nl,"")===""}class ot{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ot.prototype.normal={};ot.prototype.property={};ot.prototype.space=void 0;function zr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ot(n,r,t)}function Wt(e){return e.toLowerCase()}class ue{constructor(t,n){this.attribute=n,this.property=t}}ue.prototype.attribute="";ue.prototype.booleanish=!1;ue.prototype.boolean=!1;ue.prototype.commaOrSpaceSeparated=!1;ue.prototype.commaSeparated=!1;ue.prototype.defined=!1;ue.prototype.mustUseProperty=!1;ue.prototype.number=!1;ue.prototype.overloadedBoolean=!1;ue.prototype.property="";ue.prototype.spaceSeparated=!1;ue.prototype.space=void 0;let Bl=0;const R=Re(),K=Re(),Qt=Re(),E=Re(),J=Re(),De=Re(),fe=Re();function Re(){return 2**++Bl}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:R,booleanish:K,commaOrSpaceSeparated:fe,commaSeparated:De,number:E,overloadedBoolean:Qt,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),It=Object.keys(Yt);class an extends ue{constructor(t,n,r,i){let o=-1;if(super(t,n),Dn(this,"space",i),typeof r=="number")for(;++o<It.length;){const l=It[o];Dn(this,It[o],(r&Yt[l])===Yt[l])}}}an.prototype.defined=!0;function Dn(e,t,n){n&&(e[t]=n)}function Ve(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new an(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Wt(r)]=r,n[Wt(o.attribute)]=r}return new ot(t,n,e.space)}const Pr=Ve({properties:{ariaActiveDescendant:null,ariaAtomic:K,ariaAutoComplete:null,ariaBusy:K,ariaChecked:K,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:K,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:K,ariaFlowTo:J,ariaGrabbed:K,ariaHasPopup:null,ariaHidden:K,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:E,ariaLive:null,ariaModal:K,ariaMultiLine:K,ariaMultiSelectable:K,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:K,ariaReadOnly:K,ariaRelevant:null,ariaRequired:K,ariaRoleDescription:J,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:K,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Lr(e,t){return t in e?e[t]:t}function jr(e,t){return Lr(e,t.toLowerCase())}const $l=Ve({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:De,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alpha:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:J,autoFocus:R,autoPlay:R,blocking:J,capture:null,charSet:null,checked:R,cite:null,className:J,closedBy:null,colorSpace:null,cols:E,colSpan:E,command:null,commandFor:null,content:null,contentEditable:K,controls:R,controlsList:J,coords:E|De,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Qt,draggable:K,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:J,height:E,hidden:Qt,high:E,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:J,itemRef:J,itemScope:R,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,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:R,optimum:E,pattern:null,ping:J,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:J,required:R,reversed:R,rows:E,rowSpan:E,sandbox:J,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootCustomElementRegistry:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shadowRootSerializable:R,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:K,src:null,srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:K,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:K,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:R,disablePictureInPicture:R,disableRemotePlayback:R,exportParts:De,part:J,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:jr}),Hl=Ve({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fe,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:J,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:De,g2:De,glyphName:De,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:E,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:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fe,rev:fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fe,requiredFeatures:fe,requiredFonts:fe,requiredFormats:fe,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fe,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lr}),Dr=Ve({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()}}),Mr=Ve({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jr}),Rr=Ve({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vl={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"},Ul=/[A-Z]/g,Mn=/-[a-z]/g,ql=/^data[-\w.:]+$/i;function Wl(e,t){const n=Wt(t);let r=t,i=ue;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ql.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Mn,Yl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Mn.test(o)){let l=o.replace(Ul,Ql);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=an}return new i(r,t)}function Ql(e){return"-"+e.toLowerCase()}function Yl(e){return e.charAt(1).toUpperCase()}const Xl=zr([Pr,$l,Dr,Mr,Rr],"html"),sn=zr([Pr,Hl,Dr,Mr,Rr],"svg");function Jl(e){return e.join(" ").trim()}function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Be={},Tt,Rn;function Gl(){if(Rn)return Tt;Rn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
24
24
  `,u="/",f="*",c="",h="comment",p="declaration";function g(S,y){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];y=y||{};var _=1,A=1;function L(P){var v=P.match(t);v&&(_+=v.length);var M=P.lastIndexOf(s);A=~M?P.length-M:A+P.length}function D(){var P={line:_,column:A};return function(v){return v.position=new b(P),H(),v}}function b(P){this.start=P,this.end={line:_,column:A},this.source=y.source}b.prototype.content=S;function N(P){var v=new Error(y.source+":"+_+":"+A+": "+P);if(v.reason=P,v.filename=y.source,v.line=_,v.column=A,v.source=S,!y.silent)throw v}function U(P){var v=P.exec(S);if(v){var M=v[0];return L(M),S=S.slice(M.length),v}}function H(){U(n)}function k(P){var v;for(P=P||[];v=z();)v!==!1&&P.push(v);return P}function z(){var P=D();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var v=2;c!=S.charAt(v)&&(f!=S.charAt(v)||u!=S.charAt(v+1));)++v;if(v+=2,c===S.charAt(v-1))return N("End of comment missing");var M=S.slice(2,v-2);return A+=2,L(M),S=S.slice(v),A+=2,P({type:h,comment:M})}}function T(){var P=D(),v=U(r);if(v){if(z(),!U(i))return N("property missing ':'");var M=U(o),O=P({type:p,property:C(v[0].replace(e,c)),value:M?C(M[0].replace(e,c)):c});return U(l),O}}function W(){var P=[];k(P);for(var v;v=T();)v!==!1&&(P.push(v),k(P));return P}return H(),W()}function C(S){return S?S.replace(a,c):c}return Tt=g,Tt}var Fn;function Kl(){if(Fn)return Be;Fn=1;var e=Be&&Be.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Be,"__esModule",{value:!0}),Be.default=n;const t=e(Gl());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Be}var Ye={},Nn;function Zl(){if(Nn)return Ye;Nn=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ye.camelCase=s,Ye}var Xe,On;function eo(){if(On)return Xe;On=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Kl()),n=Zl();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Xe=r,Xe}var to=eo();const no=Fr(to),Nr=Or("end"),un=Or("start");function Or(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 ro(e){const t=un(e),n=Nr(e);if(t&&n)return{start:t,end:n}}function tt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?Xt(e):""}function Xt(e){return $n(e&&e.line)+":"+$n(e&&e.column)}function Bn(e){return Xt(e&&e.start)+"-"+Xt(e&&e.end)}function $n(e){return e&&typeof e=="number"?e:1}class le extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=tt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}le.prototype.file="";le.prototype.name="";le.prototype.reason="";le.prototype.message="";le.prototype.stack="";le.prototype.column=void 0;le.prototype.line=void 0;le.prototype.ancestors=void 0;le.prototype.cause=void 0;le.prototype.fatal=void 0;le.prototype.place=void 0;le.prototype.ruleId=void 0;le.prototype.source=void 0;const cn={}.hasOwnProperty,io=new Map,lo=/[A-Z]/g,oo=new Set(["table","tbody","thead","tfoot","tr"]),ao=new Set(["td","th"]),Br="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function so(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=yo(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=go(n,t.jsx,t.jsxs)}const i={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"?sn:Xl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=$r(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function $r(e,t,n){if(t.type==="element")return uo(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return co(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return po(e,t,n);if(t.type==="mdxjsEsm")return fo(e,t);if(t.type==="root")return ho(e,t,n);if(t.type==="text")return mo(e,t)}function uo(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=sn,e.schema=i),e.ancestors.push(t);const o=Vr(e,t.tagName,!1),l=xo(e,t);let a=pn(e,t);return oo.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Ol(s):!0})),Hr(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function co(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)}it(e,t.position)}function fo(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);it(e,t.position)}function po(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=sn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Vr(e,t.name,!0),l=ko(e,t),a=pn(e,t);return Hr(e,l,o,t),fn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function ho(e,t,n){const r={};return fn(r,pn(e,t)),e.create(t,e.Fragment,r,n)}function mo(e,t){return t.value}function Hr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function go(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function yo(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=un(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function xo(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&cn.call(t.properties,i)){const o=bo(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ao.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ko(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else it(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else it(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:io;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=$r(e,o,l);a!==void 0&&n.push(a)}return n}function bo(e,t,n){const r=Wl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Dl(n):Jl(n)),r.property==="style"){let i=typeof n=="object"?n:wo(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Co(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Vl[r.property]||r.property:r.attribute,n]}}function wo(e,t){try{return no(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new le("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Br+"#cannot-parse-style-attribute",i}}function Vr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Ln(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Ln(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return cn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);it(e)}function it(e,t){const n=new le("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=Br+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Co(e){const t={};let n;for(n in e)cn.call(e,n)&&(t[So(n)]=e[n]);return t}function So(e){let t=e.replace(lo,vo);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vo(e){return"-"+e.toLowerCase()}const zt={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"]},Ao={};function hn(e,t){const n=Ao,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ur(e,r,i)}function Ur(e,t,n){if(Eo(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 Hn(e.children,t,n)}return Array.isArray(e)?Hn(e,t,n):""}function Hn(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ur(e[i],t,n);return r.join("")}function Eo(e){return!!(e&&typeof e=="object")}const Vn=document.createElement("i");function dn(e){const t="&"+e+";";Vn.innerHTML=t;const n=Vn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function pe(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function he(e,t){return e.length>0?(pe(e,e.length,0,t),e):t}const Un={}.hasOwnProperty;function qr(e){const t={};let n=-1;for(;++n<e.length;)_o(t,e[n]);return t}function _o(e,t){let n;for(n in t){const i=(Un.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Un.call(i,l)||(i[l]=[]);const a=o[l];Io(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Io(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);pe(e,0,0,r)}function Wr(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 ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const oe=_e(/[A-Za-z]/),ie=_e(/[\dA-Za-z]/),To=_e(/[#-'*+\--9=?A-Z^-~]/);function kt(e){return e!==null&&(e<32||e===127)}const Jt=_e(/\d/),zo=_e(/[\dA-Fa-f]/),Po=_e(/[!-/:-@[-`{-~]/);function j(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const St=_e(/\p{P}|\p{S}/u),Me=_e(/\s/);function _e(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ue(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&ie(e.charCodeAt(n+1))&&ie(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function V(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(n),a(s)):t(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const Lo={tokenize:jo};function jo(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),V(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return j(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Do={tokenize:Mo},qn={tokenize:Ro};function Mo(e){const t=this,n=[];let r=0,i,o,l;return a;function a(A){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,s,u)(A)}return u(A)}function s(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const L=t.events.length;let D=L,b;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){b=t.events[D][1].end;break}y(r);let N=L;for(;N<t.events.length;)t.events[N][1].end={...b},N++;return pe(t.events,D+1,0,t.events.slice(L)),t.events.length=N,u(A)}return a(A)}function u(A){if(r===n.length){if(!i)return h(A);if(i.currentConstruct&&i.currentConstruct.concrete)return g(A);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qn,f,c)(A)}function f(A){return i&&_(),y(r),h(A)}function c(A){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(A)}function h(A){return t.containerState={},e.attempt(qn,p,g)(A)}function p(A){return r++,n.push([t.currentConstruct,t.containerState]),h(A)}function g(A){if(A===null){i&&_(),y(0),e.consume(A);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),C(A)}function C(A){if(A===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(A);return}return j(A)?(e.consume(A),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(A),C)}function S(A,L){const D=t.sliceStream(A);if(L&&D.push(null),A.previous=o,o&&(o.next=A),o=A,i.defineSkip(A.start),i.write(D),t.parser.lazy[A.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<l&&(!i.events[b][1].end||i.events[b][1].end.offset>l))return;const N=t.events.length;let U=N,H,k;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(H){k=t.events[U][1].end;break}H=!0}for(y(r),b=N;b<t.events.length;)t.events[b][1].end={...k},b++;pe(t.events,U+1,0,t.events.slice(N)),t.events.length=b}}function y(A){let L=n.length;for(;L-- >A;){const D=n[L];t.containerState=D[1],D[0].exit.call(t,e)}n.length=A}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ro(e,t,n){return V(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function He(e){if(e===null||G(e)||Me(e))return 1;if(St(e))return 2}function vt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Gt={name:"attention",resolveAll:Fo,tokenize:No};function Fo(e,t){let n=-1,r,i,o,l,a,s,u,f;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;s=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},h={...e[n][1].start};Wn(c,-s),Wn(h,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=he(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=he(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=he(u,vt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=he(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=he(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,pe(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function No(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=He(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=He(s),c=!f||f===2&&i||n.includes(s),h=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!h)),u._close=!!(o===42?h:h&&(f||!c)),t(s)}}function Wn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Oo={name:"autolink",tokenize:Bo};function Bo(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return oe(p)?(e.consume(p),l):p===64?n(p):u(p)}function l(p){return p===43||p===45||p===46||ie(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(e.consume(p),r=0,s):(p===43||p===45||p===46||ie(p))&&r++<32?(e.consume(p),a):(r=0,u(p))}function s(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||kt(p)?n(p):(e.consume(p),s)}function u(p){return p===64?(e.consume(p),f):To(p)?(e.consume(p),u):n(p)}function f(p){return ie(p)?c(p):n(p)}function c(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||ie(p))&&r++<63){const g=p===45?h:c;return e.consume(p),g}return n(p)}}const at={partial:!0,tokenize:$o};function $o(e,t,n){return r;function r(o){return B(o)?V(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||j(o)?t(o):n(o)}}const Qr={continuation:{tokenize:Vo},exit:Uo,name:"blockQuote",tokenize:Ho};function Ho(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Vo(e,t,n){const r=this;return i;function i(l){return B(l)?V(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Qr,t,n)(l)}}function Uo(e){e.exit("blockQuote")}const Yr={name:"characterEscape",tokenize:qo};function qo(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Po(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Xr={name:"characterReference",tokenize:Wo};function Wo(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=ie,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=zo,f):(e.enter("characterReferenceValue"),o=7,l=Jt,f(c))}function f(c){if(c===59&&i){const h=e.exit("characterReferenceValue");return l===ie&&!dn(r.sliceSerialize(h))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Qn={partial:!0,tokenize:Yo},Yn={concrete:!0,name:"codeFenced",tokenize:Qo};function Qo(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(b){return u(b)}function u(b){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===a?(l++,e.consume(b),f):l<3?n(b):(e.exit("codeFencedFenceSequence"),B(b)?V(e,c,"whitespace")(b):c(b))}function c(b){return b===null||j(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(Qn,C,L)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):B(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,p,"whitespace")(b)):b===96&&b===a?n(b):(e.consume(b),h)}function p(b){return b===null||j(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===a?n(b):(e.consume(b),g)}function C(b){return e.attempt(i,L,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return o>0&&B(b)?V(e,_,"linePrefix",o+1)(b):_(b)}function _(b){return b===null||j(b)?e.check(Qn,C,L)(b):(e.enter("codeFlowValue"),A(b))}function A(b){return b===null||j(b)?(e.exit("codeFlowValue"),_(b)):(e.consume(b),A)}function L(b){return e.exit("codeFenced"),t(b)}function D(b,N,U){let H=0;return k;function k(v){return b.enter("lineEnding"),b.consume(v),b.exit("lineEnding"),z}function z(v){return b.enter("codeFencedFence"),B(v)?V(b,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):T(v)}function T(v){return v===a?(b.enter("codeFencedFenceSequence"),W(v)):U(v)}function W(v){return v===a?(H++,b.consume(v),W):H>=l?(b.exit("codeFencedFenceSequence"),B(v)?V(b,P,"whitespace")(v):P(v)):U(v)}function P(v){return v===null||j(v)?(b.exit("codeFencedFence"),N(v)):U(v)}}}function Yo(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Pt={name:"codeIndented",tokenize:Jo},Xo={partial:!0,tokenize:Go};function Jo(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),V(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):j(u)?e.attempt(Xo,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||j(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function Go(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):j(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):V(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):j(l)?i(l):n(l)}}const Ko={name:"codeText",previous:ea,resolve:Zo,tokenize:ta};function Zo(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ea(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ta(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):j(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||j(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class na{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 i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Je(this.left,r),o.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),Je(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Je(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);Je(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Je(this.left,n.reverse())}}}function Je(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 Jr(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new na(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ra(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return pe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function ra(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,h=-1,p=n,g=0,C=0;const S=[C];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),c&&l.defineSkip(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(C=h+1,S.push(C),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const y=a.slice(S[h],S[h+1]),_=o.pop();s.push([_,_+y.length-1]),e.splice(_,2,y)}for(s.reverse(),h=-1;++h<s.length;)u[g+s[h][0]]=g+s[h][1],g+=s[h][1]-s[h][0]-1;return u}const ia={resolve:oa,tokenize:aa},la={partial:!0,tokenize:sa};function oa(e){return Jr(e),e}function aa(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):j(a)?e.check(la,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function sa(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,o,"linePrefix")}function o(l){if(l===null||j(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Gr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||kt(y)?n(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),C(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||j(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function C(y){return!f&&(y===null||y===41||G(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,C):y===41?(e.consume(y),f--,C):y===null||y===32||y===40||kt(y)?n(y):(e.consume(y),y===92?S:C)}function S(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function Kr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return a>999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):j(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===null||p===91||p===93||j(p)||a++>999?(e.exit("chunkString"),f(p)):(e.consume(p),s||(s=!B(p)),p===92?h:c)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,c):c(p)}}function Zr(e,t,n,r,i,o){let l;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),l=h===40?41:h,s):n(h)}function s(h){return h===l?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===l?(e.exit(o),s(l)):h===null?n(h):j(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),V(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===l||h===null||j(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?c:f)}function c(h){return h===l||h===92?(e.consume(h),f):f(h)}}function nt(e,t){let n;return r;function r(i){return j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):B(i)?V(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ua={name:"definition",tokenize:fa},ca={partial:!0,tokenize:pa};function fa(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),l(p)}function l(p){return Kr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return G(p)?nt(e,u)(p):u(p)}function u(p){return Gr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(ca,c,c)(p)}function c(p){return B(p)?V(e,h,"whitespace")(p):h(p)}function h(p){return p===null||j(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function pa(e,t,n){return r;function r(a){return G(a)?nt(e,i)(a):n(a)}function i(a){return Zr(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?V(e,l,"whitespace")(a):l(a)}function l(a){return a===null||j(a)?t(a):n(a)}}const ha={name:"hardBreakEscape",tokenize:da};function da(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return j(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ma={name:"headingAtx",resolve:ga,tokenize:ya};function ga(e,t){let n=e.length-2,r=3,i,o;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&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},pe(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function ya(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||G(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||j(f)?(e.exit("atxHeading"),t(f)):B(f)?V(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||G(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const xa=["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"],Xn=["pre","script","style","textarea"],ka={concrete:!0,name:"htmlFlow",resolveTo:Ca,tokenize:Sa},ba={partial:!0,tokenize:Aa},wa={partial:!0,tokenize:va};function Ca(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 Sa(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),h):m===47?(e.consume(m),o=!0,C):m===63?(e.consume(m),i=3,r.interrupt?t:d):oe(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function h(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,g):oe(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function p(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const te="CDATA[";return m===te.charCodeAt(a++)?(e.consume(m),a===te.length?r.interrupt?t:T:g):n(m)}function C(m){return oe(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||G(m)){const te=m===47,Ie=l.toLowerCase();return!te&&!o&&Xn.includes(Ie)?(i=1,r.interrupt?t(m):T(m)):xa.includes(l.toLowerCase())?(i=6,te?(e.consume(m),y):r.interrupt?t(m):T(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?_(m):A(m))}return m===45||ie(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function y(m){return m===62?(e.consume(m),r.interrupt?t:T):n(m)}function _(m){return B(m)?(e.consume(m),_):k(m)}function A(m){return m===47?(e.consume(m),k):m===58||m===95||oe(m)?(e.consume(m),L):B(m)?(e.consume(m),A):k(m)}function L(m){return m===45||m===46||m===58||m===95||ie(m)?(e.consume(m),L):D(m)}function D(m){return m===61?(e.consume(m),b):B(m)?(e.consume(m),D):A(m)}function b(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),b):U(m)}function N(m){return m===s?(e.consume(m),s=null,H):m===null||j(m)?n(m):(e.consume(m),N)}function U(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||G(m)?D(m):(e.consume(m),U)}function H(m){return m===47||m===62||B(m)?A(m):n(m)}function k(m){return m===62?(e.consume(m),z):n(m)}function z(m){return m===null||j(m)?T(m):B(m)?(e.consume(m),z):n(m)}function T(m){return m===45&&i===2?(e.consume(m),M):m===60&&i===1?(e.consume(m),O):m===62&&i===4?(e.consume(m),ae):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),Q):j(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ba,ee,W)(m)):m===null||j(m)?(e.exit("htmlFlowData"),W(m)):(e.consume(m),T)}function W(m){return e.check(wa,P,ee)(m)}function P(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),v}function v(m){return m===null||j(m)?W(m):(e.enter("htmlFlowData"),T(m))}function M(m){return m===45?(e.consume(m),d):T(m)}function O(m){return m===47?(e.consume(m),l="",Y):T(m)}function Y(m){if(m===62){const te=l.toLowerCase();return Xn.includes(te)?(e.consume(m),ae):T(m)}return oe(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),Y):T(m)}function Q(m){return m===93?(e.consume(m),d):T(m)}function d(m){return m===62?(e.consume(m),ae):m===45&&i===2?(e.consume(m),d):T(m)}function ae(m){return m===null||j(m)?(e.exit("htmlFlowData"),ee(m)):(e.consume(m),ae)}function ee(m){return e.exit("htmlFlow"),t(m)}}function va(e,t,n){const r=this;return i;function i(l){return j(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Aa(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(at,t,n)}}const Ea={name:"htmlText",tokenize:_a};function _a(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),D):d===63?(e.consume(d),A):oe(d)?(e.consume(d),U):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):oe(d)?(e.consume(d),_):n(d)}function f(d){return d===45?(e.consume(d),p):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),h):j(d)?(l=c,O(d)):(e.consume(d),c)}function h(d){return d===45?(e.consume(d),p):c(d)}function p(d){return d===62?M(d):d===45?h(d):c(d)}function g(d){const ae="CDATA[";return d===ae.charCodeAt(o++)?(e.consume(d),o===ae.length?C:g):n(d)}function C(d){return d===null?n(d):d===93?(e.consume(d),S):j(d)?(l=C,O(d)):(e.consume(d),C)}function S(d){return d===93?(e.consume(d),y):C(d)}function y(d){return d===62?M(d):d===93?(e.consume(d),y):C(d)}function _(d){return d===null||d===62?M(d):j(d)?(l=_,O(d)):(e.consume(d),_)}function A(d){return d===null?n(d):d===63?(e.consume(d),L):j(d)?(l=A,O(d)):(e.consume(d),A)}function L(d){return d===62?M(d):A(d)}function D(d){return oe(d)?(e.consume(d),b):n(d)}function b(d){return d===45||ie(d)?(e.consume(d),b):N(d)}function N(d){return j(d)?(l=N,O(d)):B(d)?(e.consume(d),N):M(d)}function U(d){return d===45||ie(d)?(e.consume(d),U):d===47||d===62||G(d)?H(d):n(d)}function H(d){return d===47?(e.consume(d),M):d===58||d===95||oe(d)?(e.consume(d),k):j(d)?(l=H,O(d)):B(d)?(e.consume(d),H):M(d)}function k(d){return d===45||d===46||d===58||d===95||ie(d)?(e.consume(d),k):z(d)}function z(d){return d===61?(e.consume(d),T):j(d)?(l=z,O(d)):B(d)?(e.consume(d),z):H(d)}function T(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,W):j(d)?(l=T,O(d)):B(d)?(e.consume(d),T):(e.consume(d),P)}function W(d){return d===i?(e.consume(d),i=void 0,v):d===null?n(d):j(d)?(l=W,O(d)):(e.consume(d),W)}function P(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||G(d)?H(d):(e.consume(d),P)}function v(d){return d===47||d===62||G(d)?H(d):n(d)}function M(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function O(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Y}function Y(d){return B(d)?V(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):Q(d)}function Q(d){return e.enter("htmlTextData"),l(d)}}const mn={name:"labelEnd",resolveAll:Pa,resolveTo:La,tokenize:ja},Ia={tokenize:Da},Ta={tokenize:Ma},za={tokenize:Ra};function Pa(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&pe(e,0,e.length,n),e}function La(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=he(a,e.slice(o+1,o+r+3)),a=he(a,[["enter",f,t]]),a=he(a,vt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=he(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=he(a,e.slice(l+1)),a=he(a,[["exit",s,t]]),pe(e,o,e.length,a),e}function ja(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?c(h):(l=r.parser.defined.includes(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),s):n(h)}function s(h){return h===40?e.attempt(Ia,f,l?f:c)(h):h===91?e.attempt(Ta,f,l?u:c)(h):l?f(h):c(h)}function u(h){return e.attempt(za,f,c)(h)}function f(h){return t(h)}function c(h){return o._balanced=!0,n(h)}}function Da(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return G(c)?nt(e,o)(c):o(c)}function o(c){return c===41?f(c):Gr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?nt(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?Zr(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return G(c)?nt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Ma(e,t,n){const r=this;return i;function i(a){return Kr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Ra(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Fa={name:"labelStartImage",resolveAll:mn.resolveAll,tokenize:Na};function Na(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Oa={name:"labelStartLink",resolveAll:mn.resolveAll,tokenize:Ba};function Ba(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Lt={name:"lineEnding",tokenize:$a};function $a(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,t,"linePrefix")}}const xt={name:"thematicBreak",tokenize:Ha};function Ha(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||j(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?V(e,a,"whitespace")(u):a(u))}}const se={continuation:{tokenize:Wa},exit:Ya,name:"list",tokenize:qa},Va={partial:!0,tokenize:Xa},Ua={partial:!0,tokenize:Qa};function qa(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Jt(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(xt,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return Jt(p)&&++l<10?(e.consume(p),s):(!r.interrupt||l<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(at,r.interrupt?n:f,e.attempt(Va,h,c))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function c(p){return B(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Wa(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(at,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ua,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(se,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Qa(e,t,n){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Ya(e){e.exit(this.containerState.type)}function Xa(e,t,n){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Jn={name:"setextUnderline",resolveTo:Ja,tokenize:Ga};function Ja(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ga(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?V(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||j(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Ka={tokenize:Za};function Za(e){const t=this,n=e.attempt(at,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ia,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const es={resolveAll:ti()},ts=ei("string"),ns=ei("text");function ei(e){return{resolveAll:ti(e==="text"?rs:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let h=-1;if(c)for(;++h<c.length;){const p=c[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function ti(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function rs(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],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},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 is={42:se,43:se,45:se,48:se,49:se,50:se,51:se,52:se,53:se,54:se,55:se,56:se,57:se,62:Qr},ls={91:ua},os={[-2]:Pt,[-1]:Pt,32:Pt},as={35:ma,42:xt,45:[Jn,xt],60:ka,61:Jn,95:xt,96:Yn,126:Yn},ss={38:Xr,92:Yr},us={[-5]:Lt,[-4]:Lt,[-3]:Lt,33:Fa,38:Xr,42:Gt,60:[Oo,Ea],91:Oa,92:[ha,Yr],93:mn,95:Gt,96:Ko},cs={null:[Gt,es]},fs={null:[42,95]},ps={null:[]},hs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fs,contentInitial:ls,disable:ps,document:is,flow:as,flowInitial:os,insideSpan:cs,string:ss,text:us},Symbol.toStringTag,{value:"Module"}));function ds(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 i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(b),consume:_,enter:A,exit:L,interrupt:N(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:C,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(z){return l=he(l,z),S(),l[l.length-1]!==null?[]:(U(t,0),u.events=vt(o,u.events,u),u.events)}function h(z,T){return gs(p(z),T)}function p(z){return ms(l,z)}function g(){const{_bufferIndex:z,_index:T,line:W,column:P,offset:v}=r;return{_bufferIndex:z,_index:T,line:W,column:P,offset:v}}function C(z){i[z.line]=z.column,k()}function S(){let z;for(;r._index<l.length;){const T=l[r._index];if(typeof T=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<T.length;)y(T.charCodeAt(r._bufferIndex));else y(T)}}function y(z){f=f(z)}function _(z){j(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,k()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=z}function A(z,T){const W=T||{};return W.type=z,W.start=g(),u.events.push(["enter",W,u]),a.push(W),W}function L(z){const T=a.pop();return T.end=g(),u.events.push(["exit",T,u]),T}function D(z,T){U(z,T.from)}function b(z,T){T.restore()}function N(z,T){return W;function W(P,v,M){let O,Y,Q,d;return Array.isArray(P)?ee(P):"tokenize"in P?ee([P]):ae(P);function ae(ne){return qe;function qe(ve){const Fe=ve!==null&&ne[ve],Ne=ve!==null&&ne.null,ut=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return ee(ut)(ve)}}function ee(ne){return O=ne,Y=0,ne.length===0?M:m(ne[Y])}function m(ne){return qe;function qe(ve){return d=H(),Q=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?Ie():ne.tokenize.call(T?Object.assign(Object.create(u),T):u,s,te,Ie)(ve)}}function te(ne){return z(Q,d),v}function Ie(ne){return d.restore(),++Y<O.length?m(O[Y]):M}}}function U(z,T){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&pe(u.events,T,u.events.length-T,z.resolve(u.events.slice(T),u)),z.resolveTo&&(u.events=z.resolveTo(u.events,u))}function H(){const z=g(),T=u.previous,W=u.currentConstruct,P=u.events.length,v=Array.from(a);return{from:P,restore:M};function M(){r=z,u.previous=T,u.currentConstruct=W,u.events.length=P,a=v,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ms(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function gs(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
25
25
  `;break}case-3:{l=`\r
26
26
  `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function ys(e){const r={constructs:qr([hs,...(e||{}).extensions||[]]),content:i(Lo),defined:[],document:i(Do),flow:i(Ka),lazy:{},string:i(ts),text:i(ns)};return r;function i(o){return l;function l(a){return ds(r,o,a)}}}function xs(e){for(;!Jr(e););return e}const Gn=/[\0\t\n\r]/g;function ks(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Gn.lastIndex=c,u=Gn.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(c);break}if(p===10&&c===h&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<h&&(s.push(o.slice(c,h)),e+=h-c),p){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=h+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const bs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ws(e){return e.replace(bs,Cs)}function Cs(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Wr(n.slice(o?2:1),o?16:10)}return dn(n)||e}const ni={}.hasOwnProperty;function Ss(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),vs(n)(xs(ys(n).document().write(ks()(e,t,!0))))}function vs(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(In),autolinkProtocol:H,autolinkEmail:H,atxHeading:o(An),blockQuote:o(Ne),characterEscape:H,characterReference:H,codeFenced:o(ut),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(ut,l),codeText:o(Wi,l),codeTextData:H,data:H,codeFlowValue:H,definition:o(Qi),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Yi),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(_n,l),htmlFlowData:H,htmlText:o(_n,l),htmlTextData:H,image:o(Xi),label:l,link:o(In),listItem:o(Ji),listItemValue:h,listOrdered:o(Tn,c),listUnordered:o(Tn),paragraph:o(Gi),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(An),strong:o(Ki),thematicBreak:o(el)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Fe,autolinkProtocol:ve,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:ne,characterReference:qe,codeFenced:s(S),codeFencedFence:C,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:s(y),codeText:s(v),codeTextData:k,data:k,definition:s(),definitionDestinationString:L,definitionLabelString:_,definitionTitleString:A,emphasis:s(),hardBreakEscape:s(T),hardBreakTrailing:s(T),htmlFlow:s(W),htmlFlowData:k,htmlText:s(P),htmlTextData:k,image:s(O),label:Q,labelText:Y,lineEnding:z,link:s(M),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:te,resourceDestinationString:d,resourceTitleString:ae,resource:ee,setextHeading:s(U),setextHeadingLineSequence:N,setextHeadingText:b,strong:s(),thematicBreak:s()}};ri(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(w){let I={type:"root",children:[]};const F={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},$=[];let X=-1;for(;++X<w.length;)if(w[X][1].type==="listOrdered"||w[X][1].type==="listUnordered")if(w[X][0]==="enter")$.push(X);else{const de=$.pop();X=i(w,de,X)}for(X=-1;++X<w.length;){const de=t[w[X][0]];ni.call(de,w[X][1].type)&&de[w[X][1].type].call(Object.assign({sliceSerialize:w[X][2].sliceSerialize},F),w[X][1])}if(F.tokenStack.length>0){const de=F.tokenStack[F.tokenStack.length-1];(de[1]||Kn).call(F,void 0,de[0])}for(I.position={start:Ae(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:Ae(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},X=-1;++X<t.transforms.length;)I=t.transforms[X](I)||I;return I}function i(w,I,F){let $=I-1,X=-1,de=!1,Te,ke,We,Qe;for(;++$<=F;){const ce=w[$];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?X++:X--,Qe=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(Te&&!Qe&&!X&&!We&&(We=$),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!X&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||X===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(Te){let Oe=$;for(ke=void 0;Oe--;){const be=w[Oe];if(be[1].type==="lineEnding"||be[1].type==="lineEndingBlank"){if(be[0]==="exit")continue;ke&&(w[ke][1].type="lineEndingBlank",de=!0),be[1].type="lineEnding",ke=Oe}else if(!(be[1].type==="linePrefix"||be[1].type==="blockQuotePrefix"||be[1].type==="blockQuotePrefixWhitespace"||be[1].type==="blockQuoteMarker"||be[1].type==="listItemIndent"))break}We&&(!ke||We<ke)&&(Te._spread=!0),Te.end=Object.assign({},ke?w[ke][1].start:ce[1].end),w.splice(ke||$,0,["exit",Te,ce[2]]),$++,F++}if(ce[1].type==="listItemPrefix"){const Oe={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};Te=Oe,w.splice($,0,["enter",Oe,ce[2]]),$++,F++,We=void 0,Qe=!0}}}return w[I][1]._spread=de,F}function o(w,I){return F;function F($){a.call(this,w($),$),I&&I.call(this,$)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(w,I,F){this.stack[this.stack.length-1].children.push(w),this.stack.push(w),this.tokenStack.push([I,F||void 0]),w.position={start:Ae(I.start),end:void 0}}function s(w){return I;function I(F){w&&w.call(this,F),u.call(this,F)}}function u(w,I){const F=this.stack.pop(),$=this.tokenStack.pop();if($)$[0].type!==w.type&&(I?I.call(this,w,$[0]):($[1]||Kn).call(this,w,$[0]));else throw new Error("Cannot close `"+w.type+"` ("+tt({start:w.start,end:w.end})+"): it’s not open");F.position.end=Ae(w.end)}function f(){return hn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function h(w){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(w),10),this.data.expectingFirstListItemValue=void 0}}function p(){const w=this.resume(),I=this.stack[this.stack.length-1];I.lang=w}function g(){const w=this.resume(),I=this.stack[this.stack.length-1];I.meta=w}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w.replace(/(\r?\n|\r)$/g,"")}function _(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase()}function A(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function L(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function D(w){const I=this.stack[this.stack.length-1];if(!I.depth){const F=this.sliceSerialize(w).length;I.depth=F}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function N(w){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(w).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function H(w){const F=this.stack[this.stack.length-1].children;let $=F[F.length-1];(!$||$.type!=="text")&&($=Zi(),$.position={start:Ae(w.start),end:void 0},F.push($)),this.stack.push($)}function k(w){const I=this.stack.pop();I.value+=this.sliceSerialize(w),I.position.end=Ae(w.end)}function z(w){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=I.children[I.children.length-1];F.position.end=Ae(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(H.call(this,w),k.call(this,w))}function T(){this.data.atHardBreak=!0}function W(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function P(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function v(){const w=this.resume(),I=this.stack[this.stack.length-1];I.value=w}function M(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function O(){const w=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=I,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function Y(w){const I=this.sliceSerialize(w),F=this.stack[this.stack.length-2];F.label=ws(I),F.identifier=ge(I).toLowerCase()}function Q(){const w=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const $=w.children;F.children=$}else F.alt=I}function d(){const w=this.resume(),I=this.stack[this.stack.length-1];I.url=w}function ae(){const w=this.resume(),I=this.stack[this.stack.length-1];I.title=w}function ee(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function te(w){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function Ie(w){this.data.characterReferenceType=w.type}function ne(w){const I=this.sliceSerialize(w),F=this.data.characterReferenceType;let $;F?($=Wr(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$=dn(I);const X=this.stack[this.stack.length-1];X.value+=$}function qe(w){const I=this.stack.pop();I.position.end=Ae(w.end)}function ve(w){k.call(this,w);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(w)}function Fe(w){k.call(this,w);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(w)}function Ne(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function Wi(){return{type:"inlineCode",value:""}}function Qi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yi(){return{type:"emphasis",children:[]}}function An(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function _n(){return{type:"html",value:""}}function Xi(){return{type:"image",title:null,url:"",alt:null}}function In(){return{type:"link",title:null,url:"",children:[]}}function Tn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ji(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Gi(){return{type:"paragraph",children:[]}}function Ki(){return{type:"strong",children:[]}}function Zi(){return{type:"text",value:""}}function el(){return{type:"thematicBreak"}}}function Ae(e){return{line:e.line,column:e.column,offset:e.offset}}function ri(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ri(e,r):As(e,r)}}function As(e,t){let n;for(n in t)if(ni.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 Kn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tt({start:t.start,end:t.end})+") is still open")}function Es(e){const t=this;t.parser=n;function n(r){return Ss(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function _s(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 Is(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`