adminizer 5.0.0-build.8 → 5.1.0-build.24
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/assets/abnfDiagram-VCTEODGH-DFY3Pztx.js +1 -0
- package/assets/add-31tS-g4V.js +1 -0
- package/assets/add-group-Cf3zT7WE.js +1 -0
- package/assets/add-user-C62wOna-.js +1 -0
- package/assets/ai-assistant/agent.es.js +28464 -0
- package/assets/app-DPmI-MvN.css +1 -0
- package/assets/app-vdHbjOQX.js +138 -0
- package/assets/arc-DP4o1zz3.js +1 -0
- package/assets/architectureDiagram-5GKGNRK7-BjXW5Zu0.js +36 -0
- package/assets/asmcrypto-DZeQH0LC.js +1 -0
- package/assets/blockDiagram-I7D4REHJ-BUPnDwN0.js +129 -0
- package/assets/c4Diagram-7LVT6UL2-Cmb_dAhd.js +38 -0
- package/assets/{catalog-BEvJZYJP.js → catalog-C-y5rMaG.js} +3 -3
- package/assets/channel-CkJRUsq_.js +1 -0
- package/assets/chunk-2Q5K7J3B-CmS-dWwQ.js +1 -0
- package/assets/chunk-5VM5RSS4-Cqs2Ow64.js +15 -0
- package/assets/chunk-F27PBJKO-BoMCpJA1.js +1 -0
- package/assets/chunk-IMKFNOWR-DlDcPk1x.js +231 -0
- package/assets/chunk-JWPE2WC7-DzL_SU8s.js +1 -0
- package/assets/chunk-POPQ4Y6H-Cwq2-Vb8.js +1 -0
- package/assets/chunk-SVP7TREG-BfRHY5FU.js +88 -0
- package/assets/chunk-TICWLB2K-CRP7rHkW.js +206 -0
- package/assets/chunk-XXDRQBXY-Bg2jg-98.js +1 -0
- package/assets/classDiagram-ZZMXUADV-D4EF3HGj.js +1 -0
- package/assets/classDiagram-v2-VYDZK3BY-D4EF3HGj.js +1 -0
- package/assets/controls/ckeditor.es.js +9382 -9320
- package/assets/controls/handsontable.es.js +11971 -11938
- package/assets/controls/jsoneditor.es.js +10442 -10233
- package/assets/controls/toast-ui.es.js +1308 -1279
- package/assets/cose-bilkent-JH36ORCC-CCJ0SGyO.js +1 -0
- package/assets/cynefin-OW5HDTMX-B2Jx5fw3.js +166 -0
- package/assets/cynefinDiagram-5FMLGOSQ-DuK0Lb62.js +62 -0
- package/assets/cytoscape.esm-DzSz-X2X.js +321 -0
- package/assets/dagre-GXQ25YYZ-DnOYexET.js +4 -0
- package/assets/dashboard-X8k4X6Sw.js +3 -0
- package/assets/debounce-B3mXI_sx.js +1 -0
- package/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/assets/diagram-S7CK7UJ4-DDgPBHsK.js +30 -0
- package/assets/diagram-UQ7AKVKN-qlL0GZs8.js +41 -0
- package/assets/diagram-VSXAHHWV-CQbiU1_c.js +3 -0
- package/assets/diagram-VX7I27RA-DFDI9_au.js +24 -0
- package/assets/diagram-Z3DM3KII-B5C9dtmJ.js +24 -0
- package/assets/docs-BiZOD7PP.js +1 -0
- package/assets/ebnfDiagram-PWID7BFC-CLMUsXEI.js +1 -0
- package/assets/erDiagram-RLTQ6QDP-ax9Xol5-.js +99 -0
- package/assets/flowDiagram-HODETNUW-CvaH7l3S.js +168 -0
- package/assets/ganttDiagram-EL5Y4UJY-Cga5U19j.js +292 -0
- package/assets/gitGraphDiagram-WWUBYQGX-B6o1T3-d.js +106 -0
- package/assets/history-CVBJUNSQ.js +1 -0
- package/assets/infoDiagram-27XIBGKW-BpWxgBCE.js +2 -0
- package/assets/init-Gi6I4Gst.js +1 -0
- package/assets/init-user-xSvnFTF0.js +1 -0
- package/assets/isObject-DL-BuaBl.js +1 -0
- package/assets/ishikawaDiagram-5VMMS53U-zE83db4H.js +70 -0
- package/assets/journeyDiagram-3NMN7TZE-DZNVFqrX.js +139 -0
- package/assets/kanban-definition-UXKFOSKX-CqxNgk27.js +89 -0
- package/assets/katex-HP8lGamR.js +257 -0
- package/assets/layout-CN3kt_jt.js +1 -0
- package/assets/linear-nvkaQ6BA.js +1 -0
- package/assets/{list-DhK0McVn.js → list-CrIU2eZz.js} +2 -2
- package/assets/login-CX9xVjCn.js +1 -0
- package/assets/manifest.json +834 -58
- package/assets/media-manager-BfYftLIH.js +6 -0
- package/assets/mermaid.core-C0V1NaVJ.js +310 -0
- package/assets/mindmap-definition-YA3MSWOX-Bh7_d9f1.js +96 -0
- package/assets/module-DPEvnad3.js +1 -0
- package/assets/notification-Dqpt5AIZ.js +20 -0
- package/assets/ordinal-Cboi1Yqb.js +1 -0
- package/assets/pegDiagram-XKGWAZYB-DMnjm6Z1.js +1 -0
- package/assets/pieDiagram-E7YTZNPT-D-RWCgYb.js +39 -0
- package/assets/quadrantDiagram-AXDQQJYC-BNBGP7RM.js +7 -0
- package/assets/railroadDiagram-O6MQD6OU-BIjVPT01.js +1 -0
- package/assets/register-CF4KQ97e.js +1 -0
- package/assets/requirementDiagram-BXWQKSXE-VPrtGdjM.js +84 -0
- package/assets/ru-CFJ4fysR.js +1 -0
- package/assets/sankeyDiagram-P5KCCOFB-ct9mLF3U.js +40 -0
- package/assets/sequenceDiagram-WJ2MYXX4-TC06Mbmw.js +162 -0
- package/assets/sizeCapture-INFHLROL-BMMwriCf.js +1 -0
- package/assets/stateDiagram-D77RDMKH-DtwYRPCX.js +1 -0
- package/assets/stateDiagram-v2-MP3YSRHH-C1yB0O5U.js +1 -0
- package/assets/swimlanes-42K2YHIH-DE3hRbbr.js +1 -0
- package/assets/swimlanesDiagram-VR7AAH4N-Ce4l1sQD.js +8 -0
- package/assets/timeline-definition-24CTP7MA-N7s_hfjj.js +120 -0
- package/assets/toNumber-DZb-r9sy.js +1 -0
- package/assets/use-appearance-DYTIKpT2.js +1 -0
- package/assets/user-filters-list-fR0YNJ3l.js +1 -0
- package/assets/vennDiagram-4TSXK5OY-Dj5bFQkR.js +34 -0
- package/assets/wardleyDiagram-VM6X3IG4-83ax25Z6.js +78 -0
- package/assets/welcome-v11MTsRK.js +1 -0
- package/assets/with-app-layout-CH6RIib1.js +31 -0
- package/assets/xychartDiagram-S5SC5T6Z-CW9Br5Xp.js +7 -0
- package/controllers/access-rights/permissionOptions.d.ts +2 -0
- package/controllers/access-rights/permissionOptions.js +23 -0
- package/controllers/add.js +2 -2
- package/controllers/addGroup.js +15 -6
- package/controllers/ai/AiAgentController.d.ts +66 -0
- package/controllers/ai/AiAgentController.js +435 -0
- package/controllers/ai/AiAssistantController.d.ts +0 -4
- package/controllers/ai/AiAssistantController.js +4 -78
- package/controllers/catalog/FrontendCatalogAdapter.js +7 -8
- package/controllers/docs/index.d.ts +22 -0
- package/controllers/docs/index.js +126 -0
- package/controllers/edit.js +2 -2
- package/controllers/editGroup.js +15 -6
- package/controllers/filter-fields/savedFilters.js +1 -1
- package/controllers/history-actions/HistoryController.js +7 -7
- package/controllers/inlineUpdate.js +10 -3
- package/controllers/list.js +1 -1
- package/controllers/login.js +1 -1
- package/controllers/notifications/NotificationController.js +14 -8
- package/controllers/view.js +3 -3
- package/controllers/widgets/filterInfo.js +1 -1
- package/helpers/accessRightsHelper.d.ts +30 -3
- package/helpers/accessRightsHelper.js +140 -12
- package/helpers/assetVersionHelper.d.ts +14 -0
- package/helpers/assetVersionHelper.js +42 -0
- package/helpers/configHelper.js +19 -18
- package/helpers/controllerHelper.d.ts +1 -0
- package/helpers/controllerHelper.js +25 -15
- package/helpers/fieldsHelper.d.ts +2 -1
- package/helpers/fieldsHelper.js +11 -5
- package/helpers/inertiaActionsHelper.d.ts +1 -1
- package/helpers/inertiaActionsHelper.js +4 -5
- package/helpers/inertiaAddHelper.d.ts +1 -1
- package/helpers/inertiaAddHelper.js +7 -6
- package/helpers/inertiaGroupHelper.js +10 -2
- package/helpers/inertiaListHelper.d.ts +1 -1
- package/helpers/inertiaListHelper.js +7 -8
- package/helpers/inertiaMenuHelper.d.ts +7 -2
- package/helpers/inertiaMenuHelper.js +12 -27
- package/helpers/menuHelper.d.ts +11 -1
- package/helpers/menuHelper.js +12 -0
- package/helpers/modelResourceHelper.d.ts +9 -0
- package/helpers/modelResourceHelper.js +43 -0
- package/helpers/navigationAccessHelper.d.ts +13 -0
- package/helpers/navigationAccessHelper.js +45 -0
- package/index.d.ts +11 -0
- package/index.js +11 -0
- package/interfaces/adminpanelConfig.d.ts +160 -2
- package/interfaces/queryCriteria.d.ts +13 -0
- package/interfaces/types.d.ts +169 -0
- package/lib/Adminizer.d.ts +8 -0
- package/lib/Adminizer.js +29 -2
- package/lib/DataAccessor.d.ts +100 -3
- package/lib/DataAccessor.js +454 -245
- package/lib/access-graph/AccessGraphResolver.d.ts +136 -0
- package/lib/access-graph/AccessGraphResolver.js +605 -0
- package/lib/access-graph/RecordAccessCache.d.ts +23 -0
- package/lib/access-graph/RecordAccessCache.js +30 -0
- package/lib/access-graph/RecordAccessResolver.d.ts +83 -0
- package/lib/access-graph/RecordAccessResolver.js +295 -0
- package/lib/access-graph/shared.d.ts +60 -0
- package/lib/access-graph/shared.js +121 -0
- package/lib/admin-links/AdminLinkHandler.d.ts +72 -0
- package/lib/admin-links/AdminLinkHandler.js +183 -0
- package/lib/ai-assistant/AbstractAiConversationHistoryService.d.ts +39 -0
- package/lib/ai-assistant/AbstractAiConversationHistoryService.js +98 -0
- package/lib/ai-assistant/AbstractAiModelService.d.ts +139 -2
- package/lib/ai-assistant/AbstractAiModelService.js +154 -1
- package/lib/ai-assistant/AiAgentRunManager.d.ts +35 -0
- package/lib/ai-assistant/AiAgentRunManager.js +109 -0
- package/lib/ai-assistant/AiAssistantAgentSkillHandler.d.ts +61 -0
- package/lib/ai-assistant/AiAssistantAgentSkillHandler.js +90 -0
- package/lib/ai-assistant/AiAssistantHandler.d.ts +1 -0
- package/lib/ai-assistant/AiAssistantHandler.js +4 -0
- package/lib/ai-assistant/AiAssistantUiMethodHandler.d.ts +60 -0
- package/lib/ai-assistant/AiAssistantUiMethodHandler.js +144 -0
- package/lib/ai-assistant/builtinAgentSkills.d.ts +9 -0
- package/lib/ai-assistant/builtinAgentSkills.js +259 -0
- package/lib/ai-assistant/jsonSafe.d.ts +13 -0
- package/lib/ai-assistant/jsonSafe.js +81 -0
- package/lib/app-manager/AdminizerApp.d.ts +31 -2
- package/lib/app-manager/AppManager.js +43 -42
- package/lib/app-manager/ConfigLayerHandler.js +4 -0
- package/lib/docs/AbstractDocumentation.d.ts +100 -0
- package/lib/docs/AbstractDocumentation.js +108 -0
- package/lib/docs/DocumentationHandler.d.ts +100 -0
- package/lib/docs/DocumentationHandler.js +198 -0
- package/lib/docs/FileDocumentation.d.ts +47 -0
- package/lib/docs/FileDocumentation.js +189 -0
- package/lib/docs/docsAgentSkills.d.ts +10 -0
- package/lib/docs/docsAgentSkills.js +93 -0
- package/lib/filters/FilterService.js +4 -3
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +26 -1
- package/lib/history-actions/AbstractHistoryAdapter.js +155 -25
- package/lib/media-manager/helpers/MediaManagerHelper.js +9 -7
- package/lib/model/AbstractModel.d.ts +48 -0
- package/lib/model/AbstractModel.js +14 -4
- package/lib/model/ModelHandler.d.ts +50 -2
- package/lib/model/ModelHandler.js +117 -8
- package/lib/model/adapter/sequelize.d.ts +43 -3
- package/lib/model/adapter/sequelize.js +317 -138
- package/lib/model/adapter/typeorm.d.ts +16 -0
- package/lib/model/adapter/typeorm.js +136 -9
- package/lib/notifications/GeneralNotificationService.js +6 -5
- package/lib/notifications/SystemNotificationService.js +1 -1
- package/lib/ui-i18n/uiTranslationKeys.d.ts +2 -1
- package/lib/ui-i18n/uiTranslationKeys.js +42 -1
- package/lib/widgets/widgetHandler.js +10 -6
- package/models/Group.d.ts +2 -1
- package/package.json +35 -23
- package/policies/authPolicies.js +6 -6
- package/policies/permissionResolvers.d.ts +1 -0
- package/policies/permissionResolvers.js +3 -0
- package/system/Router.js +21 -3
- package/system/bindAccessRights.js +13 -3
- package/system/bindDocs.d.ts +13 -0
- package/system/bindDocs.js +77 -0
- package/system/bindInertia.js +30 -7
- package/system/buildInternalModelAccess.d.ts +8 -0
- package/system/buildInternalModelAccess.js +36 -4
- package/system/defaults.js +7 -1
- package/system/validateSystemModels.js +29 -9
- package/assets/add-DED_wpga.js +0 -1
- package/assets/add-group-CL80RdYb.js +0 -1
- package/assets/add-user-BRmwvQB8.js +0 -1
- package/assets/app-DNXiApCk.css +0 -1
- package/assets/app-layout-86yxiZOy.js +0 -1
- package/assets/app.js +0 -138
- package/assets/dashboard-ZP6K2s_8.js +0 -3
- package/assets/debounce-BMmXVQ06.js +0 -1
- package/assets/history-M61Bcv02.js +0 -1
- package/assets/init-user-8aUohVDq.js +0 -1
- package/assets/login-CO4laf6m.js +0 -1
- package/assets/media-manager-BDbpSSjH.js +0 -6
- package/assets/module-DfBneaUl.js +0 -1
- package/assets/notification-CVnQf3ef.js +0 -20
- package/assets/register-DBYIMXGQ.js +0 -1
- package/assets/ru-rYKdQbWF.js +0 -1
- package/assets/use-appearance-_EbbjHTh.js +0 -1
- package/assets/user-filters-list-DXhGLFTn.js +0 -1
- package/assets/welcome-CLxvXkcg.js +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-C0V1NaVJ.js","./app-vdHbjOQX.js","./app-DPmI-MvN.css","./isObject-DL-BuaBl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as I,j as h,bX as yl,c as X,u as ye,bY as Hr,bZ as Kt,b_ as bl,f as kt,b$ as kl,c0 as qe,c1 as Ne,aA as mn,aB as gn,c2 as Ae,aD as xn,aE as Ur,aF as yn,c3 as wl,c4 as Sl,c5 as Cl,bk as wt,c6 as vl,c7 as Qt,c8 as jl,c9 as Zt,ca as en,cb as tn,p as xe,a as ot,b1 as El,bW as Nl,cc as Al,bo as Il,b2 as Tl,b3 as Pl,b4 as zl,cd as Dl,b5 as Ll,b6 as Fl,L as Dt,I as Ml,be as _l,d as le,ce as Rl,X as Vr,bd as Ol,o as ut,q as ee,cf as Bl,cg as $l,ch as Hl,ci as Ul,cj as Vl,ck as qr,cl as ql,cm as Wl,cn as Jl,co as Gl,cp as Wn,cq as Jn,cr as Gn,cs as Xl,ct as Yl,cu as Kl,cv as Ql,cw as Zl,cx as ea,cy as ta,cz as na,cA as ra,cB as ia,cC as la,cD as aa,cE as sa,H as oa,cF as ua,cG as ca,cH as fa,bn as ha,cI as pa,bj as da,N as bn,O as kn,au as ma,Q as wn,b as Sn,e as Wr,cJ as Jr,az as Gr,bL as ga,cK as xa,Z as ya,P as ba,cL as ka,cM as wa,cN as Sa,bA as Ca,cO as va,cP as ja,av as Ea,aw as Na,ax as Xn,ay as Yn,F as Aa,B as Ia,cQ as Ta,cR as Pa,cS as za,cT as Da,i as La,k as Fa,l as Ma,m as _a,n as Ra,cU as Oa}from"./app-vdHbjOQX.js";import{u as Ba}from"./use-appearance-DYTIKpT2.js";const $a=I.memo(({children:e,variant:n="header"})=>{const[t,r]=I.useState(()=>typeof window<"u"?localStorage.getItem("sidebar")!=="false":!0),i=a=>{r(a),typeof window<"u"&&localStorage.setItem("sidebar",String(a))};return n==="header"?h.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e}):h.jsx(yl,{className:"h-svh overflow-hidden",defaultOpen:t,open:t,onOpenChange:i,children:e})});function Q({name:e,className:n,style:t}){return h.jsx("span",{className:X("material-icons-outlined",n),style:t,children:e})}const Ha="folder",Ua="radio_button_checked",He=I.forwardRef(({entry:e,...n},t)=>{const r=h.jsxs(h.Fragment,{children:[e.icon&&h.jsx(Q,{name:e.icon,className:"!text-[18px]"}),h.jsx("span",{children:e.title})]});return e.type==="blank"?h.jsx("a",{...n,ref:t,href:e.link,target:"_blank",rel:"noopener noreferrer",children:r}):h.jsx(xe,{...n,ref:t,href:e.link,children:r})});He.displayName="EntryLink";function Va({items:e=[]}){const n=ye(),{state:t,isMobile:r}=Hr(),i=t==="collapsed"&&!r,a=n.props.menuSections??{},l=N=>N.split("?")[0].replace(/\/$/,""),s=(N,v)=>a[N]?.icon||v.find(b=>b.icon)?.icon||Ha,o=e.reduce((N,v)=>{const b=v.section||"Platform";return N[b]||(N[b]=[]),N[b].push(v),N},{}),u=Object.keys(o).sort((N,v)=>{const b=a[N]?.order,D=a[v]?.order;return b!==void 0&&D!==void 0?b-D:b!==void 0?-1:D!==void 0?1:N==="Platform"?-1:v==="Platform"||N==="System"?1:v==="System"?-1:N.localeCompare(v)}),[f,c]=I.useState(()=>{const N={};return e.forEach(v=>{const b=v.section||"Platform";N[b]=!1}),N}),[d,p]=I.useState(()=>{const N={};return e.forEach(v=>{const b=v.section||"Platform";N[b]=!1}),N}),m=N=>{const v=l(n.url),b=l(N);return v===b||v.startsWith(`${b}/`)},w=I.useRef(f),S=I.useRef(d);w.current=f,S.current=d;const k=N=>{for(const v of N){const b=v.actions?.find(D=>m(D.link));if(b)return b}return N.find(v=>m(v.link))??null},E=({item:N})=>N.actions?.length>0?h.jsx(vl,{asChild:!0,defaultOpen:m(N.link),className:"group/collapsible",children:h.jsxs(Ne,{children:[h.jsx(Qt,{asChild:!0,children:h.jsxs(Ae,{tooltip:N.title,children:[h.jsx(Q,{name:N.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:N.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),h.jsx(jl,{children:h.jsx(Zt,{children:N.actions?.map(v=>h.jsx(en,{children:h.jsx(tn,{asChild:!0,isActive:m(v.link),children:h.jsx(He,{entry:v})})},v.id))})})]})},N.title):h.jsx(Ne,{children:h.jsx(Ae,{asChild:!0,isActive:m(N.link),tooltip:{children:N.title},children:h.jsx(He,{entry:N})})},N.title),j=({section:N,itemsInSection:v})=>{const b=k(v);return h.jsx(Kt,{className:"px-2 py-0",children:h.jsxs(qe,{children:[h.jsx(Ne,{children:h.jsxs(mn,{children:[h.jsx(gn,{asChild:!0,children:h.jsxs(Ae,{isActive:!!b,"aria-label":N,children:[h.jsx(Q,{name:s(N,v),className:"!text-[18px]"}),h.jsx("span",{children:N})]})}),h.jsxs(xn,{side:"right",align:"start",className:"min-w-56 z-[1003]",children:[h.jsxs(Ur,{className:"flex items-center gap-2",children:[h.jsx(Q,{name:s(N,v),className:"!text-[18px]"}),h.jsx("span",{children:N})]}),h.jsx(yn,{}),v.map(D=>D.actions?.length>0?h.jsxs(wl,{children:[h.jsxs(Sl,{children:[D.icon&&h.jsx(Q,{name:D.icon,className:"!text-[18px]"}),h.jsx("span",{children:D.title})]}),h.jsx(Cl,{className:"z-[1003]",children:D.actions?.map(F=>h.jsx(wt,{asChild:!0,children:h.jsx(He,{entry:F})},F.id||F.title))})]},D.id||D.title):h.jsx(wt,{asChild:!0,children:h.jsx(He,{entry:D})},D.id||D.title))]})]})}),b&&h.jsx(Ne,{children:h.jsx(Ae,{asChild:!0,isActive:!0,tooltip:b.title,children:h.jsx(He,{entry:{...b,icon:b.icon||Ua}})})})]})})};return h.jsx(h.Fragment,{children:u.map(N=>{const v=o[N];if(i)return h.jsx(j,{section:N,itemsInSection:v},N);const b=v.some(F=>F.actions?.length>0?F.actions.some(M=>m(M.link)):m(F.link)),D=d[N]?f[N]:b;return h.jsxs(Kt,{className:"px-2 py-0",children:[h.jsx(bl,{asChild:!0,className:"cursor-pointer",onClick:()=>{const y=!(S.current[N]?w.current[N]:b);p(T=>({...T,[N]:!0})),c(T=>({...T,[N]:y}))},children:h.jsxs("div",{className:"flex w-full items-center gap-2",children:[h.jsx(Q,{name:s(N,v),className:"!text-[16px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:N}),h.jsx(kt,{className:`ml-auto shrink-0 transform transition-transform duration-200 ${D?"rotate-90":""}`})]})}),D&&h.jsx(kl,{children:h.jsx(qe,{children:v.map(F=>h.jsx(E,{item:F},F.id||F.title))})})]},N)})})}const qa=5*1024*1024,Wa=(e,n)=>{const t=e?.response?.data;if(!t)return n;if(typeof t=="string")try{const r=JSON.parse(t);return r.error??r.message??n}catch{return t||n}if(typeof t=="object"){const r=t;return r.error??r.message??n}return n},Xr=I.memo(({routePrefix:e,triggerLabel:n,placeholder:t,t:r,onClose:i})=>{const[a,l]=I.useState(""),[s,o]=I.useState(""),[u,f]=I.useState([]),[c,d]=I.useState({}),[p,m]=I.useState(!1),[w,S]=I.useState(!1),k=I.useRef(null),E=v=>{if(!v)return;const b={},D=[];Array.from(v).forEach(F=>{F.size>qa?b[F.name]=r("File size exceeds the 5 MB limit"):D.push(F)}),f(F=>[...F,...D]),Object.keys(b).length&&d(F=>({...F,...b}))},j=v=>f(b=>b.filter((D,F)=>F!==v)),N=async v=>{if(v.preventDefault(),!a.trim()){d({title:r("Title is required")});return}m(!0),d({});const b=new FormData;b.append("title",a.trim()),b.append("description",s.trim()),u.forEach(D=>b.append("files",D));try{await ee.post(`${e}/api/feedback`,b),S(!0)}catch(D){const F=Wa(D,r("Internal server error"));d({_global:F}),m(!1)}};return I.useEffect(()=>{if(!w)return;const v=setTimeout(i,2e3);return()=>clearTimeout(v)},[w,i]),w?h.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[h.jsx(Dl,{size:48,className:"text-green-500 dark:text-green-400"}),h.jsx("p",{className:"text-base font-medium",children:r("Feedback sent successfully")})]}):h.jsxs(h.Fragment,{children:[h.jsxs(Ll,{className:"mb-4",children:[h.jsx(Fl,{children:n??r("Feedback")}),t&&h.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),h.jsxs("form",{onSubmit:N,className:"space-y-5",noValidate:!0,children:[h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Dt,{htmlFor:"fb-title",children:r("Title")}),h.jsx(Ml,{id:"fb-title",value:a,onChange:v=>l(v.target.value),disabled:p,placeholder:r("Title"),className:c.title?"border-destructive":""}),c.title&&h.jsx("p",{className:"text-xs text-destructive",children:c.title})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Dt,{htmlFor:"fb-desc",children:r("Description")}),h.jsx(_l,{id:"fb-desc",value:s,onChange:v=>o(v.target.value),disabled:p,placeholder:r("Description"),rows:5,className:"resize-none"})]}),h.jsxs("div",{className:"space-y-1.5",children:[h.jsx(Dt,{children:r("Attach files")}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs(le,{type:"button",variant:"outline",size:"sm",onClick:()=>k.current?.click(),disabled:p,children:[h.jsx(Rl,{size:14,className:"mr-1"}),r("Attach files")]}),h.jsx("span",{className:"text-xs text-muted-foreground",children:r("Max 5 MB per file")})]}),h.jsx("input",{ref:k,type:"file",multiple:!0,className:"hidden",onChange:v=>E(v.target.files),disabled:p}),u.length>0&&h.jsx("ul",{className:"mt-2 space-y-1",children:u.map((v,b)=>h.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[h.jsx("span",{className:"truncate max-w-[340px]",children:v.name}),h.jsx("button",{type:"button",onClick:()=>j(b),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":r("Remove file"),disabled:p,children:h.jsx(Vr,{size:13})})]},b))}),Object.entries(c).filter(([v])=>v!=="title"&&v!=="_global").map(([v,b])=>h.jsx("p",{className:"text-xs text-destructive",children:b},v))]}),c._global&&h.jsx("p",{className:"text-xs text-destructive",children:c._global}),h.jsx(Ol,{children:h.jsx(le,{type:"submit",disabled:p,children:p?h.jsxs(h.Fragment,{children:[h.jsx(ut,{size:14,className:"mr-1.5 animate-spin"}),r("Sending...")]}):r("Send")})})]})]})});Xr.displayName="FeedbackForm";function Ja(){const e=ye(),{t:n}=ot(),t=e.props.routePrefix??window.routePrefix??"",r=e.props.feedbackTriggerLabel??null,i=e.props.feedbackPlaceholder??null,[a,l]=I.useState(!1),[s,o]=I.useState(0),u=I.useCallback(()=>l(!1),[]),f=I.useCallback(c=>{l(c),c||o(d=>d+1)},[]);return h.jsxs(El,{open:a,onOpenChange:f,children:[h.jsx(Nl,{asChild:!0,children:h.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":r??n("Send feedback"),children:[h.jsx(Al,{size:13}),r??n("Send feedback")]})}),Il.createPortal(h.jsx(Tl,{}),document.body),h.jsx(Pl,{children:h.jsx(zl,{children:h.jsx(Xr,{routePrefix:t,triggerLabel:r,placeholder:i,t:n,onClose:u},s)})})]})}function Ga(){const e=ye();return h.jsxs(Bl,{collapsible:"icon",variant:"inset",children:[h.jsx($l,{children:h.jsx(qe,{children:h.jsxs(Ne,{children:[h.jsx(Hl,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:h.jsxs(Ul,{children:[h.jsx(Vl,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:h.jsx(Ae,{asChild:!0,children:h.jsx(le,{variant:"ghost",asChild:!0,className:`w-full px-2! ${e.props.section?"":"pointer-events-none"}`,children:h.jsxs("div",{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:e.props.brand}),e.props.section&&h.jsx(qr,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),e.props.section&&h.jsx(ql,{side:"right",className:"z-[1003]",children:e.props.section.map(n=>h.jsx("div",{children:n.subItems?h.jsxs(Wl,{children:[h.jsxs(Jl,{className:"flex gap-2 items-center cursor-pointer",children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}),h.jsx(Gl,{children:n.subItems.map(t=>h.jsx(Wn,{children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id):h.jsxs(xe,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]},t.id)},t.id))})]}):h.jsx(Wn,{children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(xe,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})]})}),h.jsx(Kt,{className:"px-2 py-0 block md:hidden",children:h.jsx(qe,{children:h.jsx(Jn,{asChild:!0,className:"group/collapsible",children:h.jsxs(Ne,{children:[h.jsx(Qt,{asChild:!0,children:h.jsxs(Ae,{children:[h.jsx(Q,{name:"rocket_launch",className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.props.brand}),e.props.section&&h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),e.props.section&&h.jsx(Gn,{children:h.jsx(Zt,{children:e.props.section&&e.props.section.map(n=>n.subItems?h.jsx(qe,{children:h.jsx(Jn,{asChild:!0,className:"group/collapsible-sub",children:h.jsxs(Ne,{children:[h.jsx(Qt,{asChild:!0,children:h.jsxs(Ae,{children:[h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.title}),h.jsx(kt,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),h.jsx(Gn,{children:h.jsx(Zt,{children:n.subItems.map(t=>h.jsx(en,{children:h.jsx(tn,{asChild:!0,children:t.type==="blank"?h.jsxs("a",{href:t.link,target:"_blank",className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]}):h.jsxs(xe,{href:t.link,className:"flex gap-2 items-center",children:[t.icon&&h.jsx(Q,{name:t.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:t.title})]})})},t.id))})})]})})},n.id):h.jsx(en,{children:h.jsx(tn,{asChild:!0,children:n.type==="blank"?h.jsxs("a",{href:n.link,target:"_blank",className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]}):h.jsxs(xe,{href:n.link,className:"flex gap-2 items-center",children:[n.icon&&h.jsx(Q,{name:n.icon,className:"!text-[18px]"}),h.jsx("span",{className:"hover:underline",children:n.title})]})})},n.id))})})]})})})})]},e.props.brand)})}),h.jsx(Xl,{children:h.jsx(Va,{items:e.props.menu})}),h.jsx(Yl,{children:h.jsxs("div",{className:"flex flex-col items-center",children:[e.props.version&&(()=>{const n=e.props.version,t=n.text||"5.1.0",r=new Date("2026-08-29T02:45:36.931Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),i=n.text?`v.${t}`:`v.${t} · ${r}`,a="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return n.link?h.jsx("a",{href:n.link,target:"_blank",rel:"noreferrer",title:n.hint??void 0,className:a,children:i}):h.jsx("span",{title:n.hint??void 0,className:a,children:i})})(),e.props.showFeedback&&h.jsx(Ja,{})]})})]})}function Xa({breadcrumbs:e}){return h.jsx(h.Fragment,{children:e.length>0&&h.jsx(Kl,{children:h.jsx(Ql,{children:e.map((n,t)=>{const r=t===e.length-1;return h.jsxs(I.Fragment,{children:[h.jsx(Zl,{children:r?h.jsx(ea,{children:n.title}):h.jsx(ta,{asChild:!0,children:h.jsx(xe,{href:n.href,children:n.title})})}),!r&&h.jsx(na,{})]},t)})})})})}function Ya(){return I.useCallback(n=>{const t=n.trim().split(" ");if(t.length===0)return"";if(t.length===1)return t[0].charAt(0).toUpperCase();const r=t[0].charAt(0),i=t[t.length-1].charAt(0);return`${r}${i}`.toUpperCase()},[])}function Yr({user:e,showEmail:n=!1}){const t=Ya();return h.jsxs(h.Fragment,{children:[h.jsxs(ra,{className:"h-8 w-8 overflow-hidden rounded-full",children:[h.jsx(ia,{src:e.avatar,alt:e.login}),h.jsx(la,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:t(e.login)})]}),h.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[h.jsx("span",{className:"truncate font-medium",children:e.login}),n&&h.jsx("span",{className:"text-muted-foreground truncate text-xs",children:e.email})]})]})}function Ka(){return I.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function Qa({user:e,logout:n,logoutBtn:t}){const r=Ka();return h.jsxs(h.Fragment,{children:[h.jsx(Ur,{className:"p-0 font-normal",children:h.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:h.jsx(Yr,{user:e,showEmail:!0})})}),h.jsx(yn,{}),h.jsx(wt,{asChild:!0,children:h.jsxs(xe,{className:"block w-full cursor-pointer",method:"get",href:n,as:"button",onClick:r,children:[h.jsx(aa,{className:"mr-2"}),t]})})]})}function Za(){const{auth:e,logout:n,logoutBtn:t}=ye().props,{state:r}=Hr(),i=sa();return h.jsx(qe,{children:h.jsx(Ne,{children:h.jsxs(mn,{children:[h.jsx(gn,{asChild:!0,children:h.jsxs(Ae,{size:"lg",className:"text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group focus-visible:ring-0 cursor-pointer",children:[h.jsx(Yr,{user:e.user}),h.jsx(qr,{className:"ml-auto size-4"})]})}),h.jsx(xn,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg z-[1002]",align:"end",side:i?"bottom":r==="collapsed"?"left":"bottom",children:h.jsx(Qa,{user:e.user,logout:n,logoutBtn:t})})]})})})}function es(){const{appearance:e,updateAppearance:n}=Ba(),t={light:"dark",dark:"system",system:"light"},r={light:fa,dark:ca,system:ua},i=()=>n(t[e]),a=r[e];return h.jsx(le,{variant:"ghost",size:"icon",onClick:i,className:"shrink-0",children:h.jsx(oa,{iconNode:a})})}const Kr=I.createContext(void 0),ts=({children:e})=>{const[n,t]=I.useState([]),[r,i]=I.useState([]),[a,l]=I.useState([]),[s,o]=I.useState(!1),[u,f]=I.useState(null),[c,d]=I.useState(""),p=ye(),{t:m}=ot(),w=ha.useMemo(()=>({"Make read":m("Make read"),"View All":m("View All"),Search:m("Search"),"Make all read":m("Make all read"),Title:m("Title"),Message:m("Message"),Date:m("Date"),Diff:m("Diff"),"No notifications":m("No notifications"),"No notifications found":m("No notifications found"),"The end of the list has been reached":m("The end of the list has been reached")}),[m]),S=[...r,...a],k=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api`,{params:{unreadOnly:!0,limit:4}});t(y.data)}catch(y){console.error("Error fetching bell notifications:",y)}},E=async()=>{await k()},j=async()=>{try{const y=await ee.getJson(`${window.routePrefix}/notifications/api/get-classes`);y.data&&(f(y.data.activeServices),d(y.data.initTab))}catch(y){console.error("Error fetching tabs:",y)}},N=async(y,T)=>{try{if(!y){await v(T);return}const z=await ee.postJson(`${window.routePrefix}/notifications/api/search`,{s:y,notificationClass:T});l(z.data)}catch(z){console.error("Error searching notifications:",z)}},v=async y=>{o(!0);try{const T=`${window.routePrefix}/notifications/api/${y}`,z=await ee.getJson(T,{params:{limit:20,skip:0,unreadOnly:!1}});return i([]),l(z.data),z.data}catch(T){return console.error("Error fetching all notifications:",T),[]}finally{o(!1)}},b=async(y,T)=>{try{const z=`${window.routePrefix}/notifications/api/${y}`,B=await ee.getJson(z,{params:{limit:20,skip:T,unreadOnly:!1}});return l(_=>[..._,...B.data]),B.data}catch(z){return console.error("Error paginating notifications:",z),[]}};I.useEffect(()=>{if(!p.props.notifications)return;k();const y=new EventSource(`${window.routePrefix}/notifications/api/stream`);return y.addEventListener("connected",T=>{j()}),y.addEventListener("notification",T=>{const z=JSON.parse(T.data);i(B=>[z,...B]),t(B=>[z,...B].slice(0,4))}),y.onerror=()=>{console.error("SSE connection error")},()=>y.close()},[]);const D=async(y,T)=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/${y}/${T}/read`,{}),i(z=>z.map(B=>B.id===T?{...B,read:!0}:B)),l(z=>z.map(B=>B.id===T?{...B,read:!0}:B)),t([])}catch(z){console.error("Error marking as read:",z)}},F=async()=>{try{await ee.putJson(`${window.routePrefix}/notifications/api/read-all`,{}),i(y=>y.map(T=>({...T,read:!0}))),l(y=>y.map(T=>({...T,read:!0}))),await k()}catch(y){console.error("Error marking all as read:",y)}},M=n.filter(y=>!y.read).length;return h.jsx(Kr.Provider,{value:{bellNotifications:n,allNotifications:S,unreadCount:M,getTabs:j,tabs:u,initTab:c,search:N,markAsRead:D,markAllAsRead:F,messages:w,fetchAllNotifications:v,paginateNotifications:b,loading:s,refreshBellNotifications:E},children:e})},Qr=()=>{const e=I.useContext(Kr);if(e===void 0)throw new Error("useNotifications must be used within a NotificationProvider");return e};function ns(){const{bellNotifications:e,markAsRead:n,unreadCount:t,refreshBellNotifications:r,messages:i}=Qr(),[a,l]=I.useState(!1),s=async(u,f)=>{l(!0);try{await n(u,f),await r()}catch(c){console.error("Error marking as read:",c)}finally{l(!1)}},o=u=>{const f=new Date,c=new Date(u),d=f.getTime()-c.getTime(),p=Math.floor(d/1e3),m=new Intl.RelativeTimeFormat("en",{numeric:"auto"});if(p<60)return m.format(-p,"second");const w=Math.floor(p/60);if(w<60)return m.format(-w,"minute");const S=Math.floor(w/60);if(S<24)return m.format(-S,"hour");const k=Math.floor(S/24);if(k<30)return m.format(-k,"day");const E=Math.floor(k/30);if(E<12)return m.format(-E,"month");const j=Math.floor(E/12);return m.format(-j,"year")};return h.jsxs(mn,{children:[h.jsx(gn,{asChild:!0,className:"cursor-pointer data-[state=open]:bg-sidebar-accent",children:h.jsxs(le,{variant:"ghost",className:"relative",children:[h.jsx(pa,{}),t>0&&h.jsx("div",{className:"absolute top-1.5 right-1.5 size-1.5 rounded-full bg-destructive"})]})}),h.jsxs(xn,{className:"z-[1002] p-2",align:"end",onCloseAutoFocus:u=>u.preventDefault(),children:[h.jsx(da,{className:`${a?"opacity-50 pointer-events-none":""}`,children:e.length===0?h.jsx("div",{className:"p-4 text-center text-muted-foreground",children:i["No notifications"]}):e.map(u=>h.jsxs("div",{children:[h.jsx(wt,{asChild:!0,className:"cursor-pointer",onSelect:f=>{f.preventDefault(),Sn.visit(`${window.routePrefix}/notifications?type=${u.notificationClass}`)},children:h.jsxs("div",{className:"grid grid-cols-[32px_250px] grid-rows-[auto_1fr] items-start gap-x-4 gap-y-2",children:[u.icon?h.jsx(Q,{name:u.icon.icon,style:{color:u.icon.iconColor},className:"!text-[32px]"}):h.jsx("div",{}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"font-medium",children:u.title}),h.jsx("span",{className:"truncate",children:u.message})]}),h.jsxs("div",{className:"col-start-2 flex justify-between flex-nowrap items-center",children:[h.jsx("div",{className:"flex flex-nowrap gap-2 items-center",children:h.jsx("div",{children:o(u.createdAt)})}),h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,children:h.jsx(le,{variant:"ghost",size:"icon",className:"size-4",onClick:f=>{f.stopPropagation(),s(u.notificationClass,u.id)},children:h.jsx(ma,{className:"text-primary"})})}),h.jsx(wn,{side:"left",className:"z-[1003]",children:h.jsx("p",{children:i["Make read"]})})]})]})]})}),h.jsx(yn,{})]},u.id))}),h.jsx(le,{variant:"secondary",asChild:!0,children:h.jsxs(xe,{href:`${window.routePrefix}/notifications`,className:`w-full ${a?"opacity-50 pointer-events-none":""}`,children:[i["View All"],a&&h.jsx(ut,{className:"h-4 w-4 animate-spin"})]})})]})]})}const Zr="adminizer.aiAssistant.state",rs=()=>{if(!(typeof window>"u")){try{const e=window.localStorage.getItem(Zr);if(e){const n=JSON.parse(e);if(typeof n.isOpen=="boolean")return{isOpen:n.isOpen,activeModel:typeof n.activeModel=="string"?n.activeModel:void 0}}}catch{}return window.__adminizerAiAssistantState__??void 0}},is=e=>{if(!(typeof window>"u")){window.__adminizerAiAssistantState__=e;try{window.localStorage.setItem(Zr,JSON.stringify(e))}catch{}}},ei=I.createContext(void 0),ls=({children:e})=>{const t=ye().props.aiAssistant,r=I.useMemo(()=>rs(),[]),[i,a]=I.useState(()=>r?.isOpen??!1),[l,s]=I.useState([]),[o,u]=I.useState(()=>r?.activeModel??t?.defaultModel??void 0),[f,c]=I.useState(!1),[d,p]=I.useState(null),m=t?.enabled??!1,w=I.useCallback(async()=>{if(m)try{c(!0);const{data:v}=await ee.getJson(`${window.routePrefix}/api/ai-assistant/models`);s(v),u(b=>b&&v.some(F=>F.id===b)?b:t?.defaultModel&&v.some(F=>F.id===t.defaultModel)?t.defaultModel:v[0]?.id)}catch(v){console.error("Failed to load AI assistant models",v),p("Unable to load AI assistant models")}finally{c(!1)}},[t?.defaultModel,m]);I.useEffect(()=>{m&&w()},[w,m]);const S=I.useCallback(v=>{u(v)},[]),k=I.useCallback(()=>a(!0),[]),E=I.useCallback(()=>a(!1),[]),j=I.useCallback(()=>a(v=>!v),[]);I.useEffect(()=>{m||a(!1)},[m]),I.useEffect(()=>{is({isOpen:i,activeModel:o})},[o,i]);const N=I.useMemo(()=>({isEnabled:m,isOpen:i,openChat:k,closeChat:E,toggleChat:j,models:l,activeModel:o,setActiveModel:S,loading:f,error:d}),[o,E,d,m,i,f,l,k,S,j]);return h.jsx(ei.Provider,{value:N,children:e})},Nt=()=>{const e=I.useContext(ei);if(!e)throw new Error("useAiAssistant must be used within an AiAssistantProvider");return e};function as(){const{isEnabled:e,isOpen:n,toggleChat:t,models:r,loading:i}=Nt();if(!e)return null;const a=r.length>0;return h.jsx(h.Fragment,{children:h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,children:h.jsx(le,{variant:"ghost",className:Jr("relative",{"text-primary":n}),onClick:t,"aria-expanded":n,"aria-haspopup":"true","aria-controls":"ai-assistant-panel",disabled:!a&&i,children:i&&!a?h.jsx(ut,{className:"size-4 animate-spin"}):h.jsx(Wr,{className:"size-4"})})}),h.jsx(wn,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:"AI assistant"})})]})})}function ti({fields:e,title:n,loading:t=!1,className:r}){const{t:i}=ot();return h.jsxs("div",{className:X("overflow-hidden rounded-xl border",r),children:[n&&h.jsx("div",{className:"bg-muted/50 border-b px-3 py-1.5 text-sm font-medium",children:n}),t||!e?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("Loading...")}):e.length===0?h.jsx("div",{className:"text-muted-foreground p-3 text-sm",children:i("No fields to display")}):h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"bg-muted/30 text-muted-foreground",children:[h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Field")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Type")}),h.jsx("th",{className:"px-3 py-1.5 text-start font-medium",children:i("Required")})]})}),h.jsx("tbody",{children:e.map(a=>h.jsxs("tr",{className:"border-t",children:[h.jsxs("td",{className:"px-3 py-1.5",children:[h.jsx("span",{className:"font-medium",children:a.title||a.name}),a.title&&a.title!==a.name&&h.jsx("span",{className:"text-muted-foreground ms-2 font-mono text-xs",children:a.name})]}),h.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:a.type}),h.jsx("td",{className:"px-3 py-1.5",children:a.required?i("Yes"):i("No")})]},a.name))})]})]})}function ss(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const os=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,us=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cs={};function Kn(e,n){return(cs.jsx?us:os).test(e)}const fs=/[ \t\n\f\r]/g;function hs(e){return typeof e=="object"?e.type==="text"?Qn(e.value):!1:Qn(e)}function Qn(e){return e.replace(fs,"")===""}class ct{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ct.prototype.normal={};ct.prototype.property={};ct.prototype.space=void 0;function ni(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new ct(t,r,n)}function nn(e){return e.toLowerCase()}class ae{constructor(n,t){this.attribute=t,this.property=n}}ae.prototype.attribute="";ae.prototype.booleanish=!1;ae.prototype.boolean=!1;ae.prototype.commaOrSpaceSeparated=!1;ae.prototype.commaSeparated=!1;ae.prototype.defined=!1;ae.prototype.mustUseProperty=!1;ae.prototype.number=!1;ae.prototype.overloadedBoolean=!1;ae.prototype.property="";ae.prototype.spaceSeparated=!1;ae.prototype.space=void 0;let ps=0;const O=_e(),Y=_e(),rn=_e(),A=_e(),J=_e(),Fe=_e(),oe=_e();function _e(){return 2**++ps}const ln=Object.freeze(Object.defineProperty({__proto__:null,boolean:O,booleanish:Y,commaOrSpaceSeparated:oe,commaSeparated:Fe,number:A,overloadedBoolean:rn,spaceSeparated:J},Symbol.toStringTag,{value:"Module"})),Lt=Object.keys(ln);class Cn extends ae{constructor(n,t,r,i){let a=-1;if(super(n,t),Zn(this,"space",i),typeof r=="number")for(;++a<Lt.length;){const l=Lt[a];Zn(this,Lt[a],(r&ln[l])===ln[l])}}}Cn.prototype.defined=!0;function Zn(e,n,t){t&&(e[n]=t)}function Je(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const a=new Cn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),n[r]=a,t[nn(r)]=r,t[nn(a.attribute)]=r}return new ct(n,t,e.space)}const ri=Je({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:J,ariaCurrent:null,ariaDescribedBy:J,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:J,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:J,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:J,ariaLevel:A,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:J,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:J,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Y,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function ii(e,n){return n in e?e[n]:n}function li(e,n){return ii(e,n.toLowerCase())}const ds=Je({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fe,acceptCharset:J,accessKey:J,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alpha:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:J,autoFocus:O,autoPlay:O,blocking:J,capture:null,charSet:null,checked:O,cite:null,className:J,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:Y,controls:O,controlsList:J,coords:A|Fe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:rn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:J,height:A,hidden:rn,high:A,href:null,hrefLang:null,htmlFor:J,httpEquiv:J,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:J,itemRef:J,itemScope:O,itemType:J,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,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:O,optimum:A,pattern:null,ping:J,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:J,required:O,reversed:O,rows:A,rowSpan:A,sandbox:J,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootCustomElementRegistry:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shadowRootSerializable:O,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:O,useMap:null,value:Y,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:J,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:O,disablePictureInPicture:O,disableRemotePlayback:O,exportParts:Fe,part:J,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:li}),ms=Je({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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:O,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Fe,g2:Fe,glyphName:Fe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,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:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:J,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ii}),ai=Je({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),si=Je({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:li}),oi=Je({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),gs={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"},xs=/[A-Z]/g,er=/-[a-z]/g,ys=/^data[-\w.:]+$/i;function bs(e,n){const t=nn(n);let r=n,i=ae;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ys.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(er,ws);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!er.test(a)){let l=a.replace(xs,ks);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=Cn}return new i(r,n)}function ks(e){return"-"+e.toLowerCase()}function ws(e){return e.charAt(1).toUpperCase()}const Ss=ni([ri,ds,ai,si,oi],"html"),vn=ni([ri,ms,ai,si,oi],"svg");function Cs(e){return e.join(" ").trim()}var $e={},Ft,tr;function vs(){if(tr)return Ft;tr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,o=`
|
|
3
|
+
`,u="/",f="*",c="",d="comment",p="declaration";function m(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var E=1,j=1;function N(_){var L=_.match(n);L&&(E+=L.length);var q=_.lastIndexOf(o);j=~q?_.length-q:j+_.length}function v(){var _={line:E,column:j};return function(L){return L.position=new b(_),M(),L}}function b(_){this.start=_,this.end={line:E,column:j},this.source=k.source}b.prototype.content=S;function D(_){var L=new Error(k.source+":"+E+":"+j+": "+_);if(L.reason=_,L.filename=k.source,L.line=E,L.column=j,L.source=S,!k.silent)throw L}function F(_){var L=_.exec(S);if(L){var q=L[0];return N(q),S=S.slice(q.length),L}}function M(){F(t)}function y(_){var L;for(_=_||[];L=T();)L!==!1&&_.push(L);return _}function T(){var _=v();if(!(u!=S.charAt(0)||f!=S.charAt(1))){for(var L=2;c!=S.charAt(L)&&(f!=S.charAt(L)||u!=S.charAt(L+1));)++L;if(L+=2,c===S.charAt(L-1))return D("End of comment missing");var q=S.slice(2,L-2);return j+=2,N(q),S=S.slice(L),j+=2,_({type:d,comment:q})}}function z(){var _=v(),L=F(r);if(L){if(T(),!F(i))return D("property missing ':'");var q=F(a),K=_({type:p,property:w(L[0].replace(e,c)),value:q?w(q[0].replace(e,c)):c});return F(l),K}}function B(){var _=[];y(_);for(var L;L=z();)L!==!1&&(_.push(L),y(_));return _}return M(),B()}function w(S){return S?S.replace(s,c):c}return Ft=m,Ft}var nr;function js(){if(nr)return $e;nr=1;var e=$e&&$e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($e,"__esModule",{value:!0}),$e.default=t;const n=e(vs());function t(r,i){let a=null;if(!r||typeof r!="string")return a;const l=(0,n.default)(r),s=typeof i=="function";return l.forEach(o=>{if(o.type!=="declaration")return;const{property:u,value:f}=o;s?i(u,f,o):f&&(a=a||{},a[u]=f)}),a}return $e}var Qe={},rr;function Es(){if(rr)return Qe;rr=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},s=function(u,f){return"".concat(f,"-")},o=function(u,f){return f===void 0&&(f={}),a(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,s):u=u.replace(r,s),u.replace(n,l))};return Qe.camelCase=o,Qe}var Ze,ir;function Ns(){if(ir)return Ze;ir=1;var e=Ze&&Ze.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(js()),t=Es();function r(i,a){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(s,o){s&&o&&(l[(0,t.camelCase)(s,a)]=o)}),l}return r.default=r,Ze=r,Ze}var As=Ns();const Is=Gr(As),ui=ci("end"),jn=ci("start");function ci(e){return n;function n(t){const r=t&&t.position&&t.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 Ts(e){const n=jn(e),t=ui(e);if(n&&t)return{start:n,end:t}}function nt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?lr(e.position):"start"in e||"end"in e?lr(e):"line"in e||"column"in e?an(e):""}function an(e){return ar(e&&e.line)+":"+ar(e&&e.column)}function lr(e){return an(e&&e.start)+"-"+an(e&&e.end)}function ar(e){return e&&typeof e=="number"?e:1}class ne extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",a={},l=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?i=n:!a.cause&&n&&(l=!0,i=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=nt(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ne.prototype.file="";ne.prototype.name="";ne.prototype.reason="";ne.prototype.message="";ne.prototype.stack="";ne.prototype.column=void 0;ne.prototype.line=void 0;ne.prototype.ancestors=void 0;ne.prototype.cause=void 0;ne.prototype.fatal=void 0;ne.prototype.place=void 0;ne.prototype.ruleId=void 0;ne.prototype.source=void 0;const En={}.hasOwnProperty,Ps=new Map,zs=/[A-Z]/g,Ds=new Set(["table","tbody","thead","tfoot","tr"]),Ls=new Set(["td","th"]),fi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fs(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Us(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Hs(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?vn:Ss,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=hi(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function hi(e,n,t){if(n.type==="element")return Ms(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return _s(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Os(e,n,t);if(n.type==="mdxjsEsm")return Rs(e,n);if(n.type==="root")return Bs(e,n,t);if(n.type==="text")return $s(e,n)}function Ms(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(n);const a=di(e,n.tagName,!1),l=Vs(e,n);let s=An(e,n);return Ds.has(n.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!hs(o):!0})),pi(e,l,a,n),Nn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function _s(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}at(e,n.position)}function Rs(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);at(e,n.position)}function Os(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=vn,e.schema=i),e.ancestors.push(n);const a=n.name===null?e.Fragment:di(e,n.name,!0),l=qs(e,n),s=An(e,n);return pi(e,l,a,n),Nn(l,s),e.ancestors.pop(),e.schema=r,e.create(n,a,l,t)}function Bs(e,n,t){const r={};return Nn(r,An(e,n)),e.create(n,e.Fragment,r,t)}function $s(e,n){return n.value}function pi(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Nn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Hs(e,n,t){return r;function r(i,a,l,s){const u=Array.isArray(l.children)?t:n;return s?u(a,l,s):u(a,l)}}function Us(e,n){return t;function t(r,i,a,l){const s=Array.isArray(a.children),o=jn(r);return n(i,a,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Vs(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&En.call(n.properties,i)){const a=Ws(e,i,n.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Ls.has(n.tagName)?r=s:t[l]=s}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function qs(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else at(e,n.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else at(e,n.position);else a=r.value===null?!0:r.value;t[i]=a}return t}function An(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Ps;for(;++r<n.children.length;){const a=n.children[r];let l;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}const s=hi(e,a,l);s!==void 0&&t.push(s)}return t}function Ws(e,n,t){const r=bs(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?ss(t):Cs(t)),r.property==="style"){let i=typeof t=="object"?t:Js(e,String(t));return e.stylePropertyNameCase==="css"&&(i=Gs(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?gs[r.property]||r.property:r.attribute,t]}}function Js(e,n){try{return Is(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,i=new ne("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=fi+"#cannot-parse-style-attribute",i}}function di(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let a=-1,l;for(;++a<i.length;){const s=Kn(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=l}else r=Kn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return En.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);at(e)}function at(e,n){const t=new ne("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=fi+"#cannot-handle-mdx-estrees-without-createevaluater",t}function Gs(e){const n={};let t;for(t in e)En.call(e,t)&&(n[Xs(t)]=e[t]);return n}function Xs(e){let n=e.replace(zs,Ys);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Ys(e){return"-"+e.toLowerCase()}const Mt={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"]},Ks={};function In(e,n){const t=Ks,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return mi(e,r,i)}function mi(e,n,t){if(Qs(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sr(e.children,n,t)}return Array.isArray(e)?sr(e,n,t):""}function sr(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=mi(e[i],n,t);return r.join("")}function Qs(e){return!!(e&&typeof e=="object")}const or=document.createElement("i");function Tn(e){const n="&"+e+";";or.innerHTML=n;const t=or.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function ue(e,n,t,r){const i=e.length;let a=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);a<r.length;)l=r.slice(a,a+1e4),l.unshift(n,0),e.splice(...l),a+=1e4,n+=1e4}function ce(e,n){return e.length>0?(ue(e,e.length,0,n),e):n}const ur={}.hasOwnProperty;function gi(e){const n={};let t=-1;for(;++t<e.length;)Zs(n,e[t]);return n}function Zs(e,n){let t;for(t in n){const i=(ur.call(e,t)?e[t]:void 0)||(e[t]={}),a=n[t];let l;if(a)for(l in a){ur.call(i,l)||(i[l]=[]);const s=a[l];eo(i[l],Array.isArray(s)?s:s?[s]:[])}}}function eo(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);ue(e,0,0,r)}function xi(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function me(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const re=Ie(/[A-Za-z]/),te=Ie(/[\dA-Za-z]/),to=Ie(/[#-'*+\--9=?A-Z^-~]/);function St(e){return e!==null&&(e<32||e===127)}const sn=Ie(/\d/),no=Ie(/[\dA-Fa-f]/),ro=Ie(/[!-/:-@[-`{-~]/);function R(e){return e!==null&&e<-2}function G(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}const At=Ie(new RegExp("\\p{P}|\\p{S}","u")),Me=Ie(/\s/);function Ie(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ge(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const a=e.charCodeAt(t);let l="";if(a===37&&te(e.charCodeAt(t+1))&&te(e.charCodeAt(t+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(t+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function V(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(o){return H(o)?(e.enter(t),s(o)):n(o)}function s(o){return H(o)&&a++<i?(e.consume(o),s):(e.exit(t),n(o))}}const io={tokenize:lo};function lo(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),V(e,n,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const o=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=o),t=o,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return R(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),l)}}const ao={tokenize:so},cr={tokenize:oo};function so(e){const n=this,t=[];let r=0,i,a,l;return s;function s(j){if(r<t.length){const N=t[r];return n.containerState=N[1],e.attempt(N[0].continuation,o,u)(j)}return u(j)}function o(j){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&E();const N=n.events.length;let v=N,b;for(;v--;)if(n.events[v][0]==="exit"&&n.events[v][1].type==="chunkFlow"){b=n.events[v][1].end;break}k(r);let D=N;for(;D<n.events.length;)n.events[D][1].end={...b},D++;return ue(n.events,v+1,0,n.events.slice(N)),n.events.length=D,u(j)}return s(j)}function u(j){if(r===t.length){if(!i)return d(j);if(i.currentConstruct&&i.currentConstruct.concrete)return m(j);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(cr,f,c)(j)}function f(j){return i&&E(),k(r),d(j)}function c(j){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(j)}function d(j){return n.containerState={},e.attempt(cr,p,m)(j)}function p(j){return r++,t.push([n.currentConstruct,n.containerState]),d(j)}function m(j){if(j===null){i&&E(),k(0),e.consume(j);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),w(j)}function w(j){if(j===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(j);return}return R(j)?(e.consume(j),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,s):(e.consume(j),w)}function S(j,N){const v=n.sliceStream(j);if(N&&v.push(null),j.previous=a,a&&(a.next=j),a=j,i.defineSkip(j.start),i.write(v),n.parser.lazy[j.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 D=n.events.length;let F=D,M,y;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){if(M){y=n.events[F][1].end;break}M=!0}for(k(r),b=D;b<n.events.length;)n.events[b][1].end={...y},b++;ue(n.events,F+1,0,n.events.slice(D)),n.events.length=b}}function k(j){let N=t.length;for(;N-- >j;){const v=t[N];n.containerState=v[1],v[0].exit.call(n,e)}t.length=j}function E(){i.write([null]),a=void 0,i=void 0,n.containerState._closeFlow=void 0}}function oo(e,n,t){return V(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function We(e){if(e===null||G(e)||Me(e))return 1;if(At(e))return 2}function It(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(n=a(n,t),r.push(a))}return n}const on={name:"attention",resolveAll:uo,tokenize:co};function uo(e,n){let t=-1,r,i,a,l,s,o,u,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const c={...e[r][1].end},d={...e[t][1].start};fr(c,-o),fr(d,o),l={type:o>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[r][1].end={...l.start},e[t][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ce(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ce(u,[["enter",i,n],["enter",l,n],["exit",l,n],["enter",a,n]]),u=ce(u,It(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ce(u,[["exit",a,n],["enter",s,n],["exit",s,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,u=ce(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,ue(e,r-1,t-r+3,u),t=r+u.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function co(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=We(r);let a;return l;function l(o){return a=o,e.enter("attentionSequence"),s(o)}function s(o){if(o===a)return e.consume(o),s;const u=e.exit("attentionSequence"),f=We(o),c=!f||f===2&&i||t.includes(o),d=!i||i===2&&f||t.includes(r);return u._open=!!(a===42?c:c&&(i||!d)),u._close=!!(a===42?d:d&&(f||!c)),n(o)}}function fr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const fo={name:"autolink",tokenize:ho};function ho(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return re(p)?(e.consume(p),l):p===64?t(p):u(p)}function l(p){return p===43||p===45||p===46||te(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||te(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||St(p)?t(p):(e.consume(p),o)}function u(p){return p===64?(e.consume(p),f):to(p)?(e.consume(p),u):t(p)}function f(p){return te(p)?c(p):t(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"),n):d(p)}function d(p){if((p===45||te(p))&&r++<63){const m=p===45?d:c;return e.consume(p),m}return t(p)}}const ft={partial:!0,tokenize:po};function po(e,n,t){return r;function r(a){return H(a)?V(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||R(a)?n(a):t(a)}}const yi={continuation:{tokenize:go},exit:xo,name:"blockQuote",tokenize:mo};function mo(e,n,t){const r=this;return i;function i(l){if(l===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return t(l)}function a(l){return H(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function go(e,n,t){const r=this;return i;function i(l){return H(l)?V(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(yi,n,t)(l)}}function xo(e){e.exit("blockQuote")}const bi={name:"characterEscape",tokenize:yo};function yo(e,n,t){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return ro(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(a)}}const ki={name:"characterReference",tokenize:bo};function bo(e,n,t){const r=this;let i=0,a,l;return s;function s(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),o}function o(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,l=te,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=no,f):(e.enter("characterReferenceValue"),a=7,l=sn,f(c))}function f(c){if(c===59&&i){const d=e.exit("characterReferenceValue");return l===te&&!Tn(r.sliceSerialize(d))?t(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(c)&&i++<a?(e.consume(c),f):t(c)}}const hr={partial:!0,tokenize:wo},pr={concrete:!0,name:"codeFenced",tokenize:ko};function ko(e,n,t){const r=this,i={partial:!0,tokenize:v};let a=0,l=0,s;return o;function o(b){return u(b)}function u(b){const D=r.events[r.events.length-1];return a=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,s=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(b)}function f(b){return b===s?(l++,e.consume(b),f):l<3?t(b):(e.exit("codeFencedFenceSequence"),H(b)?V(e,c,"whitespace")(b):c(b))}function c(b){return b===null||R(b)?(e.exit("codeFencedFence"),r.interrupt?n(b):e.check(hr,w,N)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(b)):H(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,p,"whitespace")(b)):b===96&&b===s?t(b):(e.consume(b),d)}function p(b){return b===null||R(b)?c(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||R(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(b)):b===96&&b===s?t(b):(e.consume(b),m)}function w(b){return e.attempt(i,N,S)(b)}function S(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),k}function k(b){return a>0&&H(b)?V(e,E,"linePrefix",a+1)(b):E(b)}function E(b){return b===null||R(b)?e.check(hr,w,N)(b):(e.enter("codeFlowValue"),j(b))}function j(b){return b===null||R(b)?(e.exit("codeFlowValue"),E(b)):(e.consume(b),j)}function N(b){return e.exit("codeFenced"),n(b)}function v(b,D,F){let M=0;return y;function y(L){return b.enter("lineEnding"),b.consume(L),b.exit("lineEnding"),T}function T(L){return b.enter("codeFencedFence"),H(L)?V(b,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):z(L)}function z(L){return L===s?(b.enter("codeFencedFenceSequence"),B(L)):F(L)}function B(L){return L===s?(M++,b.consume(L),B):M>=l?(b.exit("codeFencedFenceSequence"),H(L)?V(b,_,"whitespace")(L):_(L)):F(L)}function _(L){return L===null||R(L)?(b.exit("codeFencedFence"),D(L)):F(L)}}}function wo(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const _t={name:"codeIndented",tokenize:Co},So={partial:!0,tokenize:vo};function Co(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),V(e,a,"linePrefix",5)(u)}function a(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):t(u)}function l(u){return u===null?o(u):R(u)?e.attempt(So,l,o)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||R(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function o(u){return e.exit("codeIndented"),n(u)}}function vo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):V(e,a,"linePrefix",5)(l)}function a(l){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):R(l)?i(l):t(l)}}const jo={name:"codeText",previous:No,resolve:Eo,tokenize:Ao};function Eo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function No(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ao(e,n,t){let r=0,i,a;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),s(c)}function s(c){return c===96?(e.consume(c),r++,s):(e.exit("codeTextSequence"),o(c))}function o(c){return c===null?t(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),o):c===96?(a=e.enter("codeTextSequence"),i=0,f(c)):R(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||R(c)?(e.exit("codeTextData"),o(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(c)):(a.type="codeTextData",u(c))}}class Io{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&et(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),et(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),et(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);et(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);et(this.left,t.reverse())}}}function et(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function wi(e){const n={};let t=-1,r,i,a,l,s,o,u;const f=new Io(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,To(f,t)),t=n[t],u=!0);else if(r[1]._container){for(a=t,i=void 0;a--;)if(l=f.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},s=f.slice(i,t),s.unshift(r),f.splice(i,t-i+1,s))}}return ue(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function To(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const a=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const s=l.events,o=[],u={};let f,c,d=-1,p=t,m=0,w=0;const S=[w];for(;p;){for(;e.get(++i)[1]!==p;);a.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=t;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(w=d+1,S.push(w),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(),d=S.length;d--;){const k=s.slice(S[d],S[d+1]),E=a.pop();o.push([E,E+k.length-1]),e.splice(E,2,k)}for(o.reverse(),d=-1;++d<o.length;)u[m+o[d][0]]=m+o[d][1],m+=o[d][1]-o[d][0]-1;return u}const Po={resolve:Do,tokenize:Lo},zo={partial:!0,tokenize:Fo};function Do(e){return wi(e),e}function Lo(e,n){let t;return r;function r(s){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):R(s)?e.check(zo,l,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),n(s)}function l(s){return e.consume(s),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Fo(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),V(e,a,"linePrefix")}function a(l){if(l===null||R(l))return t(l);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function Si(e,n,t,r,i,a,l,s,o){const u=o||Number.POSITIVE_INFINITY;let f=0;return c;function c(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),d):k===null||k===32||k===41||St(k)?t(k):(e.enter(r),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),w(k))}function d(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),n):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(s),d(k)):k===null||k===60||R(k)?t(k):(e.consume(k),k===92?m:p)}function m(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function w(k){return!f&&(k===null||k===41||G(k))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(r),n(k)):f<u&&k===40?(e.consume(k),f++,w):k===41?(e.consume(k),f--,w):k===null||k===32||k===40||St(k)?t(k):(e.consume(k),k===92?S:w)}function S(k){return k===40||k===41||k===92?(e.consume(k),w):w(k)}}function Ci(e,n,t,r,i,a){const l=this;let s=0,o;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),f}function f(p){return s>999||p===null||p===91||p===93&&!o||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?t(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):R(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||R(p)||s++>999?(e.exit("chunkString"),f(p)):(e.consume(p),o||(o=!H(p)),p===92?d:c)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}}function vi(e,n,t,r,i,a){let l;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,o):t(d)}function o(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(a),u(d))}function u(d){return d===l?(e.exit(a),o(l)):d===null?t(d):R(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),V(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===l||d===null||R(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?c:f)}function c(d){return d===l||d===92?(e.consume(d),f):f(d)}}function rt(e,n){let t;return r;function r(i){return R(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):H(i)?V(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Mo={name:"definition",tokenize:Ro},_o={partial:!0,tokenize:Oo};function Ro(e,n,t){const r=this;let i;return a;function a(p){return e.enter("definition"),l(p)}function l(p){return Ci.call(r,e,s,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):t(p)}function o(p){return G(p)?rt(e,u)(p):u(p)}function u(p){return Si(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(_o,c,c)(p)}function c(p){return H(p)?V(e,d,"whitespace")(p):d(p)}function d(p){return p===null||R(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Oo(e,n,t){return r;function r(s){return G(s)?rt(e,i)(s):t(s)}function i(s){return vi(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return H(s)?V(e,l,"whitespace")(s):l(s)}function l(s){return s===null||R(s)?n(s):t(s)}}const Bo={name:"hardBreakEscape",tokenize:$o};function $o(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return R(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Ho={name:"headingAtx",resolve:Uo,tokenize:Vo};function Uo(e,n){let t=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ue(e,r,t-r+1,[["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n]])),e}function Vo(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(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"),s(f)):t(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||R(f)?(e.exit("atxHeading"),n(f)):H(f)?V(e,s,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),s(f))}function u(f){return f===null||f===35||G(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),u)}}const qo=["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"],dr=["pre","script","style","textarea"],Wo={concrete:!0,name:"htmlFlow",resolveTo:Xo,tokenize:Yo},Jo={partial:!0,tokenize:Qo},Go={partial:!0,tokenize:Ko};function Xo(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Yo(e,n,t){const r=this;let i,a,l,s,o;return u;function u(x){return f(x)}function f(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),c}function c(x){return x===33?(e.consume(x),d):x===47?(e.consume(x),a=!0,w):x===63?(e.consume(x),i=3,r.interrupt?n:g):re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function d(x){return x===45?(e.consume(x),i=2,p):x===91?(e.consume(x),i=5,s=0,m):re(x)?(e.consume(x),i=4,r.interrupt?n:g):t(x)}function p(x){return x===45?(e.consume(x),r.interrupt?n:g):t(x)}function m(x){const pe="CDATA[";return x===pe.charCodeAt(s++)?(e.consume(x),s===pe.length?r.interrupt?n:z:m):t(x)}function w(x){return re(x)?(e.consume(x),l=String.fromCharCode(x),S):t(x)}function S(x){if(x===null||x===47||x===62||G(x)){const pe=x===47,Te=l.toLowerCase();return!pe&&!a&&dr.includes(Te)?(i=1,r.interrupt?n(x):z(x)):qo.includes(l.toLowerCase())?(i=6,pe?(e.consume(x),k):r.interrupt?n(x):z(x)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(x):a?E(x):j(x))}return x===45||te(x)?(e.consume(x),l+=String.fromCharCode(x),S):t(x)}function k(x){return x===62?(e.consume(x),r.interrupt?n:z):t(x)}function E(x){return H(x)?(e.consume(x),E):y(x)}function j(x){return x===47?(e.consume(x),y):x===58||x===95||re(x)?(e.consume(x),N):H(x)?(e.consume(x),j):y(x)}function N(x){return x===45||x===46||x===58||x===95||te(x)?(e.consume(x),N):v(x)}function v(x){return x===61?(e.consume(x),b):H(x)?(e.consume(x),v):j(x)}function b(x){return x===null||x===60||x===61||x===62||x===96?t(x):x===34||x===39?(e.consume(x),o=x,D):H(x)?(e.consume(x),b):F(x)}function D(x){return x===o?(e.consume(x),o=null,M):x===null||R(x)?t(x):(e.consume(x),D)}function F(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||G(x)?v(x):(e.consume(x),F)}function M(x){return x===47||x===62||H(x)?j(x):t(x)}function y(x){return x===62?(e.consume(x),T):t(x)}function T(x){return x===null||R(x)?z(x):H(x)?(e.consume(x),T):t(x)}function z(x){return x===45&&i===2?(e.consume(x),q):x===60&&i===1?(e.consume(x),K):x===62&&i===4?(e.consume(x),he):x===63&&i===3?(e.consume(x),g):x===93&&i===5?(e.consume(x),ke):R(x)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Jo,we,B)(x)):x===null||R(x)?(e.exit("htmlFlowData"),B(x)):(e.consume(x),z)}function B(x){return e.check(Go,_,we)(x)}function _(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),L}function L(x){return x===null||R(x)?B(x):(e.enter("htmlFlowData"),z(x))}function q(x){return x===45?(e.consume(x),g):z(x)}function K(x){return x===47?(e.consume(x),l="",fe):z(x)}function fe(x){if(x===62){const pe=l.toLowerCase();return dr.includes(pe)?(e.consume(x),he):z(x)}return re(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),fe):z(x)}function ke(x){return x===93?(e.consume(x),g):z(x)}function g(x){return x===62?(e.consume(x),he):x===45&&i===2?(e.consume(x),g):z(x)}function he(x){return x===null||R(x)?(e.exit("htmlFlowData"),we(x)):(e.consume(x),he)}function we(x){return e.exit("htmlFlow"),n(x)}}function Ko(e,n,t){const r=this;return i;function i(l){return R(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):t(l)}function a(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}function Qo(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ft,n,t)}}const Zo={name:"htmlText",tokenize:eu};function eu(e,n,t){const r=this;let i,a,l;return s;function s(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),o}function o(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),v):g===63?(e.consume(g),j):re(g)?(e.consume(g),F):t(g)}function u(g){return g===45?(e.consume(g),f):g===91?(e.consume(g),a=0,m):re(g)?(e.consume(g),E):t(g)}function f(g){return g===45?(e.consume(g),p):t(g)}function c(g){return g===null?t(g):g===45?(e.consume(g),d):R(g)?(l=c,K(g)):(e.consume(g),c)}function d(g){return g===45?(e.consume(g),p):c(g)}function p(g){return g===62?q(g):g===45?d(g):c(g)}function m(g){const he="CDATA[";return g===he.charCodeAt(a++)?(e.consume(g),a===he.length?w:m):t(g)}function w(g){return g===null?t(g):g===93?(e.consume(g),S):R(g)?(l=w,K(g)):(e.consume(g),w)}function S(g){return g===93?(e.consume(g),k):w(g)}function k(g){return g===62?q(g):g===93?(e.consume(g),k):w(g)}function E(g){return g===null||g===62?q(g):R(g)?(l=E,K(g)):(e.consume(g),E)}function j(g){return g===null?t(g):g===63?(e.consume(g),N):R(g)?(l=j,K(g)):(e.consume(g),j)}function N(g){return g===62?q(g):j(g)}function v(g){return re(g)?(e.consume(g),b):t(g)}function b(g){return g===45||te(g)?(e.consume(g),b):D(g)}function D(g){return R(g)?(l=D,K(g)):H(g)?(e.consume(g),D):q(g)}function F(g){return g===45||te(g)?(e.consume(g),F):g===47||g===62||G(g)?M(g):t(g)}function M(g){return g===47?(e.consume(g),q):g===58||g===95||re(g)?(e.consume(g),y):R(g)?(l=M,K(g)):H(g)?(e.consume(g),M):q(g)}function y(g){return g===45||g===46||g===58||g===95||te(g)?(e.consume(g),y):T(g)}function T(g){return g===61?(e.consume(g),z):R(g)?(l=T,K(g)):H(g)?(e.consume(g),T):M(g)}function z(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,B):R(g)?(l=z,K(g)):H(g)?(e.consume(g),z):(e.consume(g),_)}function B(g){return g===i?(e.consume(g),i=void 0,L):g===null?t(g):R(g)?(l=B,K(g)):(e.consume(g),B)}function _(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||G(g)?M(g):(e.consume(g),_)}function L(g){return g===47||g===62||G(g)?M(g):t(g)}function q(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function K(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),fe}function fe(g){return H(g)?V(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):ke(g)}function ke(g){return e.enter("htmlTextData"),l(g)}}const Pn={name:"labelEnd",resolveAll:iu,resolveTo:lu,tokenize:au},tu={tokenize:su},nu={tokenize:ou},ru={tokenize:uu};function iu(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&ue(e,0,e.length,t),e}function lu(e,n){let t=e.length,r=0,i,a,l,s;for(;t--;)if(i=e[t][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=t);const o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return s=[["enter",o,n],["enter",u,n]],s=ce(s,e.slice(a+1,a+r+3)),s=ce(s,[["enter",f,n]]),s=ce(s,It(n.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),n)),s=ce(s,[["exit",f,n],e[l-2],e[l-1],["exit",u,n]]),s=ce(s,e.slice(l+1)),s=ce(s,[["exit",o,n]]),ue(e,a,e.length,s),e}function au(e,n,t){const r=this;let i=r.events.length,a,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?c(d):(l=r.parser.defined.includes(me(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),o):t(d)}function o(d){return d===40?e.attempt(tu,f,l?f:c)(d):d===91?e.attempt(nu,f,l?u:c)(d):l?f(d):c(d)}function u(d){return e.attempt(ru,f,c)(d)}function f(d){return n(d)}function c(d){return a._balanced=!0,t(d)}}function su(e,n,t){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)?rt(e,a)(c):a(c)}function a(c){return c===41?f(c):Si(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return G(c)?rt(e,o)(c):f(c)}function s(c){return t(c)}function o(c){return c===34||c===39||c===40?vi(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return G(c)?rt(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),n):t(c)}}function ou(e,n,t){const r=this;return i;function i(s){return Ci.call(r,e,a,l,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(me(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function l(s){return t(s)}}function uu(e,n,t){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),n):t(a)}}const cu={name:"labelStartImage",resolveAll:Pn.resolveAll,tokenize:fu};function fu(e,n,t){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):t(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const hu={name:"labelStartLink",resolveAll:Pn.resolveAll,tokenize:pu};function pu(e,n,t){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):n(l)}}const Rt={name:"lineEnding",tokenize:du};function du(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,n,"linePrefix")}}const yt={name:"thematicBreak",tokenize:mu};function mu(e,n,t){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||R(u))?(e.exit("thematicBreak"),n(u)):t(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),H(u)?V(e,s,"whitespace")(u):s(u))}}const ie={continuation:{tokenize:bu},exit:wu,name:"list",tokenize:yu},gu={partial:!0,tokenize:Su},xu={partial:!0,tokenize:ku};function yu(e,n,t){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:sn(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(yt,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return t(p)}function o(p){return sn(p)&&++l<10?(e.consume(p),o):(!r.interrupt||l<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(ft,r.interrupt?t:f,e.attempt(gu,d,c))}function f(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function c(p){return H(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function bu(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ft,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,n,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!H(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xu,n,l)(s))}function l(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(ie,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function ku(e,n,t){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(a):t(a)}}function wu(e){e.exit(this.containerState.type)}function Su(e,n,t){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=r.events[r.events.length-1];return!H(a)&&l&&l[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const mr={name:"setextUnderline",resolveTo:Cu,tokenize:vu};function Cu(e,n){let t=e.length,r,i,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,n]),e}function vu(e,n,t){const r=this;let i;return a;function a(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)):t(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),H(u)?V(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||R(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const ju={tokenize:Eu};function Eu(e){const n=this,t=e.attempt(ft,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Po,i)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Nu={resolveAll:Ei()},Au=ji("string"),Iu=ji("text");function ji(e){return{resolveAll:Ei(e==="text"?Tu:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],a=t.attempt(i,l,s);return l;function l(f){return u(f)?a(f):s(f)}function s(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),o}function o(f){return u(f)?(t.exit("data"),a(f)):(t.consume(f),o)}function u(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d<c.length;){const p=c[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ei(e){return n;function n(t,r){let i=-1,a;for(;++i<=t.length;)a===void 0?t[i]&&t[i][1].type==="data"&&(a=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==a+2&&(t[a][1].end=t[i-1][1].end,t.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(t,r):t}}function Tu(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let a=i.length,l=-1,s=0,o;for(;a--;){const u=i[a];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(u===-2)o=!0,s++;else if(u!==-1){a++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const u={type:t===e.length||o||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const Pu={42:ie,43:ie,45:ie,48:ie,49:ie,50:ie,51:ie,52:ie,53:ie,54:ie,55:ie,56:ie,57:ie,62:yi},zu={91:Mo},Du={[-2]:_t,[-1]:_t,32:_t},Lu={35:Ho,42:yt,45:[mr,yt],60:Wo,61:mr,95:yt,96:pr,126:pr},Fu={38:ki,92:bi},Mu={[-5]:Rt,[-4]:Rt,[-3]:Rt,33:cu,38:ki,42:on,60:[fo,Zo],91:hu,92:[Bo,bi],93:Pn,95:on,96:jo},_u={null:[on,Nu]},Ru={null:[42,95]},Ou={null:[]},Bu=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ru,contentInitial:zu,disable:Ou,document:Pu,flow:Lu,flowInitial:Du,insideSpan:_u,string:Fu,text:Mu},Symbol.toStringTag,{value:"Module"}));function $u(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},a=[];let l=[],s=[];const o={attempt:D(v),check:D(b),consume:E,enter:j,exit:N,interrupt:D(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:w,events:[],now:m,parser:e,previous:null,sliceSerialize:d,sliceStream:p,write:c};let f=n.tokenize.call(u,o);return n.resolveAll&&a.push(n),u;function c(T){return l=ce(l,T),S(),l[l.length-1]!==null?[]:(F(n,0),u.events=It(a,u.events,u),u.events)}function d(T,z){return Uu(p(T),z)}function p(T){return Hu(l,T)}function m(){const{_bufferIndex:T,_index:z,line:B,column:_,offset:L}=r;return{_bufferIndex:T,_index:z,line:B,column:_,offset:L}}function w(T){i[T.line]=T.column,y()}function S(){let T;for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<z.length;)k(z.charCodeAt(r._bufferIndex));else k(z)}}function k(T){f=f(T)}function E(T){R(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,y()):T!==-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=T}function j(T,z){const B=z||{};return B.type=T,B.start=m(),u.events.push(["enter",B,u]),s.push(B),B}function N(T){const z=s.pop();return z.end=m(),u.events.push(["exit",z,u]),z}function v(T,z){F(T,z.from)}function b(T,z){z.restore()}function D(T,z){return B;function B(_,L,q){let K,fe,ke,g;return Array.isArray(_)?we(_):"tokenize"in _?we([_]):he(_);function he(Z){return Xe;function Xe(je){const Re=je!==null&&Z[je],Oe=je!==null&&Z.null,pt=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return we(pt)(je)}}function we(Z){return K=Z,fe=0,Z.length===0?q:x(Z[fe])}function x(Z){return Xe;function Xe(je){return g=M(),ke=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?Te():Z.tokenize.call(z?Object.assign(Object.create(u),z):u,o,pe,Te)(je)}}function pe(Z){return T(ke,g),L}function Te(Z){return g.restore(),++fe<K.length?x(K[fe]):q}}}function F(T,z){T.resolveAll&&!a.includes(T)&&a.push(T),T.resolve&&ue(u.events,z,u.events.length-z,T.resolve(u.events.slice(z),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function M(){const T=m(),z=u.previous,B=u.currentConstruct,_=u.events.length,L=Array.from(s);return{from:_,restore:q};function q(){r=T,u.previous=z,u.currentConstruct=B,u.events.length=_,s=L,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Hu(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,a=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,a)];else{if(l=e.slice(t,i),r>-1){const s=l[0];typeof s=="string"?l[0]=s.slice(r):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function Uu(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const a=e[t];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
4
|
+
`;break}case-3:{l=`\r
|
|
5
|
+
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,r.push(l)}return r.join("")}function Vu(e){const r={constructs:gi([Bu,...(e||{}).extensions||[]]),content:i(io),defined:[],document:i(ao),flow:i(ju),lazy:{},string:i(Au),text:i(Iu)};return r;function i(a){return l;function l(s){return $u(r,a,s)}}}function qu(e){for(;!wi(e););return e}const gr=/[\0\t\n\r]/g;function Wu(){let e=1,n="",t=!0,r;return i;function i(a,l,s){const o=[];let u,f,c,d,p;for(a=n+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),c=0,n="",t&&(a.charCodeAt(0)===65279&&c++,t=void 0);c<a.length;){if(gr.lastIndex=c,u=gr.exec(a),d=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(d),!u){n=a.slice(c);break}if(p===10&&c===d&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),c<d&&(o.push(a.slice(c,d)),e+=d-c),p){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}c=d+1}return s&&(r&&o.push(-5),n&&o.push(n),o.push(null)),o}}const Ju=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gu(e){return e.replace(Ju,Xu)}function Xu(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),a=i===120||i===88;return xi(t.slice(a?2:1),a?16:10)}return Tn(t)||e}const Ni={}.hasOwnProperty;function Yu(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Ku(t)(qu(Vu(t).document().write(Wu()(e,n,!0))))}function Ku(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Vn),autolinkProtocol:M,autolinkEmail:M,atxHeading:a($n),blockQuote:a(Oe),characterEscape:M,characterReference:M,codeFenced:a(pt),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(pt,l),codeText:a(ul,l),codeTextData:M,data:M,codeFlowValue:M,definition:a(cl),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(fl),hardBreakEscape:a(Hn),hardBreakTrailing:a(Hn),htmlFlow:a(Un,l),htmlFlowData:M,htmlText:a(Un,l),htmlTextData:M,image:a(hl),label:l,link:a(Vn),listItem:a(pl),listItemValue:d,listOrdered:a(qn,c),listUnordered:a(qn),paragraph:a(dl),reference:x,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a($n),strong:a(ml),thematicBreak:a(xl)},exit:{atxHeading:o(),atxHeadingSequence:v,autolink:o(),autolinkEmail:Re,autolinkProtocol:je,blockQuote:o(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:Z,characterReference:Xe,codeFenced:o(S),codeFencedFence:w,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:y,codeIndented:o(k),codeText:o(L),codeTextData:y,data:y,definition:o(),definitionDestinationString:N,definitionLabelString:E,definitionTitleString:j,emphasis:o(),hardBreakEscape:o(z),hardBreakTrailing:o(z),htmlFlow:o(B),htmlFlowData:y,htmlText:o(_),htmlTextData:y,image:o(K),label:ke,labelText:fe,lineEnding:T,link:o(q),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:pe,resourceDestinationString:g,resourceTitleString:he,resource:we,setextHeading:o(F),setextHeadingLineSequence:D,setextHeadingText:b,strong:o(),thematicBreak:o()}};Ai(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(C){let P={type:"root",children:[]};const $={stack:[P],tokenStack:[],config:n,enter:s,exit:u,buffer:l,resume:f,data:t},U=[];let W=-1;for(;++W<C.length;)if(C[W][1].type==="listOrdered"||C[W][1].type==="listUnordered")if(C[W][0]==="enter")U.push(W);else{const de=U.pop();W=i(C,de,W)}for(W=-1;++W<C.length;){const de=n[C[W][0]];Ni.call(de,C[W][1].type)&&de[C[W][1].type].call(Object.assign({sliceSerialize:C[W][2].sliceSerialize},$),C[W][1])}if($.tokenStack.length>0){const de=$.tokenStack[$.tokenStack.length-1];(de[1]||xr).call($,void 0,de[0])}for(P.position={start:Ee(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Ee(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},W=-1;++W<n.transforms.length;)P=n.transforms[W](P)||P;return P}function i(C,P,$){let U=P-1,W=-1,de=!1,Pe,Se,Ye,Ke;for(;++U<=$;){const se=C[U];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?W++:W--,Ke=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(Pe&&!Ke&&!W&&!Ye&&(Ye=U),Ke=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ke=void 0}if(!W&&se[0]==="enter"&&se[1].type==="listItemPrefix"||W===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(Pe){let Be=U;for(Se=void 0;Be--;){const Ce=C[Be];if(Ce[1].type==="lineEnding"||Ce[1].type==="lineEndingBlank"){if(Ce[0]==="exit")continue;Se&&(C[Se][1].type="lineEndingBlank",de=!0),Ce[1].type="lineEnding",Se=Be}else if(!(Ce[1].type==="linePrefix"||Ce[1].type==="blockQuotePrefix"||Ce[1].type==="blockQuotePrefixWhitespace"||Ce[1].type==="blockQuoteMarker"||Ce[1].type==="listItemIndent"))break}Ye&&(!Se||Ye<Se)&&(Pe._spread=!0),Pe.end=Object.assign({},Se?C[Se][1].start:se[1].end),C.splice(Se||U,0,["exit",Pe,se[2]]),U++,$++}if(se[1].type==="listItemPrefix"){const Be={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};Pe=Be,C.splice(U,0,["enter",Be,se[2]]),U++,$++,Ye=void 0,Ke=!0}}}return C[P][1]._spread=de,$}function a(C,P){return $;function $(U){s.call(this,C(U),U),P&&P.call(this,U)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(C,P,$){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([P,$||void 0]),C.position={start:Ee(P.start),end:void 0}}function o(C){return P;function P($){C&&C.call(this,$),u.call(this,$)}}function u(C,P){const $=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==C.type&&(P?P.call(this,C,U[0]):(U[1]||xr).call(this,C,U[0]));else throw new Error("Cannot close `"+C.type+"` ("+nt({start:C.start,end:C.end})+"): it’s not open");$.position.end=Ee(C.end)}function f(){return In(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function d(C){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function p(){const C=this.resume(),P=this.stack[this.stack.length-1];P.lang=C}function m(){const C=this.resume(),P=this.stack[this.stack.length-1];P.meta=C}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C.replace(/(\r?\n|\r)$/g,"")}function E(C){const P=this.resume(),$=this.stack[this.stack.length-1];$.label=P,$.identifier=me(this.sliceSerialize(C)).toLowerCase()}function j(){const C=this.resume(),P=this.stack[this.stack.length-1];P.title=C}function N(){const C=this.resume(),P=this.stack[this.stack.length-1];P.url=C}function v(C){const P=this.stack[this.stack.length-1];if(!P.depth){const $=this.sliceSerialize(C).length;P.depth=$}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function D(C){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function M(C){const $=this.stack[this.stack.length-1].children;let U=$[$.length-1];(!U||U.type!=="text")&&(U=gl(),U.position={start:Ee(C.start),end:void 0},$.push(U)),this.stack.push(U)}function y(C){const P=this.stack.pop();P.value+=this.sliceSerialize(C),P.position.end=Ee(C.end)}function T(C){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const $=P.children[P.children.length-1];$.position.end=Ee(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(P.type)&&(M.call(this,C),y.call(this,C))}function z(){this.data.atHardBreak=!0}function B(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function _(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function L(){const C=this.resume(),P=this.stack[this.stack.length-1];P.value=C}function q(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=P,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function K(){const C=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=P,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function fe(C){const P=this.sliceSerialize(C),$=this.stack[this.stack.length-2];$.label=Gu(P),$.identifier=me(P).toLowerCase()}function ke(){const C=this.stack[this.stack.length-1],P=this.resume(),$=this.stack[this.stack.length-1];if(this.data.inReference=!0,$.type==="link"){const U=C.children;$.children=U}else $.alt=P}function g(){const C=this.resume(),P=this.stack[this.stack.length-1];P.url=C}function he(){const C=this.resume(),P=this.stack[this.stack.length-1];P.title=C}function we(){this.data.inReference=void 0}function x(){this.data.referenceType="collapsed"}function pe(C){const P=this.resume(),$=this.stack[this.stack.length-1];$.label=P,$.identifier=me(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Te(C){this.data.characterReferenceType=C.type}function Z(C){const P=this.sliceSerialize(C),$=this.data.characterReferenceType;let U;$?(U=xi(P,$==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=Tn(P);const W=this.stack[this.stack.length-1];W.value+=U}function Xe(C){const P=this.stack.pop();P.position.end=Ee(C.end)}function je(C){y.call(this,C);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(C)}function Re(C){y.call(this,C);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(C)}function Oe(){return{type:"blockquote",children:[]}}function pt(){return{type:"code",lang:null,meta:null,value:""}}function ul(){return{type:"inlineCode",value:""}}function cl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fl(){return{type:"emphasis",children:[]}}function $n(){return{type:"heading",depth:0,children:[]}}function Hn(){return{type:"break"}}function Un(){return{type:"html",value:""}}function hl(){return{type:"image",title:null,url:"",alt:null}}function Vn(){return{type:"link",title:null,url:"",children:[]}}function qn(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function pl(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function dl(){return{type:"paragraph",children:[]}}function ml(){return{type:"strong",children:[]}}function gl(){return{type:"text",value:""}}function xl(){return{type:"thematicBreak"}}}function Ee(e){return{line:e.line,column:e.column,offset:e.offset}}function Ai(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Ai(e,r):Qu(e,r)}}function Qu(e,n){let t;for(t in n)if(Ni.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function xr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+nt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+nt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+nt({start:n.start,end:n.end})+") is still open")}function Zu(e){const n=this;n.parser=t;function t(r){return Yu(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function ec(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function tc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
6
|
+
`}]}function nc(e,n){const t=n.value?n.value+`
|
|
7
|
+
`:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function rc(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ic(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function lc(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ge(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,s+=1,e.footnoteCounts.set(r,s);const o={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(n,u),e.applyData(n,u)}function ac(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function sc(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Ii(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function oc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ii(e,n);const i={src:Ge(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function uc(e,n){const t={src:Ge(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function cc(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function fc(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Ii(e,n);const i={href:Ge(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function hc(e,n){const t={href:Ge(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function pc(e,n,t){const r=e.all(n),i=t?dc(t):Ti(n),a={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
8
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
|
|
9
|
+
`});const u={type:"element",tagName:"li",properties:a,children:l};return e.patch(n,u),e.applyData(n,u)}function dc(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Ti(t[r])}return n}function Ti(e){const n=e.spread;return n??e.children.length>1}function mc(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const a={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function gc(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xc(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function yc(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bc(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},s=jn(n.children[1]),o=ui(n.children[n.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,a),e.applyData(n,a)}function kc(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,s=l?l.length:n.children.length;let o=-1;const u=[];for(;++o<s;){const c=n.children[o],d={},p=l?l[o]:void 0;p&&(d.align=p);let m={type:"element",tagName:a,properties:d,children:[]};c&&(m.children=e.all(c),e.patch(c,m),m=e.applyData(c,m)),u.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function wc(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const yr=9,br=32;function Sc(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const a=[];for(;r;)a.push(kr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return a.push(kr(n.slice(i),i>0,!1)),a.join("")}function kr(e,n,t){let r=0,i=e.length;if(n){let a=e.codePointAt(r);for(;a===yr||a===br;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(i-1);for(;a===yr||a===br;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Cc(e,n){const t={type:"text",value:Sc(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function vc(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const jc={blockquote:ec,break:tc,code:nc,delete:rc,emphasis:ic,footnoteReference:lc,heading:ac,html:sc,imageReference:oc,image:uc,inlineCode:cc,linkReference:fc,link:hc,listItem:pc,list:mc,paragraph:gc,root:xc,strong:yc,table:bc,tableCell:wc,tableRow:kc,text:Cc,thematicBreak:vc,toml:dt,yaml:dt,definition:dt,footnoteDefinition:dt};function dt(){}const Pi=-1,Tt=0,it=1,Ct=2,zn=3,Dn=4,Ln=5,Fn=6,zi=7,Di=8,{defineProperty:Ec}=Object,Li=typeof self=="object"?self:globalThis,wr=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Li[e](n)},Nc=(e,n)=>{const t=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,l]=n[i];switch(a){case Tt:case Pi:return t(l,i);case it:{const s=t([],i);for(const o of l)s.push(r(o));return s}case Ct:{const s=t({},i);for(const[o,u]of l){const f=r(o),c=r(u);f==="__proto__"?Ec(s,f,{value:c,configurable:!0,enumerable:!0,writable:!0}):s[f]=c}return s}case zn:return t(new Date(l),i);case Dn:{const{source:s,flags:o}=l;return t(new RegExp(s,o),i)}case Ln:{const s=t(new Map,i);for(const[o,u]of l)s.set(r(o),r(u));return s}case Fn:{const s=t(new Set,i);for(const o of l)s.add(r(o));return s}case zi:{const{name:s,message:o}=l;return t(typeof Li[s]=="function"?wr(s,o):new Error(o),i)}case Di:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:s}=new Uint8Array(l);return t(new DataView(s),l)}case"-0":return-0}return t(wr(a,l),i)};return r},Sr=e=>Nc(new Map,e)(0),Le="",{toString:Ac}={},{keys:Ic,is:Tc}=Object,tt=e=>{const n=typeof e;if(n!=="object"||!e)return[Tt,n];const t=Ac.call(e).slice(8,-1);switch(t){case"Array":return[it,Le];case"Object":return[Ct,Le];case"Date":return[zn,Le];case"RegExp":return[Dn,Le];case"Map":return[Ln,Le];case"Set":return[Fn,Le];case"DataView":return[it,t]}return t.includes("Array")?[it,t]:e instanceof Error?[zi,e.name||"Error"]:[Ct,t]},mt=([e,n])=>e===Tt&&(n==="function"||n==="symbol"),Pc=(e,n,t,r)=>{const i=(l,s)=>{const o=r.push(l)-1;return t.set(s,o),o},a=l=>{if(t.has(l))return t.get(l);let[s,o]=tt(l);switch(s){case Tt:{let f=l;switch(o){case"bigint":s=Di,f=l.toString();break;case"number":if(!l&&Tc(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([Pi],l)}return i([s,f],l)}case it:{if(o){let d=l;return o==="DataView"?d=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(d=new Uint8Array(l)),i([o,[...d]],l)}const f=[],c=i([s,f],l);for(const d of l)f.push(a(d));return c}case Ct:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(n&&"toJSON"in l)return a(l.toJSON());const f=[],c=i([s,f],l);for(const d of Ic(l))(e||!mt(tt(l[d])))&&f.push([a(d),a(l[d])]);return c}case zn:return i([s,isNaN(l.getTime())?Le:l.toISOString()],l);case Dn:{const{source:f,flags:c}=l;return i([s,{source:f,flags:c}],l)}case Ln:{const f=[],c=i([s,f],l);for(const[d,p]of l)(e||!(mt(tt(d))||mt(tt(p))))&&f.push([a(d),a(p)]);return c}case Fn:{const f=[],c=i([s,f],l);for(const d of l)(e||!mt(tt(d)))&&f.push(a(d));return c}}const{message:u}=l;return i([s,{name:o,message:u}],l)};return a},Cr=(e,{json:n,lossy:t}={})=>{const r=[];return Pc(!(n||t),!!n,new Map,r)(e),r},vt=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Sr(Cr(e,n)):structuredClone(e):(e,n)=>Sr(Cr(e,n));function zc(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Dc(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Lc(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||zc,r=e.options.footnoteBackLabel||Dc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),d=Ge(c.toLowerCase());let p=0;const m=[],w=e.footnoteCounts.get(c);for(;w!==void 0&&++p<=w;){m.length>0&&m.push({type:"text",value:" "});let E=typeof t=="string"?t:t(o,p);typeof E=="string"&&(E={type:"text",value:E}),m.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const E=S.children[S.children.length-1];E&&E.type==="text"?E.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...m)}else f.push(...m);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...vt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
10
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
11
|
+
`}]}}const Pt=(function(e){if(e==null)return Rc;if(typeof e=="function")return zt(e);if(typeof e=="object")return Array.isArray(e)?Fc(e):Mc(e);if(typeof e=="string")return _c(e);throw new Error("Expected function, string, or object as test")});function Fc(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Pt(e[t]);return zt(r);function r(...i){let a=-1;for(;++a<n.length;)if(n[a].apply(this,i))return!0;return!1}}function Mc(e){const n=e;return zt(t);function t(r){const i=r;let a;for(a in e)if(i[a]!==n[a])return!1;return!0}}function _c(e){return zt(n);function n(t){return t&&t.type===e}}function zt(e){return n;function n(t,r,i){return!!(Oc(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Rc(){return!0}function Oc(e){return e!==null&&typeof e=="object"&&"type"in e}const Fi=[],Bc=!0,un=!1,$c="skip";function Mi(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const a=Pt(i),l=r?-1:1;s(e,void 0,[])();function s(o,u,f){const c=o&&typeof o=="object"?o:{};if(typeof c.type=="string"){const p=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Fi,m,w,S;if((!n||a(o,u,f[f.length-1]||void 0))&&(p=Hc(t(o,f)),p[0]===un))return p;if("children"in o&&o.children){const k=o;if(k.children&&p[0]!==$c)for(w=(r?k.children.length:-1)+l,S=f.concat(k);w>-1&&w<k.children.length;){const E=k.children[w];if(m=s(E,w,S)(),m[0]===un)return m;w=typeof m[1]=="number"?m[1]:w+l}}return p}}}function Hc(e){return Array.isArray(e)?e:typeof e=="number"?[Bc,e]:e==null?Fi:[e]}function Mn(e,n,t,r){let i,a,l;typeof n=="function"&&typeof t!="function"?(a=void 0,l=n,i=t):(a=n,l=t,i=r),Mi(e,a,s,i);function s(o,u){const f=u[u.length-1],c=f?f.children.indexOf(o):void 0;return l(o,c,f)}}const cn={}.hasOwnProperty,Uc={};function Vc(e,n){const t=n||Uc,r=new Map,i=new Map,a=new Map,l={...jc,...t.handlers},s={all:u,applyData:Wc,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:o,options:t,patch:qc,wrap:Gc};return Mn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();c.has(d)||c.set(d,f)}}),s;function o(f,c){const d=f.type,p=s.handlers[d];if(cn.call(s.handlers,d)&&p)return p(s,f,c);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in f){const{children:w,...S}=f,k=vt(S);return k.children=s.all(f),k}return vt(f)}return(s.options.unknownHandler||Jc)(s,f,c)}function u(f){const c=[];if("children"in f){const d=f.children;let p=-1;for(;++p<d.length;){const m=s.one(d[p],f);if(m){if(p&&d[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vr(m.value)),!Array.isArray(m)&&m.type==="element")){const w=m.children[0];w&&w.type==="text"&&(w.value=vr(w.value))}Array.isArray(m)?c.push(...m):c.push(m)}}}return c}}function qc(e,n){e.position&&(n.position=Ts(e))}function Wc(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&a&&Object.assign(t.properties,vt(a)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Jc(e,n){const t=n.data||{},r="value"in n&&!(cn.call(t,"hProperties")||cn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Gc(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
12
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
13
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
14
|
+
`}),t}function vr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function jr(e,n){const t=Vc(e,n),r=t.one(e,void 0),i=Lc(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
15
|
+
`},i),a}function Xc(e,n){return e&&"run"in e?async function(t,r){const i=jr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return jr(t,{file:r,...e||n})}}function Er(e){if(e)throw e}var Ot,Nr;function Yc(){if(Nr)return Ot;Nr=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},a=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var d;for(d in u);return typeof d>"u"||e.call(u,d)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},s=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return Ot=function o(){var u,f,c,d,p,m,w=arguments[0],S=1,k=arguments.length,E=!1;for(typeof w=="boolean"&&(E=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<k;++S)if(u=arguments[S],u!=null)for(f in u)c=s(w,f),d=s(u,f),w!==d&&(E&&d&&(a(d)||(p=i(d)))?(p?(p=!1,m=c&&i(c)?c:[]):m=c&&a(c)?c:{},l(w,{name:f,newValue:o(E,m,d)})):typeof d<"u"&&l(w,{name:f,newValue:d}));return w},Ot}var Kc=Yc();const Bt=Gr(Kc);function fn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qc(){const e=[],n={run:t,use:r};return n;function t(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(o,...u){const f=e[++a];let c=-1;if(o){l(o);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Zc(f,s)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Zc(e,n){let t;return r;function r(...l){const s=e.length>l.length;let o;s&&l.push(i);try{o=e.apply(this,l)}catch(u){const f=u;if(s&&t)throw f;return i(f)}s||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(l,...s){t||(t=!0,n(l,...s))}function a(l){i(null,l)}}const ge={basename:ef,dirname:tf,extname:nf,join:rf,sep:"/"};function ef(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ht(e);let t=0,r=-1,i=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,s=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){t=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===n.codePointAt(s--)?s<0&&(r=i):(s=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function tf(e){if(ht(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function nf(e){ht(e);let n=e.length,t=-1,r=0,i=-1,a=0,l;for(;n--;){const s=e.codePointAt(n);if(s===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),s===46?i<0?i=n:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||t<0||a===0||a===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function rf(...e){let n=-1,t;for(;++n<e.length;)ht(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":lf(t)}function lf(e){ht(e);const n=e.codePointAt(0)===47;let t=af(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function af(e,n){let t="",r=0,i=-1,a=0,l=-1,s,o;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(o=t.lastIndexOf("/"),o!==t.length-1){o<0?(t="",r=0):(t=t.slice(0,o),r=t.length-1-t.lastIndexOf("/")),i=l,a=0;continue}}else if(t.length>0){t="",r=0,i=l,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,a=0}else s===46&&a>-1?a++:a=-1}return t}function ht(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sf={cwd:of};function of(){return"/"}function hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uf(e){if(typeof e=="string")e=new URL(e);else if(!hn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return cf(e)}function cf(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const $t=["history","path","basename","stem","extname","dirname"];class _i{constructor(n){let t;n?hn(n)?t={path:n}:typeof n=="string"||ff(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":sf.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$t.length;){const a=$t[r];a in t&&t[a]!==void 0&&t[a]!==null&&(this[a]=a==="history"?[...t[a]]:t[a])}let i;for(i in t)$t.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ge.basename(this.path):void 0}set basename(n){Ut(n,"basename"),Ht(n,"basename"),this.path=ge.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ge.dirname(this.path):void 0}set dirname(n){Ar(this.basename,"dirname"),this.path=ge.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ge.extname(this.path):void 0}set extname(n){if(Ht(n,"extname"),Ar(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ge.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){hn(n)&&(n=uf(n)),Ut(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ge.basename(this.path,this.extname):void 0}set stem(n){Ut(n,"stem"),Ht(n,"stem"),this.path=ge.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new ne(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ht(e,n){if(e&&e.includes(ge.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ge.sep+"`")}function Ut(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ar(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function ff(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hf=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),pf={}.hasOwnProperty;class _n extends hf{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Qc()}copy(){const n=new _n;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Bt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Wt("data",this.frozen),this.namespace[n]=t,this):pf.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Wt("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=gt(n),r=this.parser||this.Parser;return Vt("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),Vt("process",this.parser||this.Parser),qt("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(a,l){const s=gt(n),o=r.parse(s);r.run(o,s,function(f,c,d){if(f||!c||!d)return u(f);const p=c,m=r.stringify(p,d);gf(m)?d.value=m:d.result=m,u(f,d)});function u(f,c){f||!c?l(f):a?a(c):t(void 0,c)}}}processSync(n){let t=!1,r;return this.freeze(),Vt("processSync",this.parser||this.Parser),qt("processSync",this.compiler||this.Compiler),this.process(n,i),Tr("processSync","process",t),r;function i(a,l){t=!0,Er(a),r=l}}run(n,t,r){Ir(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?a(void 0,r):new Promise(a);function a(l,s){const o=gt(t);i.run(n,o,u);function u(f,c,d){const p=c||n;f?s(f):l?l(p):r(void 0,p,d)}}}runSync(n,t){let r=!1,i;return this.run(n,t,a),Tr("runSync","run",r),i;function a(l,s){Er(l),i=s,r=!0}}stringify(n,t){this.freeze();const r=gt(t),i=this.compiler||this.Compiler;return qt("stringify",i),Ir(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Wt("use",this.frozen),n!=null)if(typeof n=="function")o(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function a(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;o(f,c)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(u.plugins),u.settings&&(i.settings=Bt(!0,i.settings,u.settings))}function s(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];a(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,f){let c=-1,d=-1;for(;++c<r.length;)if(r[c][0]===u){d=c;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[p,...m]=f;const w=r[d][1];fn(w)&&fn(p)&&(p=Bt(!0,w,p)),r[d]=[u,p,...m]}}}}const df=new _n().freeze();function Vt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wt(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ir(e){if(!fn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Tr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function gt(e){return mf(e)?e:new _i(e)}function mf(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gf(e){return typeof e=="string"||xf(e)}function xf(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yf="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pr=[],zr={allowDangerousHtml:!0},bf=/^(https?|ircs?|mailto|xmpp)$/i,kf=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function wf(e){const n=Sf(e),t=Cf(e);return vf(n.runSync(n.parse(t),t),e)}function Sf(e){const n=e.rehypePlugins||Pr,t=e.remarkPlugins||Pr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...zr}:zr;return df().use(Zu).use(t).use(Xc,r).use(n)}function Cf(e){const n=e.children||"",t=new _i;return typeof n=="string"&&(t.value=n),t}function vf(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,a=n.disallowedElements,l=n.skipHtml,s=n.unwrapDisallowed,o=n.urlTransform||jf;for(const f of kf)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+yf+f.id,void 0);return Mn(e,u),Fs(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function u(f,c,d){if(f.type==="raw"&&d&&typeof c=="number")return l?d.children.splice(c,1):d.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let p;for(p in Mt)if(Object.hasOwn(Mt,p)&&Object.hasOwn(f.properties,p)){const m=f.properties[p],w=Mt[p];(w===null||w.includes(f.tagName))&&(f.properties[p]=o(String(m||""),p,f))}}if(f.type==="element"){let p=t?!t.includes(f.tagName):a?a.includes(f.tagName):!1;if(!p&&r&&typeof c=="number"&&(p=!r(f,c,d)),p&&d&&typeof c=="number")return s&&f.children?d.children.splice(c,1,...f.children):d.children.splice(c,1),c}}}function jf(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||bf.test(e.slice(0,n))?e:""}function Dr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}function Ef(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Nf(e,n,t){const i=Pt((t||{}).ignore||[]),a=Af(n);let l=-1;for(;++l<a.length;)Mi(e,"text",s);function s(u,f){let c=-1,d;for(;++c<f.length;){const p=f[c],m=d?d.children:void 0;if(i(p,m?m.indexOf(p):void 0,d))return;d=p}if(d)return o(u,f)}function o(u,f){const c=f[f.length-1],d=a[l][0],p=a[l][1];let m=0;const S=c.children.indexOf(u);let k=!1,E=[];d.lastIndex=0;let j=d.exec(u.value);for(;j;){const N=j.index,v={index:j.index,input:j.input,stack:[...f,u]};let b=p(...j,v);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1?d.lastIndex=N+1:(m!==N&&E.push({type:"text",value:u.value.slice(m,N)}),Array.isArray(b)?E.push(...b):b&&E.push(b),m=N+j[0].length,k=!0),!d.global)break;j=d.exec(u.value)}return k?(m<u.value.length&&E.push({type:"text",value:u.value.slice(m)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function Af(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([If(i[0]),Tf(i[1])])}return n}function If(e){return typeof e=="string"?new RegExp(Ef(e),"g"):e}function Tf(e){return typeof e=="function"?e:function(){return e}}const Jt="phrasing",Gt=["autolink","link","image","label"];function Pf(){return{transforms:[Rf],enter:{literalAutolink:Df,literalAutolinkEmail:Xt,literalAutolinkHttp:Xt,literalAutolinkWww:Xt},exit:{literalAutolink:_f,literalAutolinkEmail:Mf,literalAutolinkHttp:Lf,literalAutolinkWww:Ff}}}function zf(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Gt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jt,notInConstruct:Gt},{character:":",before:"[ps]",after:"\\/",inConstruct:Jt,notInConstruct:Gt}]}}function Df(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xt(e){this.config.enter.autolinkProtocol.call(this,e)}function Lf(e){this.config.exit.autolinkProtocol.call(this,e)}function Ff(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function Mf(e){this.config.exit.autolinkEmail.call(this,e)}function _f(e){this.exit(e)}function Rf(e){Nf(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Of],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Bf]],{ignore:["link","linkReference"]})}function Of(e,n,t,r,i){let a="";if(!Ri(i)||(/^w/i.test(n)&&(t=n+t,n="",a="http://"),!$f(t)))return!1;const l=Hf(t+r);if(!l[0])return!1;const s={type:"link",title:null,url:a+n+l[0],children:[{type:"text",value:n+l[0]}]};return l[1]?[s,{type:"text",value:l[1]}]:s}function Bf(e,n,t,r){return!Ri(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function $f(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function Hf(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const i=Dr(e,"(");let a=Dr(e,")");for(;r!==-1&&i>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function Ri(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Me(t)||At(t))&&(!n||t!==47)}Oi.peek=Kf;function Uf(){this.buffer()}function Vf(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qf(){this.buffer()}function Wf(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Jf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=me(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Gf(e){this.exit(e)}function Xf(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=me(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Yf(e){this.exit(e)}function Kf(){return"["}function Oi(e,n,t,r){const i=t.createTracker(r);let a=i.move("[^");const l=t.enter("footnoteReference"),s=t.enter("reference");return a+=i.move(t.safe(t.associationId(e),{after:"]",before:a})),s(),l(),a+=i.move("]"),a}function Qf(){return{enter:{gfmFootnoteCallString:Uf,gfmFootnoteCall:Vf,gfmFootnoteDefinitionLabelString:qf,gfmFootnoteDefinition:Wf},exit:{gfmFootnoteCallString:Jf,gfmFootnoteCall:Gf,gfmFootnoteDefinitionLabelString:Xf,gfmFootnoteDefinition:Yf}}}function Zf(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Oi},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,a,l){const s=a.createTracker(l);let o=s.move("[^");const u=a.enter("footnoteDefinition"),f=a.enter("label");return o+=s.move(a.safe(a.associationId(r),{before:o,after:"]"})),f(),o+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),o+=s.move((n?`
|
|
16
|
+
`:" ")+a.indentLines(a.containerFlow(r,s.current()),n?Bi:eh))),u(),o}}function eh(e,n,t){return n===0?e:Bi(e,n,t)}function Bi(e,n,t){return(t?"":" ")+e}const th=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$i.peek=ah;function nh(){return{canContainEols:["delete"],enter:{strikethrough:ih},exit:{strikethrough:lh}}}function rh(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:th}],handlers:{delete:$i}}}function ih(e){this.enter({type:"delete",children:[]},e)}function lh(e){this.exit(e)}function $i(e,n,t,r){const i=t.createTracker(r),a=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function ah(){return"~"}function sh(e){return e.length}function oh(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||sh,a=[],l=[],s=[],o=[];let u=0,f=-1;for(;++f<e.length;){const w=[],S=[];let k=-1;for(e[f].length>u&&(u=e[f].length);++k<e[f].length;){const E=uh(e[f][k]);if(t.alignDelimiters!==!1){const j=i(E);S[k]=j,(o[k]===void 0||j>o[k])&&(o[k]=j)}w.push(E)}l[f]=w,s[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)a[c]=Lr(r[c]);else{const w=Lr(r);for(;++c<u;)a[c]=w}c=-1;const d=[],p=[];for(;++c<u;){const w=a[c];let S="",k="";w===99?(S=":",k=":"):w===108?S=":":w===114&&(k=":");let E=t.alignDelimiters===!1?1:Math.max(1,o[c]-S.length-k.length);const j=S+"-".repeat(E)+k;t.alignDelimiters!==!1&&(E=S.length+E+k.length,E>o[c]&&(o[c]=E),p[c]=E),d[c]=j}l.splice(1,0,d),s.splice(1,0,p),f=-1;const m=[];for(;++f<l.length;){const w=l[f],S=s[f];c=-1;const k=[];for(;++c<u;){const E=w[c]||"";let j="",N="";if(t.alignDelimiters!==!1){const v=o[c]-(S[c]||0),b=a[c];b===114?j=" ".repeat(v):b===99?v%2?(j=" ".repeat(v/2+.5),N=" ".repeat(v/2-.5)):(j=" ".repeat(v/2),N=j):N=" ".repeat(v)}t.delimiterStart!==!1&&!c&&k.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||c)&&k.push(" "),t.alignDelimiters!==!1&&k.push(j),k.push(E),t.alignDelimiters!==!1&&k.push(N),t.padding!==!1&&k.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&k.push("|")}m.push(t.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return m.join(`
|
|
17
|
+
`)}function uh(e){return e==null?"":String(e)}function Lr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function ch(e,n,t,r){const i=t.enter("blockquote"),a=t.createTracker(r);a.move("> "),a.shift(2);const l=t.indentLines(t.containerFlow(e,a.current()),fh);return i(),l}function fh(e,n,t){return">"+(t?"":" ")+e}function hh(e,n){return Fr(e,n.inConstruct,!0)&&!Fr(e,n.notInConstruct,!1)}function Fr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Mr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
|
18
|
+
`&&hh(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
19
|
+
`}function ph(e,n){const t=String(e);let r=t.indexOf(n),i=r,a=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>l&&(l=a):a=1,i=r+n.length,r=t.indexOf(n,i);return l}function dh(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function mh(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function gh(e,n,t,r){const i=mh(t),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(dh(e,t)){const c=t.enter("codeIndented"),d=t.indentLines(a,xh);return c(),d}const s=t.createTracker(r),o=i.repeat(Math.max(ph(a,i)+1,3)),u=t.enter("codeFenced");let f=s.move(o);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=s.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=s.move(" "),f+=s.move(t.safe(e.meta,{before:f,after:`
|
|
20
|
+
`,encode:["`"],...s.current()})),c()}return f+=s.move(`
|
|
21
|
+
`),a&&(f+=s.move(a+`
|
|
22
|
+
`)),f+=s.move(o),u(),f}function xh(e,n,t){return(t?"":" ")+e}function Rn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function yh(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("[");return u+=o.move(t.safe(t.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
23
|
+
`,...o.current()}))),s(),e.title&&(s=t.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),l(),u}function bh(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function st(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jt(e,n,t){const r=We(e),i=We(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Hi.peek=kh;function Hi(e,n,t,r){const i=bh(t),a=t.enter("emphasis"),l=t.createTracker(r),s=l.move(i);let o=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),f=jt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(o=st(u)+o.slice(1));const c=o.charCodeAt(o.length-1),d=jt(r.after.charCodeAt(0),c,i);d.inside&&(o=o.slice(0,-1)+st(c));const p=l.move(i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+o+p}function kh(e,n,t){return t.options.emphasis||"*"}function wh(e,n){let t=!1;return Mn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,un}),!!((!e.depth||e.depth<3)&&In(e)&&(n.options.setext||t))}function Sh(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(wh(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),d=t.containerPhrasing(e,{...a.current(),before:`
|
|
24
|
+
`,after:`
|
|
25
|
+
`});return c(),f(),d+`
|
|
26
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
27
|
+
`))+1))}const l="#".repeat(i),s=t.enter("headingAtx"),o=t.enter("phrasing");a.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
|
28
|
+
`,...a.current()});return/^[\t ]/.test(u)&&(u=st(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),o(),s(),u}Ui.peek=Ch;function Ui(e){return e.value||""}function Ch(){return"<"}Vi.peek=vh;function Vi(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let s=t.enter("label");const o=t.createTracker(r);let u=o.move("![");return u+=o.move(t.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=t.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(t.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),u+=o.move(")"),l(),u}function vh(){return"!"}qi.peek=jh;function qi(e,n,t,r){const i=e.referenceType,a=t.enter("imageReference");let l=t.enter("label");const s=t.createTracker(r);let o=s.move("![");const u=t.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:o,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!u||u!==c?o+=s.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function jh(){return"!"}Wi.peek=Eh;function Wi(e,n,t){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<t.unsafe.length;){const l=t.unsafe[a],s=t.compilePattern(l);let o;if(l.atBreak)for(;o=s.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function Eh(){return"`"}function Ji(e,n){const t=In(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Gi.peek=Nh;function Gi(e,n,t,r){const i=Rn(t),a=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let s,o;if(Ji(e,t)){const f=t.stack;t.stack=[],s=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),s(),t.stack=f,c}s=t.enter("link"),o=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),s(),u}function Nh(e,n,t){return Ji(e,t)?"<":"["}Xi.peek=Ah;function Xi(e,n,t,r){const i=e.referenceType,a=t.enter("linkReference");let l=t.enter("label");const s=t.createTracker(r);let o=s.move("[");const u=t.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:o,after:"]",...s.current()});return l(),t.stack=f,a(),i==="full"||!u||u!==c?o+=s.move(c+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function Ah(){return"["}function On(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Ih(e){const n=On(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Th(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Yi(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Ph(e,n,t,r){const i=t.enter("list"),a=t.bulletCurrent;let l=e.ordered?Th(t):On(t);const s=e.ordered?l==="."?")":".":Ih(t);let o=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(o=!0),Yi(t)===l&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=s),t.bulletCurrent=l;const u=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=a,i(),u}function zh(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Dh(e,n,t,r){const i=zh(t);let a=t.bulletCurrent||On(t);n&&n.type==="list"&&n.ordered&&(a=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=t.createTracker(r);s.move(a+" ".repeat(l-a.length)),s.shift(l);const o=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,s.current()),f);return o(),u;function f(c,d,p){return d?(p?"":" ".repeat(l))+c:(p?a:a+" ".repeat(l-a.length))+c}}function Lh(e,n,t,r){const i=t.enter("paragraph"),a=t.enter("phrasing"),l=t.containerPhrasing(e,r);return a(),i(),l}const Fh=Pt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Mh(e,n,t,r){return(e.children.some(function(l){return Fh(l)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function _h(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Ki.peek=Rh;function Ki(e,n,t,r){const i=_h(t),a=t.enter("strong"),l=t.createTracker(r),s=l.move(i+i);let o=l.move(t.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),f=jt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(o=st(u)+o.slice(1));const c=o.charCodeAt(o.length-1),d=jt(r.after.charCodeAt(0),c,i);d.inside&&(o=o.slice(0,-1)+st(c));const p=l.move(i+i);return a(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+o+p}function Rh(e,n,t){return t.options.strong||"*"}function Oh(e,n,t,r){return t.safe(e.value,r)}function Bh(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function $h(e,n,t){const r=(Yi(t)+(t.options.ruleSpaces?" ":"")).repeat(Bh(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Qi={blockquote:ch,break:Mr,code:gh,definition:yh,emphasis:Hi,hardBreak:Mr,heading:Sh,html:Ui,image:Vi,imageReference:qi,inlineCode:Wi,link:Gi,linkReference:Xi,list:Ph,listItem:Dh,paragraph:Lh,root:Mh,strong:Ki,text:Oh,thematicBreak:$h};function Hh(){return{enter:{table:Uh,tableData:_r,tableHeader:_r,tableRow:qh},exit:{codeText:Wh,table:Vh,tableData:Yt,tableHeader:Yt,tableRow:Yt}}}function Uh(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Vh(e){this.exit(e),this.data.inTable=void 0}function qh(e){this.enter({type:"tableRow",children:[]},e)}function Yt(e){this.exit(e)}function _r(e){this.enter({type:"tableCell",children:[]},e)}function Wh(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Jh));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Jh(e,n){return n==="|"?n:e}function Gh(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
29
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:l,tableCell:o,tableRow:s}};function l(p,m,w,S){return u(f(p,w,S),p.align)}function s(p,m,w,S){const k=c(p,w,S),E=u([k]);return E.slice(0,E.indexOf(`
|
|
30
|
+
`))}function o(p,m,w,S){const k=w.enter("tableCell"),E=w.enter("phrasing"),j=w.containerPhrasing(p,{...S,before:a,after:a});return E(),k(),j}function u(p,m){return oh(p,{align:m,alignDelimiters:r,padding:t,stringLength:i})}function f(p,m,w){const S=p.children;let k=-1;const E=[],j=m.enter("table");for(;++k<S.length;)E[k]=c(S[k],m,w);return j(),E}function c(p,m,w){const S=p.children;let k=-1;const E=[],j=m.enter("tableRow");for(;++k<S.length;)E[k]=o(S[k],p,m,w);return j(),E}function d(p,m,w){let S=Qi.inlineCode(p,m,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Xh(){return{exit:{taskListCheckValueChecked:Rr,taskListCheckValueUnchecked:Rr,paragraph:Kh}}}function Yh(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qh}}}function Rr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Kh(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let a=-1,l;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){l=s;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Qh(e,n,t,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);a&&s.move(l);let o=Qi.listItem(e,n,t,{...r,...s.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(f){return f+l}}function Zh(){return[Pf(),Qf(),nh(),Hh(),Xh()]}function ep(e){return{extensions:[zf(),Zf(e),rh(),Gh(e),Yh()]}}const tp={tokenize:sp,partial:!0},Zi={tokenize:op,partial:!0},el={tokenize:up,partial:!0},tl={tokenize:cp,partial:!0},np={tokenize:fp,partial:!0},nl={name:"wwwAutolink",tokenize:lp,previous:il},rl={name:"protocolAutolink",tokenize:ap,previous:ll},ve={name:"emailAutolink",tokenize:ip,previous:al},be={};function rp(){return{text:be}}let ze=48;for(;ze<123;)be[ze]=ve,ze++,ze===58?ze=65:ze===91&&(ze=97);be[43]=ve;be[45]=ve;be[46]=ve;be[95]=ve;be[72]=[ve,rl];be[104]=[ve,rl];be[87]=[ve,nl];be[119]=[ve,nl];function ip(e,n,t){const r=this;let i,a;return l;function l(c){return!pn(c)||!al.call(r,r.previous)||Bn(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(c))}function s(c){return pn(c)?(e.consume(c),s):c===64?(e.consume(c),o):t(c)}function o(c){return c===46?e.check(np,f,u)(c):c===45||c===95||te(c)?(a=!0,e.consume(c),o):f(c)}function u(c){return e.consume(c),i=!0,o}function f(c){return a&&i&&re(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function lp(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!il.call(r,r.previous)||Bn(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tp,e.attempt(Zi,e.attempt(el,a),t),t)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function ap(e,n,t){const r=this;let i="",a=!1;return l;function l(c){return(c===72||c===104)&&ll.call(r,r.previous)&&!Bn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),s):t(c)}function s(c){if(re(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),s;if(c===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(c),o}return t(c)}function o(c){return c===47?(e.consume(c),a?u:(a=!0,o)):t(c)}function u(c){return c===null||St(c)||G(c)||Me(c)||At(c)?t(c):e.attempt(Zi,e.attempt(el,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function sp(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),a):t(l)}function a(l){return l===null?t(l):n(l)}}function op(e,n,t){let r,i,a;return l;function l(u){return u===46||u===95?e.check(tl,o,s)(u):u===null||G(u)||Me(u)||u!==45&&At(u)?o(u):(a=!0,e.consume(u),l)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function o(u){return i||r||!a?t(u):n(u)}}function up(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(tl,n,a)(l):l===null||G(l)||Me(l)?n(l):(e.consume(l),i)}function a(l){return l===41&&r++,e.consume(l),i}}function cp(e,n,t){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||G(s)||Me(s)?n(s):t(s)}function i(s){return s===null||s===40||s===91||G(s)||Me(s)?n(s):r(s)}function a(s){return re(s)?l(s):t(s)}function l(s){return s===59?(e.consume(s),r):re(s)?(e.consume(s),l):t(s)}}function fp(e,n,t){return r;function r(a){return e.consume(a),i}function i(a){return te(a)?t(a):n(a)}}function il(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||G(e)}function ll(e){return!re(e)}function al(e){return!(e===47||pn(e))}function pn(e){return e===43||e===45||e===46||e===95||te(e)}function Bn(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const hp={tokenize:kp,partial:!0};function pp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xp,continuation:{tokenize:yp},exit:bp}},text:{91:{name:"gfmFootnoteCall",tokenize:gp},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dp,resolveTo:mp}}}}function dp(e,n,t){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!l||!l._balanced)return t(o);const u=me(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?t(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),n(o))}}function mp(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",a,n],["enter",l,n],["exit",l,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...s),e}function gp(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return s;function s(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),o}function o(c){return c!==94?t(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(a>999||c===93&&!l||c===null||c===91||G(c))return t(c);if(c===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(me(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(c)}return G(c)||(l=!0),a++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),a++,u):u(c)}}function xp(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,s;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!s||m===null||m===91||G(m))return t(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=me(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return G(m)||(s=!0),l++,e.consume(m),m===92?c:f}function c(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function d(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(a)||i.push(a),V(e,p,"gfmFootnoteDefinitionWhitespace")):t(m)}function p(m){return n(m)}}function yp(e,n,t){return e.check(ft,n,e.attempt(hp,n,t))}function bp(e){e.exit("gfmFootnoteDefinition")}function kp(e,n,t){const r=this;return V(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(a):t(a)}}function wp(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,s){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let u=o;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[o][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[o][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[o][1].start)},d=[["enter",f,s],["enter",l[u][1],s],["exit",l[u][1],s],["enter",c,s]],p=s.parser.constructs.insideSpan.null;p&&ue(d,d.length,0,It(p,l.slice(u+1,o),s)),ue(d,d.length,0,[["exit",c,s],["enter",l[o][1],s],["exit",l[o][1],s],["exit",f,s]]),ue(l,u-1,o-u+3,d),o=u+d.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function a(l,s,o){const u=this.previous,f=this.events;let c=0;return d;function d(m){return u===126&&f[f.length-1][1].type!=="characterEscape"?o(m):(l.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const w=We(u);if(m===126)return c>1?o(m):(l.consume(m),c++,p);if(c<2&&!t)return o(m);const S=l.exit("strikethroughSequenceTemporary"),k=We(m);return S._open=!k||k===2&&!!w,S._close=!w||w===2&&!!k,s(m)}}}class Sp{constructor(){this.map=[]}add(n,t,r){Cp(this,n,t,r)}consume(n){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const a of i)n.push(a);i=r.pop()}this.map.length=0}}function Cp(e,n,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===n){e.map[i][1]+=t,e.map[i][2].push(...r);return}i+=1}e.map.push([n,t,r])}}function vp(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function jp(){return{flow:{null:{name:"table",tokenize:Ep,resolveAll:Np}}}}function Ep(e,n,t){const r=this;let i=0,a=0,l;return s;function s(y){let T=r.events.length-1;for(;T>-1;){const _=r.events[T][1].type;if(_==="lineEnding"||_==="linePrefix")T--;else break}const z=T>-1?r.events[T][1].type:null,B=z==="tableHead"||z==="tableRow"?b:o;return B===b&&r.parser.lazy[r.now().line]?t(y):B(y)}function o(y){return e.enter("tableHead"),e.enter("tableRow"),u(y)}function u(y){return y===124||(l=!0,a+=1),f(y)}function f(y){return y===null?t(y):R(y)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):t(y):H(y)?V(e,f,"whitespace")(y):(a+=1,l&&(l=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(y)))}function c(y){return y===null||y===124||G(y)?(e.exit("data"),f(y)):(e.consume(y),y===92?d:c)}function d(y){return y===92||y===124?(e.consume(y),c):c(y)}function p(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(y):(e.enter("tableDelimiterRow"),l=!1,H(y)?V(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):m(y))}function m(y){return y===45||y===58?S(y):y===124?(l=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),w):v(y)}function w(y){return H(y)?V(e,S,"whitespace")(y):S(y)}function S(y){return y===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),k):y===45?(a+=1,k(y)):y===null||R(y)?N(y):v(y)}function k(y){return y===45?(e.enter("tableDelimiterFiller"),E(y)):v(y)}function E(y){return y===45?(e.consume(y),E):y===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(y))}function j(y){return H(y)?V(e,N,"whitespace")(y):N(y)}function N(y){return y===124?m(y):y===null||R(y)?!l||i!==a?v(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(y)):v(y)}function v(y){return t(y)}function b(y){return e.enter("tableRow"),D(y)}function D(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),D):y===null||R(y)?(e.exit("tableRow"),n(y)):H(y)?V(e,D,"whitespace")(y):(e.enter("data"),F(y))}function F(y){return y===null||y===124||G(y)?(e.exit("data"),D(y)):(e.consume(y),y===92?M:F)}function M(y){return y===92||y===124?(e.consume(y),F):F(y)}}function Np(e,n){let t=-1,r=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,o=0,u,f,c;const d=new Sp;for(;++t<e.length;){const p=e[t],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,o!==0&&(Or(d,n,o,u,f),f=void 0,o=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",u,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,c=void 0,a=[0,0,0,0],l=[0,t+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},d.add(t,0,[["enter",f,n]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],c=xt(d,n,a,i,void 0,c),a=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],c=xt(d,n,a,i,void 0,c)),a=l,l=[a[1],t,0,0])):m.type==="tableHead"?(s=!0,o=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=t,a[1]!==0?(l[0]=l[1],c=xt(d,n,a,i,t,c)):l[1]!==0&&(c=xt(d,n,l,i,t,c)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(o!==0&&Or(d,n,o,u,f),d.consume(n.events),t=-1;++t<n.events.length;){const p=n.events[t];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=vp(n.events,t))}return e}function xt(e,n,t,r,i,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(a.end=Object.assign({},Ue(n.events,t[0])),e.add(t[0],0,[["exit",a,n]]));const o=Ue(n.events,t[1]);if(a={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(t[1],0,[["enter",a,n]]),t[2]!==0){const u=Ue(n.events,t[2]),f=Ue(n.events,t[3]),c={type:s,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",c,n]]),r!==2){const d=n.events[t[2]],p=n.events[t[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",t[3]>t[2]+1){const m=t[2]+1,w=t[3]-t[2]-1;e.add(m,w,[])}}e.add(t[3]+1,0,[["exit",c,n]])}return i!==void 0&&(a.end=Object.assign({},Ue(n.events,i)),e.add(i,0,[["exit",a,n]]),a=void 0),a}function Or(e,n,t,r,i){const a=[],l=Ue(n.events,t);i&&(i.end=Object.assign({},l),a.push(["exit",i,n])),r.end=Object.assign({},l),a.push(["exit",r,n]),e.add(t+1,0,a)}function Ue(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Ap={name:"tasklistCheck",tokenize:Tp};function Ip(){return{text:{91:Ap}}}function Tp(e,n,t){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return G(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):t(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(o)}function s(o){return R(o)?n(o):H(o)?e.check({tokenize:Pp},n,t)(o):t(o)}}function Pp(e,n,t){return V(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function zp(e){return gi([rp(),pp(),wp(e),jp(),Ip()])}const Dp={};function Lp(e){const n=this,t=e||Dp,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(zp(t)),a.push(Zh()),l.push(ep(t))}const De=()=>`${window.routePrefix??""}/docs/api`,Fp=e=>`${window.routePrefix??""}/docs/${encodeURIComponent(e)}`,Et={list:async(e,n)=>{const{data:t}=await ee.getJson(`${De()}/list`,{params:{locale:e},signal:n});return t.documents??[]},keywords:async(e,n)=>{const{data:t}=await ee.getJson(`${De()}/keywords`,{params:{locale:e},signal:n});return t.keywords??{}},search:async(e,n)=>{const{data:t}=await ee.getJson(`${De()}/search`,{params:{q:e.query||void 0,keywords:e.keywords?.length?e.keywords.join(","):void 0,url:e.url||void 0,model:e.model||void 0,locale:e.locale||void 0},signal:n});return t.results??[]},context:async(e,n,t,r)=>{const{data:i}=await ee.getJson(`${De()}/context`,{params:{url:e,model:n,locale:t},signal:r});return i.documents??[]},doc:async(e,n,t)=>{const{data:r}=await ee.getJson(`${De()}/doc/${encodeURIComponent(e)}`,{params:{locale:n},signal:t});return r},resolve:async(e,n,t)=>{if(n.length===0)return{};const{data:r}=await ee.getJson(`${De()}/resolve`,{params:{from:e,refs:n.join(",")},signal:t});return r.resolved??{}},schema:async(e,n)=>{const{data:t}=await ee.getJson(`${De()}/schema`,{params:{model:e},signal:n});return t}},bt=e=>e.trim().toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,""),ud=e=>{const n=[];let t=!1;for(const r of e.split(`
|
|
31
|
+
`)){if(/^\s*(```|~~~)/.test(r)){t=!t;continue}if(t)continue;const i=/^(#{2,3})\s+(.+?)\s*#*\s*$/.exec(r);if(!i)continue;const a=i[2].replace(/[*_`]/g,"").trim();n.push({depth:i[1].length,title:a,slug:bt(a)})}return n},Mp=e=>{const n=new Set,t=/\]\(\s*([^)\s]+)/g;let r;for(;(r=t.exec(e))!==null;){const i=r[1];!i||i.startsWith("#")||i.startsWith("/")||/^[a-z][a-z0-9+.-]*:/i.test(i)||i.startsWith("//")||n.add(i)}return[...n]},Ve=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Ve).join(""):I.isValidElement(e)?Ve(e.props.children):"",_p=()=>typeof document<"u"&&document.documentElement.classList.contains("dark"),Rp=()=>{const[e,n]=I.useState(!1);return{isCopied:e,copy:r=>{!r||typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(r).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)},()=>{})}}},Op=({code:e})=>{const[n,t]=I.useState(null),[r,i]=I.useState(!1),a=I.useId().replace(/[^a-zA-Z0-9]/g,"");return I.useEffect(()=>{let l=!1;return t(null),i(!1),ga(()=>import("./mermaid.core-C0V1NaVJ.js").then(s=>s.bI),__vite__mapDeps([0,1,2,3]),import.meta.url).then(async({default:s})=>{s.initialize({startOnLoad:!1,securityLevel:"strict",theme:_p()?"dark":"default"});const o=await s.render(`mermaid-${a}`,e);l||t(o.svg)}).catch(()=>{l||i(!0)}),()=>{l=!0}},[e,a]),r?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):n?h.jsx("div",{className:"my-3 flex justify-center overflow-x-auto rounded-xl border p-3 [&_svg]:max-w-full",dangerouslySetInnerHTML:{__html:n}}):h.jsx("div",{className:"bg-muted/30 text-muted-foreground my-3 rounded-xl border p-4 text-sm",children:"…"})},Bp=({source:e})=>{const[n,t]=I.useState(null),[r,i]=I.useState(null),[a,l]=I.useState(!1),s=I.useMemo(()=>{try{const o=JSON.parse(e);return o&&typeof o=="object"?o:null}catch{return null}},[e]);return I.useEffect(()=>{if(!s){l(!0);return}if(s.fields){t(s.fields),i(s.title??null);return}if(!s.model){l(!0);return}const o=new AbortController;return Et.schema(s.model,o.signal).then(u=>{o.signal.aborted||(t(u.fields),i(s.title??u.title))}).catch(()=>{o.signal.aborted||l(!0)}),()=>o.abort()},[s]),a?h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:e}):h.jsx(ti,{className:"my-3",fields:n,title:r,loading:!n})},$p=({language:e,code:n})=>{const{isCopied:t,copy:r}=Rp();return h.jsxs("div",{className:"my-3",children:[h.jsxs("div",{className:"border-border/50 bg-muted/50 flex items-center justify-between rounded-t-xl border border-b-0 px-3.5 py-1.5 text-xs",children:[h.jsx("span",{className:"text-muted-foreground font-medium lowercase",children:e}),h.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors",onClick:()=>r(n),"aria-label":"Copy",children:t?h.jsx(xa,{className:"size-3.5"}):h.jsx(ya,{className:"size-3.5"})})]}),h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 overflow-x-auto rounded-b-xl border border-t-0 p-3.5 text-[13px] leading-relaxed",children:h.jsx("code",{children:n})})]})};function Hp({markdown:e,docLinks:n={},onDocLink:t,className:r}){const i=I.useMemo(()=>({h1:({className:a,children:l,...s})=>h.jsx("h1",{id:bt(Ve(l)),className:X("aui-md-h1 mt-6 mb-3 scroll-mt-20 text-2xl font-semibold first:mt-0",a),...s,children:l}),h2:({className:a,children:l,...s})=>h.jsx("h2",{id:bt(Ve(l)),className:X("aui-md-h2 mt-6 mb-2 scroll-mt-20 text-xl font-semibold first:mt-0",a),...s,children:l}),h3:({className:a,children:l,...s})=>h.jsx("h3",{id:bt(Ve(l)),className:X("aui-md-h3 mt-5 mb-2 scroll-mt-20 text-lg font-semibold first:mt-0",a),...s,children:l}),h4:({className:a,...l})=>h.jsx("h4",{className:X("aui-md-h4 mt-4 mb-1.5 text-base font-medium first:mt-0",a),...l}),p:({className:a,...l})=>h.jsx("p",{className:X("aui-md-p my-3 leading-relaxed first:mt-0 last:mb-0",a),...l}),a:({className:a,href:l,children:s,...o})=>{const u=(l??"").trim(),f=X("aui-md-a text-primary hover:text-primary/80 underline underline-offset-2",a);if(u.startsWith("#"))return h.jsx("a",{className:f,href:u,...o,children:s});if(/^[a-z][a-z0-9+.-]*:/i.test(u)||u.startsWith("//"))return h.jsx("a",{className:f,href:u,target:"_blank",rel:"noreferrer",...o,children:s});if(u.startsWith("/"))return h.jsx("a",{className:f,href:u,onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),Sn.visit(u))},...o,children:s});const d=n[u]??n[u.replace(/#.*$/,"")];return!d||!t?h.jsx("span",{className:X("text-foreground",a),children:s}):h.jsx("a",{className:f,href:Fp(d),onClick:p=>{p.button!==0||p.metaKey||p.ctrlKey||p.shiftKey||p.altKey||(p.preventDefault(),t(d))},...o,children:s})},blockquote:({className:a,...l})=>h.jsx("blockquote",{className:X("aui-md-blockquote border-muted-foreground/30 text-muted-foreground my-3 border-s-2 ps-4",a),...l}),ul:({className:a,...l})=>h.jsx("ul",{className:X("aui-md-ul marker:text-muted-foreground my-3 ms-5 list-disc [&>li]:mt-1",a),...l}),ol:({className:a,...l})=>h.jsx("ol",{className:X("aui-md-ol marker:text-muted-foreground my-3 ms-5 list-decimal [&>li]:mt-1",a),...l}),li:({className:a,...l})=>h.jsx("li",{className:X("aui-md-li leading-relaxed",a),...l}),hr:({className:a,...l})=>h.jsx("hr",{className:X("aui-md-hr border-muted-foreground/20 my-4",a),...l}),table:({className:a,...l})=>h.jsx("div",{className:"my-3 overflow-x-auto",children:h.jsx("table",{className:X("aui-md-table w-full border-separate border-spacing-0 text-sm",a),...l})}),th:({className:a,...l})=>h.jsx("th",{className:X("aui-md-th bg-muted px-3 py-1.5 text-start font-medium first:rounded-ss-lg last:rounded-se-lg",a),...l}),td:({className:a,...l})=>h.jsx("td",{className:X("aui-md-td border-muted-foreground/20 border-s border-b px-3 py-1.5 text-start last:border-e",a),...l}),tr:({className:a,...l})=>h.jsx("tr",{className:X("aui-md-tr m-0 border-b p-0 first:border-t",a),...l}),img:({className:a,...l})=>h.jsx("img",{className:X("my-3 max-w-full rounded-lg border",a),...l}),code:({className:a,...l})=>h.jsx("code",{className:X("aui-md-inline-code bg-muted rounded-md px-1.5 py-0.5 font-mono text-[0.85em]",a),...l}),pre:({children:a})=>{const l=Array.isArray(a)?a[0]:a;if(!I.isValidElement(l))return h.jsx("pre",{className:"aui-md-pre border-border/50 bg-muted/30 my-3 overflow-x-auto rounded-xl border p-3.5 text-[13px]",children:a});const s=/language-([\w-]+)/.exec(l.props.className??"")?.[1]??"",o=Ve(l.props.children).replace(/\n$/,"");return s==="mermaid"?h.jsx(Op,{code:o}):s==="schema"?h.jsx(Bp,{source:o}):h.jsx($p,{language:s||"text",code:o})}}),[n,t]);return h.jsx("div",{className:X("aui-md text-sm",r),children:h.jsx(wf,{remarkPlugins:[Lp],components:i,children:e})})}function Up(e,n){const[t,r]=I.useState(null),[i,a]=I.useState({}),[l,s]=I.useState(!1),[o,u]=I.useState(!1);return I.useEffect(()=>{if(!e){r(null),a({}),u(!1);return}const f=new AbortController;return s(!0),u(!1),Et.doc(e,n,f.signal).then(async c=>{if(f.signal.aborted)return;r(c);const d=Mp(c.markdown),p=d.length>0?await Et.resolve(c.meta.id,d,f.signal).catch(()=>({})):{};f.signal.aborted||a(p)}).catch(()=>{f.signal.aborted||(r(null),u(!0))}).finally(()=>{f.signal.aborted||s(!1)}),()=>f.abort()},[e,n]),{content:t,docLinks:i,loading:l,error:o}}const Vp="adminizer:ai-attach-doc";function qp(e){window.__adminizerAttachDoc__=e,window.dispatchEvent(new CustomEvent(Vp,{detail:e}))}const lt="info",Br=()=>{if(typeof window>"u")return{open:!1,docId:null};const e=window.location.hash.replace(/^#/,"");return e===lt?{open:!0,docId:null}:e.startsWith(`${lt}=`)?{open:!0,docId:decodeURIComponent(e.slice(lt.length+1))||null}:{open:!1,docId:null}},Wp=e=>{const{pathname:n,search:t}=window.location;window.history.pushState(null,"",`${n}${t}${e}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},Jp=()=>{const[e,n]=I.useState(Br);return I.useEffect(()=>{const t=()=>n(Br());window.addEventListener("hashchange",t),window.addEventListener("popstate",t);const r=Sn.on("navigate",t);return()=>{window.removeEventListener("hashchange",t),window.removeEventListener("popstate",t),r()}},[]),e},Gp=()=>{const e=ye();return I.useMemo(()=>{const n=window.routePrefix??"",t=(e.url||window.location.pathname).split(/[?#]/)[0],r=n&&t.startsWith(n)?t.slice(n.length):t,i=/^\/model\/([^/]+)/.exec(r);return i?decodeURIComponent(i[1]):null},[e.url])};function Xp({open:e,docId:n,items:t,model:r,onOpenDoc:i,onClose:a}){const{t:l,locale:s}=ot(),{isEnabled:o,openChat:u}=Nt(),[f,c]=I.useState(void 0),{content:d,docLinks:p,loading:m,error:w}=Up(e?n:null,f??s),[S,k]=I.useState(null),[E,j]=I.useState(!1),[N,v]=I.useState("docs");I.useEffect(()=>c(void 0),[n]),I.useEffect(()=>{if(!e||!r)return;const M=new AbortController;return k(null),j(!1),Et.schema(r,M.signal).then(y=>{M.signal.aborted||k(y)}).catch(()=>{M.signal.aborted||j(!0)}),()=>M.abort()},[r,e]);const b=I.useMemo(()=>{const M=new Map;for(const y of t){const T=y.section??"";M.set(T,[...M.get(T)??[],y])}return[...M.entries()]},[t]),D=I.useRef(!1),F=()=>{d&&(D.current=!0,a(),u(),qp({id:d.meta.id,title:d.meta.title}))};return h.jsx(ka,{open:e,onOpenChange:M=>!M&&a(),children:h.jsxs(wa,{side:"right",className:"z-[1002] w-full gap-0 p-0 sm:max-w-xl",onCloseAutoFocus:M=>{D.current&&(D.current=!1,M.preventDefault())},children:[h.jsxs(Sa,{className:"border-b px-4 py-3",children:[h.jsxs("div",{className:"flex items-center gap-2 pe-8",children:[n&&h.jsx(le,{variant:"ghost",size:"icon",className:"-ms-2 shrink-0",onClick:()=>i(null),"aria-label":l("Back to contents"),children:h.jsx(Ca,{className:"size-4"})}),h.jsx(va,{className:"truncate",children:n?d?.meta.title??l("Documentation"):l("Page documentation")})]}),h.jsx(ja,{className:"sr-only",children:l("Documentation")})]}),h.jsxs(Ea,{value:r?N:"docs",onValueChange:v,className:"flex min-h-0 flex-1 flex-col gap-0",children:[r&&h.jsxs(Na,{className:"mx-4 mt-3 w-fit",children:[h.jsx(Xn,{value:"docs",children:l("Documentation")}),h.jsx(Xn,{value:"schema",children:l("Schema")})]}),h.jsx(Yn,{value:"docs",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:n?m&&!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Loading...")}):w||!d?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Failed to load documentation")}):h.jsxs("div",{className:"flex flex-col gap-3",children:[(d.meta.locales?.length??0)>1&&h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-muted-foreground text-xs",children:l("Language")}),d.meta.locales?.map(M=>h.jsx("button",{type:"button",onClick:()=>c(M),className:X("rounded-full border px-2 py-0.5 text-xs uppercase transition-colors",M===d.locale?"bg-primary text-primary-foreground border-transparent":"hover:bg-accent"),children:M},M))]}),h.jsx(Hp,{markdown:d.markdown,docLinks:p,onDocLink:i})]}):t.length===0?h.jsx("p",{className:"text-muted-foreground text-sm",children:l("Nothing found")}):h.jsx("div",{className:"flex flex-col gap-4",children:b.map(([M,y])=>h.jsxs("div",{className:"flex flex-col gap-1",children:[M&&h.jsx("div",{className:"text-muted-foreground px-1 text-xs font-medium uppercase",children:M}),y.map(T=>h.jsxs("button",{type:"button",onClick:()=>i(T.id),className:"hover:bg-accent flex items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm transition-colors",children:[h.jsx(Aa,{className:"text-muted-foreground size-4 shrink-0"}),h.jsx("span",{className:"truncate",children:T.title})]},T.id))]},M))})}),r&&h.jsx(Yn,{value:"schema",className:"min-h-0 flex-1 overflow-y-auto px-4 py-3",children:h.jsx(ti,{fields:S?.fields??(E?[]:null),title:S?.title??r,loading:!S&&!E})})]}),h.jsxs("div",{className:"flex items-center justify-between gap-2 border-t px-4 py-3",children:[h.jsx(le,{variant:"ghost",size:"sm",asChild:!0,children:h.jsxs(xe,{href:`${window.routePrefix}/docs${n?`/${encodeURIComponent(n)}`:""}`,children:[h.jsx(Ia,{className:"size-4"}),l("Open in knowledge base")]})}),o&&d&&h.jsxs(le,{variant:"outline",size:"sm",onClick:F,children:[h.jsx(Wr,{className:"size-4"}),l("Send to assistant")]})]})]})})}function Yp(){const n=ye().props.docs,{t}=ot(),{open:r,docId:i}=Jp(),a=Gp(),l=I.useCallback(f=>{Wp(f?`#${lt}=${encodeURIComponent(f)}`:`#${lt}`)},[]),s=I.useCallback(()=>{const{pathname:f,search:c}=window.location;window.history.pushState(null,"",`${f}${c}`),window.dispatchEvent(new HashChangeEvent("hashchange"))},[]);if(!n)return null;const o=n.items??[],u=o.length>0||!!a;return h.jsxs(h.Fragment,{children:[u&&h.jsxs(bn,{children:[h.jsx(kn,{asChild:!0,children:h.jsx(le,{variant:"ghost",size:"icon",className:"shrink-0",onClick:()=>l(null),"aria-label":t("Page documentation"),children:h.jsx(ba,{className:"size-4"})})}),h.jsx(wn,{side:"bottom",className:"z-[1002]",children:h.jsx("span",{children:t("Page documentation")})})]}),h.jsx(Xp,{open:r,docId:i,items:o,model:a,onOpenDoc:l,onClose:s})]})}function Kp({breadcrumbs:e=[]}){const{tabs:n}=Qr(),t=ye();return h.jsx("header",{className:"border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:h.jsxs("div",{className:"flex justify-between w-full",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Ta,{className:"-ml-1"}),h.jsx(Xa,{breadcrumbs:e})]}),h.jsxs("div",{className:"flex gap-4 items-center",children:[h.jsx(as,{}),h.jsx(Yp,{}),t.props.history&&h.jsx(xe,{href:`${window.routePrefix}/history/view-all`,children:h.jsx(le,{variant:"ghost",size:"icon",className:"shrink-0",children:h.jsx(Pa,{})})}),h.jsx(es,{}),t.props.notifications&&(n===null?h.jsx("div",{className:"w-[40px] flex-none flex justify-center",children:h.jsx(ut,{className:"size-4 animate-spin"})}):n.length?h.jsx(ns,{}):null),h.jsx(Za,{})]})]})})}const Qp=I.memo(({children:e,breadcrumbs:n=[],className:t})=>{const r=ye();return h.jsxs($a,{variant:"sidebar",children:[h.jsx(za,{title:r.props.title}),h.jsx(Ga,{}),h.jsxs(Da,{className:"overflow-hidden",children:[h.jsx(Kp,{breadcrumbs:n}),h.jsx("div",{"data-scroll-region":"content",className:X("relative flex min-h-0 flex-1 overflow-y-auto overscroll-contain",t),children:h.jsx("div",{className:"flex min-h-full w-full flex-col",children:e})})]})]})}),Zp=()=>`${window.routePrefix??""}/assets/ai-assistant/agent.es.js?v=${window.adminizerVersion??""}`;function ed({width:e="min(25vw, 420px)",isResizing:n=!1,onResizeStart:t}){const{isEnabled:r,isOpen:i,closeChat:a,models:l,activeModel:s,setActiveModel:o,loading:u,error:f}=Nt(),[c,d]=I.useState(null),[p,m]=I.useState(null);if(I.useEffect(()=>{if(!i||c||p)return;let E=!1;return import(Zp()).then(j=>{E||d(()=>j.default)}).catch(j=>{console.error("Failed to load the AI assistant UI",j),E||m("Unable to load the AI assistant UI")}),()=>{E=!0}},[c,i,p]),!r)return null;const w=l.find(E=>E.id===s),S=h.jsx(le,{variant:"ghost",size:"icon",onClick:a,"aria-label":"Close AI assistant",children:h.jsx(Vr,{className:"size-4"})}),k=h.jsxs(h.Fragment,{children:[l.length>1&&h.jsxs(La,{value:s,onValueChange:o,children:[h.jsx(Fa,{className:"h-8 w-36 text-xs","aria-label":"Select assistant",children:h.jsx(Ma,{placeholder:"Assistant"})}),h.jsx(_a,{className:"z-[70]",children:l.map(E=>h.jsx(Ra,{value:E.id,children:E.name},E.id))})]}),S]});return h.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:Jr("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none",n&&"transition-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+e+")"},children:[h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize AI assistant panel",className:"absolute -left-2 top-0 z-10 hidden h-full w-4 cursor-col-resize touch-none md:block",onPointerDown:t}),s&&c&&!p?h.jsx(c,{routePrefix:window.routePrefix??"",modelId:s,title:w?.name,layout:"panel",headerActions:k},s):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[h.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),S]}),h.jsx("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground",children:p||f?h.jsx("span",{className:"text-destructive",children:p??f}):!u&&l.length===0?h.jsx("span",{children:"No AI models are available for your account."}):h.jsx(ut,{className:"size-8 animate-spin"})})]})]})}const td="25vw",$r="margin-right 300ms ease-in-out",sl=.25,nd=.55,ol="adminizer.aiAssistant.panelWidth",dn=()=>({min:Math.round(window.innerWidth*sl),max:Math.round(window.innerWidth*nd)}),rd=()=>window.innerWidth*sl,id=()=>{try{const e=Number(window.localStorage.getItem(ol));if(!Number.isFinite(e))return null;const{min:n,max:t}=dn();return Math.min(t,Math.max(n,e))}catch{return null}};function ld({children:e,panelWidth:n=td}){const{isEnabled:t,isOpen:r}=Nt(),[i,a]=I.useState(id),[l,s]=I.useState(!1),o=i===null?n:`${i}px`,u=I.useCallback(f=>{if(window.innerWidth<768)return;f.preventDefault();const c=f.clientX,d=i??rd(),p=document.body.style.userSelect;document.body.style.userSelect="none",s(!0);const m=S=>{const{min:k,max:E}=dn(),j=Math.min(E,Math.max(k,d+c-S.clientX));a(Math.round(j))},w=()=>{document.body.style.userSelect=p,s(!1),document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",w),document.removeEventListener("pointercancel",w)};document.addEventListener("pointermove",m),document.addEventListener("pointerup",w),document.addEventListener("pointercancel",w)},[i]);return I.useEffect(()=>{if(i!==null)try{window.localStorage.setItem(ol,String(i))}catch{}},[i]),I.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=f.style.transition,d=c?.includes("margin-right");return d||(f.style.transition=c?`${c}, ${$r}`:$r),f.classList.add("ai-assistant-host"),f.style.setProperty("--ai-assistant-panel-width",o),()=>{f.classList.remove("ai-assistant-host"),f.style.removeProperty("--ai-assistant-panel-width"),f.style.removeProperty("--ai-assistant-panel-actual-width"),f.style.removeProperty("margin-right"),delete f.dataset.aiAssistantOpen,d||(f.style.transition=c)}},[o]),I.useEffect(()=>{const f=document.getElementById("app");if(!f)return;const c=window.innerWidth<768,d=c?"100vw":o;f.style.setProperty("--ai-assistant-panel-actual-width",d),t&&r?(f.style.marginRight=c?"0":o,f.dataset.aiAssistantOpen="true"):(f.style.removeProperty("margin-right"),f.dataset.aiAssistantOpen="false");const p=()=>{const m=window.innerWidth<768,w=m?"100vw":o;if(f.style.setProperty("--ai-assistant-panel-actual-width",w),i!==null&&!m){const{min:S,max:k}=dn();a(E=>E===null?E:Math.min(k,Math.max(S,E)))}t&&r&&(f.style.marginRight=m?"0":o)};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[o,i,t,r]),h.jsxs(h.Fragment,{children:[e,h.jsx(ed,{width:o,isResizing:l,onResizeStart:u})]})}const ad=I.memo(({children:e,className:n,breadcrumbs:t,...r})=>h.jsx(ts,{children:h.jsx(ls,{children:h.jsxs(Oa,{children:[h.jsx(Qp,{breadcrumbs:t,className:n,...r,children:e}),h.jsx(ld,{})]})})})),cd=(e,n={})=>{const t=e;return t.layout=r=>h.jsx(ad,{...n,children:r}),t};export{Hp as M,Up as a,Fp as b,Q as c,Et as d,ud as e,Qr as f,qp as s,Nt as u,cd as w};
|