@jingyi0605/codingns 0.5.5 → 0.6.0

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.
Files changed (178) hide show
  1. package/dist/public/assets/{AdaptiveButlerPage-CUyNL98E.js → AdaptiveButlerPage-uFwDdN-F.js} +3 -3
  2. package/dist/public/assets/{App-BFP7LCSC.js → App-BZvapsi8.js} +3 -3
  3. package/dist/public/assets/App-CcDXqFl1.css +1 -0
  4. package/dist/public/assets/{BootstrapPage-G74dX2Us.js → BootstrapPage-gHSoa4JN.js} +1 -1
  5. package/dist/public/assets/ConversationPage-z3sXtKZ7.js +4 -0
  6. package/dist/public/assets/{DesktopDetachPreviewPage-IV7oEdOX.js → DesktopDetachPreviewPage-4eMRxiBW.js} +1 -1
  7. package/dist/public/assets/DesktopWindowPage-CZcoGApB.js +2 -0
  8. package/dist/public/assets/FileContextPanel-C3qex8bb.js +1 -0
  9. package/dist/public/assets/GitSidebar-BK6H16XU.js +6 -0
  10. package/dist/public/assets/{MobileCreateSessionSheet-DqVwz_Hp.js → MobileCreateSessionSheet-BYfbvK8o.js} +1 -1
  11. package/dist/public/assets/MobileSheet-Ckug8hTb.js +1 -0
  12. package/dist/public/assets/{MobileTopHeaderFrame-COTc7cRr.js → MobileTopHeaderFrame-Bwv8Ovm_.js} +1 -1
  13. package/dist/public/assets/MobileWorkspaceSwitcherHeader-RqWrBdn2.js +1 -0
  14. package/dist/public/assets/RelayConnectEntryPage-D_4YL-YH.js +1 -0
  15. package/dist/public/assets/ServerSettingsModal-CMSm3BZU.js +1 -0
  16. package/dist/public/assets/SessionIndexPage-DuK10DL5.js +1 -0
  17. package/dist/public/assets/SettingsPage-fyD-xaHL.js +1 -0
  18. package/dist/public/assets/TerminalManagerPanel-CCLr1Ypk.js +1 -0
  19. package/dist/public/assets/{TerminalPage-DpsvQQVR.js → TerminalPage-DaooFaJ4.js} +19 -19
  20. package/dist/public/assets/{TerminalRuntimeFallbackModal-CNzOt5v5.js → TerminalRuntimeFallbackModal-aUzjEBwP.js} +1 -1
  21. package/dist/public/assets/ToolFilesPage-CGxBvYG0.js +1 -0
  22. package/dist/public/assets/ToolGitPage-C264yjS9.js +1 -0
  23. package/dist/public/assets/ToolProcessesPage-BOP4A1cb.js +1 -0
  24. package/dist/public/assets/ToolsHomePage-CQxGiKQA.js +1 -0
  25. package/dist/public/assets/WorkbenchLandingPage-CvAY68ca.js +1 -0
  26. package/dist/public/assets/WorkbenchLayout-DGm8Tc5M.js +3 -0
  27. package/dist/public/assets/{WorkbenchModal-CbDxaCOR.js → WorkbenchModal-0tPIIhca.js} +1 -1
  28. package/dist/public/assets/{WorkbenchShellRoute-BMcnFadA.css → WorkbenchShellRoute-BF0nHWOk.css} +1 -1
  29. package/dist/public/assets/WorkbenchShellRoute-DBBOsJo9.js +1 -0
  30. package/dist/public/assets/WorkspaceDebugDetailPage-CDerFYd2.js +1 -0
  31. package/dist/public/assets/WorkspaceDetailPage-BlJc1CHE.js +1 -0
  32. package/dist/public/assets/WorkspaceHomePage-BUsKJ3lv.js +1 -0
  33. package/dist/public/assets/client-runtime-manager-BZpL17fc.js +1 -0
  34. package/dist/public/assets/{default-session-permission-mode-Cu5SreTG.js → default-session-permission-mode-DT4SGiwp.js} +1 -1
  35. package/dist/public/assets/{file-tree-icon-BMKuc5pw.js → file-tree-icon-Db5LXC8h.js} +7 -7
  36. package/dist/public/assets/index-BZLcEHW3.js +42 -0
  37. package/dist/public/assets/index-BbspQPC2.css +1 -0
  38. package/dist/public/assets/login-direct-candidate-resolver-1mxe_Oh8.js +1 -0
  39. package/dist/public/assets/{preferences-service-gv_9vGKz.js → preferences-service-DWnzl5a0.js} +1 -1
  40. package/dist/public/assets/relay-entry-C5_Iay0I.js +1 -0
  41. package/dist/public/assets/session-runtime-machine-DdLeDqQr.js +17 -0
  42. package/dist/public/assets/{styles-BWPBZvze.css → styles-CsEMfdaS.css} +1 -1
  43. package/dist/public/assets/{terminal-runtime-meta-B9xJGY__.js → terminal-runtime-meta-cdtWVfCm.js} +1 -1
  44. package/dist/public/assets/{useRegisteredDebugTemplates-CDfl54Wt.js → useRegisteredDebugTemplates-oFAQNIqh.js} +1 -1
  45. package/dist/public/assets/window-BVUB8gMK.js +1 -0
  46. package/dist/public/index.html +2 -2
  47. package/dist/server/config/env.d.ts +1 -0
  48. package/dist/server/config/env.js +3 -0
  49. package/dist/server/config/env.js.map +1 -1
  50. package/dist/server/modules/client/npm-global-package-service.d.ts +7 -1
  51. package/dist/server/modules/client/npm-global-package-service.js +149 -43
  52. package/dist/server/modules/client/npm-global-package-service.js.map +1 -1
  53. package/dist/server/modules/client/service-update-task-service.js +6 -2
  54. package/dist/server/modules/client/service-update-task-service.js.map +1 -1
  55. package/dist/server/modules/client/service-update-types.d.ts +2 -0
  56. package/dist/server/modules/git/git-controller.d.ts +3 -0
  57. package/dist/server/modules/git/git-controller.js +3 -0
  58. package/dist/server/modules/git/git-controller.js.map +1 -1
  59. package/dist/server/modules/git/git-read-service.js +47 -1
  60. package/dist/server/modules/git/git-read-service.js.map +1 -1
  61. package/dist/server/modules/git/git-write-service.d.ts +4 -0
  62. package/dist/server/modules/git/git-write-service.js +24 -0
  63. package/dist/server/modules/git/git-write-service.js.map +1 -1
  64. package/dist/server/modules/git/types.d.ts +1 -0
  65. package/dist/server/modules/git/workspace-repo-guard.d.ts +2 -0
  66. package/dist/server/modules/git/workspace-repo-guard.js +24 -10
  67. package/dist/server/modules/git/workspace-repo-guard.js.map +1 -1
  68. package/dist/server/modules/parallel-sessions/parallel-session-controller.d.ts +53 -0
  69. package/dist/server/modules/parallel-sessions/parallel-session-controller.js +70 -0
  70. package/dist/server/modules/parallel-sessions/parallel-session-controller.js.map +1 -0
  71. package/dist/server/modules/parallel-sessions/parallel-session-group-service.d.ts +83 -0
  72. package/dist/server/modules/parallel-sessions/parallel-session-group-service.js +591 -0
  73. package/dist/server/modules/parallel-sessions/parallel-session-group-service.js.map +1 -0
  74. package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.d.ts +56 -0
  75. package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.js +483 -0
  76. package/dist/server/modules/parallel-sessions/session-isolated-workspace-service.js.map +1 -0
  77. package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.d.ts +2 -0
  78. package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.js +129 -0
  79. package/dist/server/modules/relay-tunnel/relay-tunnel-candidate-endpoints.js.map +1 -0
  80. package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js +12 -9
  81. package/dist/server/modules/relay-tunnel/relay-tunnel-runtime-adapter.js.map +1 -1
  82. package/dist/server/modules/relay-tunnel/relay-tunnel-service.js +1 -128
  83. package/dist/server/modules/relay-tunnel/relay-tunnel-service.js.map +1 -1
  84. package/dist/server/modules/sessions/codex-app-server-helper-client.d.ts +3 -0
  85. package/dist/server/modules/sessions/codex-app-server-helper-client.js +56 -45
  86. package/dist/server/modules/sessions/codex-app-server-helper-client.js.map +1 -1
  87. package/dist/server/modules/sessions/codex-app-server-helper-process.js +21 -2
  88. package/dist/server/modules/sessions/codex-app-server-helper-process.js.map +1 -1
  89. package/dist/server/modules/sessions/session-history-service.d.ts +10 -1
  90. package/dist/server/modules/sessions/session-history-service.js +142 -14
  91. package/dist/server/modules/sessions/session-history-service.js.map +1 -1
  92. package/dist/server/modules/sessions/session-live-runtime-service.d.ts +8 -0
  93. package/dist/server/modules/sessions/session-live-runtime-service.js +208 -25
  94. package/dist/server/modules/sessions/session-live-runtime-service.js.map +1 -1
  95. package/dist/server/modules/workbench/codex-archive-watcher.d.ts +16 -0
  96. package/dist/server/modules/workbench/codex-archive-watcher.js +50 -0
  97. package/dist/server/modules/workbench/codex-archive-watcher.js.map +1 -0
  98. package/dist/server/modules/workbench/workbench-service.d.ts +11 -2
  99. package/dist/server/modules/workbench/workbench-service.js +37 -8
  100. package/dist/server/modules/workbench/workbench-service.js.map +1 -1
  101. package/dist/server/modules/workbench/workspace-panel-snapshot-service.d.ts +1 -1
  102. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js +26 -3
  103. package/dist/server/modules/workbench/workspace-panel-snapshot-service.js.map +1 -1
  104. package/dist/server/modules/workspace/workspace-service.d.ts +3 -1
  105. package/dist/server/modules/workspace/workspace-service.js +10 -2
  106. package/dist/server/modules/workspace/workspace-service.js.map +1 -1
  107. package/dist/server/modules/worktree/worktree-base-ref-resolver.d.ts +20 -0
  108. package/dist/server/modules/worktree/worktree-base-ref-resolver.js +111 -0
  109. package/dist/server/modules/worktree/worktree-base-ref-resolver.js.map +1 -0
  110. package/dist/server/modules/worktree/worktree-cleanup-service.js +9 -3
  111. package/dist/server/modules/worktree/worktree-cleanup-service.js.map +1 -1
  112. package/dist/server/modules/worktree/worktree-manager.d.ts +0 -1
  113. package/dist/server/modules/worktree/worktree-manager.js +14 -20
  114. package/dist/server/modules/worktree/worktree-manager.js.map +1 -1
  115. package/dist/server/routes/git.js +1 -0
  116. package/dist/server/routes/git.js.map +1 -1
  117. package/dist/server/routes/parallel-groups.d.ts +3 -0
  118. package/dist/server/routes/parallel-groups.js +9 -0
  119. package/dist/server/routes/parallel-groups.js.map +1 -0
  120. package/dist/server/server/create-server.d.ts +8 -0
  121. package/dist/server/server/create-server.js +38 -4
  122. package/dist/server/server/create-server.js.map +1 -1
  123. package/dist/server/server/workbench-runtime-terminal-sync.d.ts +14 -0
  124. package/dist/server/server/workbench-runtime-terminal-sync.js +17 -0
  125. package/dist/server/server/workbench-runtime-terminal-sync.js.map +1 -0
  126. package/dist/server/storage/repositories/parallel-session-group-repository.d.ts +11 -0
  127. package/dist/server/storage/repositories/parallel-session-group-repository.js +131 -0
  128. package/dist/server/storage/repositories/parallel-session-group-repository.js.map +1 -0
  129. package/dist/server/storage/repositories/parallel-session-member-repository.d.ts +12 -0
  130. package/dist/server/storage/repositories/parallel-session-member-repository.js +150 -0
  131. package/dist/server/storage/repositories/parallel-session-member-repository.js.map +1 -0
  132. package/dist/server/storage/repositories/session-isolated-workspace-repository.d.ts +15 -0
  133. package/dist/server/storage/repositories/session-isolated-workspace-repository.js +230 -0
  134. package/dist/server/storage/repositories/session-isolated-workspace-repository.js.map +1 -0
  135. package/dist/server/storage/sqlite/schema.sql +73 -0
  136. package/dist/server/types/domain.d.ts +72 -0
  137. package/dist/server/ws/workbench-ws-hub.d.ts +3 -1
  138. package/dist/server/ws/workbench-ws-hub.js +23 -4
  139. package/dist/server/ws/workbench-ws-hub.js.map +1 -1
  140. package/node_modules/@codingns/session-sync-core/dist/providers/codex.d.ts +1 -0
  141. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js +34 -0
  142. package/node_modules/@codingns/session-sync-core/dist/providers/codex.js.map +1 -1
  143. package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.d.ts +3 -0
  144. package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js +46 -22
  145. package/node_modules/@codingns/session-sync-core/dist/runtime/active-run-registry.js.map +1 -1
  146. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js +488 -281
  147. package/node_modules/@codingns/session-sync-core/dist/runtime/codex-runtime.js.map +1 -1
  148. package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js +29 -5
  149. package/node_modules/@codingns/session-sync-core/dist/runtime/opencode-runtime.js.map +1 -1
  150. package/package.json +1 -1
  151. package/dist/public/assets/App-DUAg5urj.css +0 -1
  152. package/dist/public/assets/ConversationPage-Bz0_tvvM.js +0 -2
  153. package/dist/public/assets/DesktopWindowPage-BBmHyRg5.js +0 -2
  154. package/dist/public/assets/FileContextPanel--FVTxDrq.js +0 -1
  155. package/dist/public/assets/GitSidebar-DAiSi9oc.js +0 -6
  156. package/dist/public/assets/MobileSheet-D1lMrcvD.js +0 -1
  157. package/dist/public/assets/MobileWorkspaceSwitcherHeader-DJPV9ym2.js +0 -1
  158. package/dist/public/assets/RelayConnectEntryPage-dSwU8VzK.js +0 -1
  159. package/dist/public/assets/ServerSettingsModal-B34ms3ze.js +0 -1
  160. package/dist/public/assets/SessionIndexPage-D3tG1gmM.js +0 -1
  161. package/dist/public/assets/SettingsPage-B3-6-5GL.js +0 -1
  162. package/dist/public/assets/TerminalManagerPanel-DhuTEdzV.js +0 -1
  163. package/dist/public/assets/ToolFilesPage-BX9QDi9Y.js +0 -1
  164. package/dist/public/assets/ToolGitPage-4VtFox3p.js +0 -1
  165. package/dist/public/assets/ToolProcessesPage-DZJC6Qnt.js +0 -1
  166. package/dist/public/assets/ToolsHomePage-D7JbrAWv.js +0 -1
  167. package/dist/public/assets/WorkbenchLandingPage-C0yqnzqh.js +0 -1
  168. package/dist/public/assets/WorkbenchLayout-Brlj8K3i.js +0 -3
  169. package/dist/public/assets/WorkbenchShellRoute-puGpdDFY.js +0 -1
  170. package/dist/public/assets/WorkspaceDebugDetailPage-fTGweC9N.js +0 -1
  171. package/dist/public/assets/WorkspaceDetailPage-BtaIzSDB.js +0 -1
  172. package/dist/public/assets/WorkspaceHomePage-CUmmYDrM.js +0 -1
  173. package/dist/public/assets/client-runtime-manager-RHFa_iWo.js +0 -1
  174. package/dist/public/assets/index-Cq3ue0za.css +0 -1
  175. package/dist/public/assets/index-DEbFT-Aq.js +0 -42
  176. package/dist/public/assets/session-runtime-machine-Bfnxkk9B.js +0 -17
  177. package/dist/public/assets/window-BWqRixxq.js +0 -1
  178. /package/dist/public/assets/{styles-CSUx5LGe.js → styles-DRVvx_kv.js} +0 -0
@@ -1,18 +1,18 @@
1
- import{g as Sr,j as T,b as q,t as j,H as Ri,G as Fi,Y as Ni,A as _i}from"./index-DEbFT-Aq.js";import{D as Oi}from"./WorkbenchModal-CbDxaCOR.js";import{f as ji,e as Bi}from"./App-BFP7LCSC.js";import{aQ as Mt,aR as Vi}from"./WorkbenchLayout-Brlj8K3i.js";function Ui(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$i={};function Mn(e,t){return($i.jsx?Wi:Hi).test(e)}const qi=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?Dn(e.value):!1:Dn(e)}function Dn(e){return e.replace(qi,"")===""}class rt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rt.prototype.normal={};rt.prototype.property={};rt.prototype.space=void 0;function vr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new rt(n,r,t)}function Jt(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}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 Xi=0;const _=Re(),J=Re(),Kt=Re(),C=Re(),G=Re(),Ve=Re(),ue=Re();function Re(){return 2**++Xi}const en=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:J,commaOrSpaceSeparated:ue,commaSeparated:Ve,number:C,overloadedBoolean:Kt,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(en);class hn extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),Rn(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const l=Dt[o];Rn(this,Dt[o],(r&en[l])===en[l])}}}hn.prototype.defined=!0;function Rn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Jt(r)]=r,n[Jt(o.attribute)]=r}return new rt(t,n,e.space)}const Cr=He({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:C,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:J,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function Ir(e,t){return Er(e,t.toLowerCase())}const Gi=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ve,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:G,autoFocus:_,autoPlay:_,blocking:G,capture:null,charSet:null,checked:_,cite:null,className:G,cols:C,colSpan:null,content:null,contentEditable:J,controls:_,controlsList:G,coords:C|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Kt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:G,height:C,hidden:Kt,high:C,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:G,itemRef:G,itemScope:_,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,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:_,optimum:C,pattern:null,ping:G,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:G,required:_,reversed:_,rows:C,rowSpan:C,sandbox:G,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:J,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:Ir}),Qi=He({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ue,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:G,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ue,rev:ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ue,requiredFeatures:ue,requiredFonts:ue,requiredFormats:ue,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:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ue,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Lr=He({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tr=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ir}),Pr=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zi={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"},Ji=/[A-Z]/g,Fn=/-[a-z]/g,Ki=/^data[-\w.:]+$/i;function el(e,t){const n=Jt(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ki.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Fn,nl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Fn.test(o)){let l=o.replace(Ji,tl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=hn}return new i(r,t)}function tl(e){return"-"+e.toLowerCase()}function nl(e){return e.charAt(1).toUpperCase()}const rl=vr([Cr,Gi,Lr,Tr,Pr],"html"),pn=vr([Cr,Qi,Lr,Tr,Pr],"svg");function il(e){return e.join(" ").trim()}var Oe={},Rt,Nn;function ll(){if(Nn)return Rt;Nn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
2
- `,u="/",f="*",c="",p="comment",h="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var E=1,v=1;function F(z){var L=z.match(t);L&&(E+=L.length);var $=z.lastIndexOf(s);v=~$?z.length-$:v+z.length}function D(){var z={line:E,column:v};return function(L){return L.position=new w(z),O(),L}}function w(z){this.start=z,this.end={line:E,column:v},this.source=x.source}w.prototype.content=S;function N(z){var L=new Error(x.source+":"+E+":"+v+": "+z);if(L.reason=z,L.filename=x.source,L.line=E,L.column=v,L.source=S,!x.silent)throw L}function V(z){var L=z.exec(S);if(L){var $=L[0];return F($),S=S.slice($.length),L}}function O(){V(n)}function k(z){var L;for(z=z||[];L=P();)L!==!1&&z.push(L);return z}function P(){var z=D();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 N("End of comment missing");var $=S.slice(2,L-2);return v+=2,F($),S=S.slice(L),v+=2,z({type:p,comment:$})}}function A(){var z=D(),L=V(r);if(L){if(P(),!V(i))return N("property missing ':'");var $=V(o),Q=z({type:h,property:b(L[0].replace(e,c)),value:$?b($[0].replace(e,c)):c});return V(l),Q}}function U(){var z=[];k(z);for(var L;L=A();)L!==!1&&(z.push(L),k(z));return z}return O(),U()}function b(S){return S?S.replace(a,c):c}return Rt=g,Rt}var _n;function ol(){if(_n)return Oe;_n=1;var e=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=n;const t=e(ll());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Oe}var Ye={},On;function al(){if(On)return Ye;On=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ye.camelCase=s,Ye}var Xe,jn;function sl(){if(jn)return Xe;jn=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ol()),n=al();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Xe=r,Xe}var ul=sl();const cl=Sr(ul),Ar=zr("end"),dn=zr("start");function zr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fl(e){const t=dn(e),n=Ar(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?tn(e):""}function tn(e){return Vn(e&&e.line)+":"+Vn(e&&e.column)}function Bn(e){return tn(e&&e.start)+"-"+tn(e&&e.end)}function Vn(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ze(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.column=void 0;ie.prototype.line=void 0;ie.prototype.ancestors=void 0;ie.prototype.cause=void 0;ie.prototype.fatal=void 0;ie.prototype.place=void 0;ie.prototype.ruleId=void 0;ie.prototype.source=void 0;const mn={}.hasOwnProperty,hl=new Map,pl=/[A-Z]/g,dl=new Set(["table","tbody","thead","tfoot","tr"]),ml=new Set(["td","th"]),Mr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Cl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?pn:rl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Dr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Dr(e,t,n){if(t.type==="element")return xl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wl(e,t,n);if(t.type==="mdxjsEsm")return yl(e,t);if(t.type==="root")return bl(e,t,n);if(t.type==="text")return Sl(e,t)}function xl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=Fr(e,t.tagName,!1),l=El(e,t);let a=xn(e,t);return dl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Yi(s):!0})),Rr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function kl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tt(e,t.position)}function yl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function wl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Fr(e,t.name,!0),l=Il(e,t),a=xn(e,t);return Rr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function bl(e,t,n){const r={};return gn(r,xn(e,t)),e.create(t,e.Fragment,r,n)}function Sl(e,t){return t.value}function Rr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vl(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function Cl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=dn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function El(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&mn.call(t.properties,i)){const o=Ll(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ml.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Il(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else tt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:hl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Dr(e,o,l);a!==void 0&&n.push(a)}return n}function Ll(e,t,n){const r=el(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ui(n):il(n)),r.property==="style"){let i=typeof n=="object"?n:Tl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Pl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Zi[r.property]||r.property:r.attribute,n]}}function Tl(e,t){try{return cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ie("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=Mr+"#cannot-parse-style-attribute",i}}function Fr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Mn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Mn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return mn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){const n=new ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Pl(e){const t={};let n;for(n in e)mn.call(e,n)&&(t[Al(n)]=e[n]);return t}function Al(e){let t=e.replace(pl,zl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zl(e){return"-"+e.toLowerCase()}const Ft={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"]},Ml={};function kn(e,t){const n=Ml,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nr(e,r,i)}function Nr(e,t,n){if(Dl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Un(e.children,t,n)}return Array.isArray(e)?Un(e,t,n):""}function Un(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nr(e[i],t,n);return r.join("")}function Dl(e){return!!(e&&typeof e=="object")}const Hn=document.createElement("i");function yn(e){const t="&"+e+";";Hn.innerHTML=t;const n=Hn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ce(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ce(e,e.length,0,t),e):t}const Wn={}.hasOwnProperty;function _r(e){const t={};let n=-1;for(;++n<e.length;)Rl(t,e[n]);return t}function Rl(e,t){let n;for(n in t){const i=(Wn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Wn.call(i,l)||(i[l]=[]);const a=o[l];Fl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Fl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ce(e,0,0,r)}function Or(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const le=Pe(/[A-Za-z]/),re=Pe(/[\dA-Za-z]/),Nl=Pe(/[#-'*+\--9=?A-Z^-~]/);function gt(e){return e!==null&&(e<32||e===127)}const nn=Pe(/\d/),_l=Pe(/[\dA-Fa-f]/),Ol=Pe(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const wt=Pe(new RegExp("\\p{P}|\\p{S}","u")),De=Pe(/\s/);function Pe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function We(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&re(e.charCodeAt(n+1))&&re(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function W(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(n),a(s)):t(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const jl={tokenize:Bl};function Bl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),W(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Vl={tokenize:Ul},$n={tokenize:Hl};function Ul(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const F=n[r];return t.containerState=F[1],e.attempt(F[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const F=t.events.length;let D=F,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){w=t.events[D][1].end;break}x(r);let N=F;for(;N<t.events.length;)t.events[N][1].end={...w},N++;return ce(t.events,D+1,0,t.events.slice(F)),t.events.length=N,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($n,f,c)(v)}function f(v){return i&&E(),x(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function p(v){return t.containerState={},e.attempt($n,h,g)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function g(v){if(v===null){i&&E(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return M(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,F){const D=t.sliceStream(v);if(F&&D.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const N=t.events.length;let V=N,O,k;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(O){k=t.events[V][1].end;break}O=!0}for(x(r),w=N;w<t.events.length;)t.events[w][1].end={...k},w++;ce(t.events,V+1,0,t.events.slice(N)),t.events.length=w}}function x(v){let F=n.length;for(;F-- >v;){const D=n[F];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hl(e,t,n){return W(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||X(e)||De(e))return 1;if(wt(e))return 2}function bt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:Wl,tokenize:$l};function Wl(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};qn(c,-s),qn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fe(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=fe(u,bt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fe(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=fe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ce(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $l(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Ue(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(s)}}function qn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ql={name:"autolink",tokenize:Yl};function Yl(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return le(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||re(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||re(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||gt(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):Nl(h)?(e.consume(h),u):n(h)}function f(h){return re(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||re(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const it={partial:!0,tokenize:Xl};function Xl(e,t,n){return r;function r(o){return B(o)?W(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||M(o)?t(o):n(o)}}const jr={continuation:{tokenize:Ql},exit:Zl,name:"blockQuote",tokenize:Gl};function Gl(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ql(e,t,n){const r=this;return i;function i(l){return B(l)?W(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(jr,t,n)(l)}}function Zl(e){e.exit("blockQuote")}const Br={name:"characterEscape",tokenize:Jl};function Jl(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ol(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Vr={name:"characterReference",tokenize:Kl};function Kl(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=re,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=_l,f):(e.enter("characterReferenceValue"),o=7,l=nn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===re&&!yn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Yn={partial:!0,tokenize:to},Xn={concrete:!0,name:"codeFenced",tokenize:eo};function eo(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(w){return u(w)}function u(w){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),B(w)?W(e,c,"whitespace")(w):c(w))}function c(w){return w===null||M(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Yn,b,F)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):B(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),W(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||M(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,F,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return o>0&&B(w)?W(e,E,"linePrefix",o+1)(w):E(w)}function E(w){return w===null||M(w)?e.check(Yn,b,F)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||M(w)?(e.exit("codeFlowValue"),E(w)):(e.consume(w),v)}function F(w){return e.exit("codeFenced"),t(w)}function D(w,N,V){let O=0;return k;function k(L){return w.enter("lineEnding"),w.consume(L),w.exit("lineEnding"),P}function P(L){return w.enter("codeFencedFence"),B(L)?W(w,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):A(L)}function A(L){return L===a?(w.enter("codeFencedFenceSequence"),U(L)):V(L)}function U(L){return L===a?(O++,w.consume(L),U):O>=l?(w.exit("codeFencedFenceSequence"),B(L)?W(w,z,"whitespace")(L):z(L)):V(L)}function z(L){return L===null||M(L)?(w.exit("codeFencedFence"),N(L)):V(L)}}}function to(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Nt={name:"codeIndented",tokenize:ro},no={partial:!0,tokenize:io};function ro(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),W(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):M(u)?e.attempt(no,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||M(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function io(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):W(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):M(l)?i(l):n(l)}}const lo={name:"codeText",previous:ao,resolve:oo,tokenize:so};function oo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ao(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function so(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class uo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ge(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ge(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ge(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ge(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ge(this.left,n.reverse())}}}function Ge(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ur(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new uo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,co(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ce(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function co(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=n,g=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(b=p+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const x=a.slice(S[p],S[p+1]),E=o.pop();s.push([E,E+x.length-1]),e.splice(E,2,x)}for(s.reverse(),p=-1;++p<s.length;)u[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return u}const fo={resolve:po,tokenize:mo},ho={partial:!0,tokenize:go};function po(e){return Ur(e),e}function mo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):M(a)?e.check(ho,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function go(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),W(e,o,"linePrefix")}function o(l){if(l===null||M(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Hr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||gt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||M(x)?n(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function b(x){return!f&&(x===null||x===41||X(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||gt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Wr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||M(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!B(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function $r(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):n(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?n(p):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),W(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||M(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Je(e,t){let n;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):B(i)?W(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xo={name:"definition",tokenize:yo},ko={partial:!0,tokenize:wo};function yo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Wr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return X(h)?Je(e,u)(h):u(h)}function u(h){return Hr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ko,c,c)(h)}function c(h){return B(h)?W(e,p,"whitespace")(h):p(h)}function p(h){return h===null||M(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function wo(e,t,n){return r;function r(a){return X(a)?Je(e,i)(a):n(a)}function i(a){return $r(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?W(e,l,"whitespace")(a):l(a)}function l(a){return a===null||M(a)?t(a):n(a)}}const bo={name:"hardBreakEscape",tokenize:So};function So(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return M(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const vo={name:"headingAtx",resolve:Co,tokenize:Eo};function Co(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ce(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Eo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||X(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||M(f)?(e.exit("atxHeading"),t(f)):B(f)?W(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||X(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Io=["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"],Gn=["pre","script","style","textarea"],Lo={concrete:!0,name:"htmlFlow",resolveTo:Ao,tokenize:zo},To={partial:!0,tokenize:Do},Po={partial:!0,tokenize:Mo};function Ao(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zo(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),p):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function p(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,a=0,g):le(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function h(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const ee="CDATA[";return m===ee.charCodeAt(a++)?(e.consume(m),a===ee.length?r.interrupt?t:A:g):n(m)}function b(m){return le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||X(m)){const ee=m===47,de=l.toLowerCase();return!ee&&!o&&Gn.includes(de)?(i=1,r.interrupt?t(m):A(m)):Io.includes(l.toLowerCase())?(i=6,ee?(e.consume(m),x):r.interrupt?t(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?E(m):v(m))}return m===45||re(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:A):n(m)}function E(m){return B(m)?(e.consume(m),E):k(m)}function v(m){return m===47?(e.consume(m),k):m===58||m===95||le(m)?(e.consume(m),F):B(m)?(e.consume(m),v):k(m)}function F(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),F):D(m)}function D(m){return m===61?(e.consume(m),w):B(m)?(e.consume(m),D):v(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),w):V(m)}function N(m){return m===s?(e.consume(m),s=null,O):m===null||M(m)?n(m):(e.consume(m),N)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||X(m)?D(m):(e.consume(m),V)}function O(m){return m===47||m===62||B(m)?v(m):n(m)}function k(m){return m===62?(e.consume(m),P):n(m)}function P(m){return m===null||M(m)?A(m):B(m)?(e.consume(m),P):n(m)}function A(m){return m===45&&i===2?(e.consume(m),$):m===60&&i===1?(e.consume(m),Q):m===62&&i===4?(e.consume(m),te):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),he):M(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(To,pe,U)(m)):m===null||M(m)?(e.exit("htmlFlowData"),U(m)):(e.consume(m),A)}function U(m){return e.check(Po,z,pe)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),L}function L(m){return m===null||M(m)?U(m):(e.enter("htmlFlowData"),A(m))}function $(m){return m===45?(e.consume(m),d):A(m)}function Q(m){return m===47?(e.consume(m),l="",ne):A(m)}function ne(m){if(m===62){const ee=l.toLowerCase();return Gn.includes(ee)?(e.consume(m),te):A(m)}return le(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ne):A(m)}function he(m){return m===93?(e.consume(m),d):A(m)}function d(m){return m===62?(e.consume(m),te):m===45&&i===2?(e.consume(m),d):A(m)}function te(m){return m===null||M(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),te)}function pe(m){return e.exit("htmlFlow"),t(m)}}function Mo(e,t,n){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Do(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,t,n)}}const Ro={name:"htmlText",tokenize:Fo};function Fo(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),D):d===63?(e.consume(d),v):le(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):le(d)?(e.consume(d),E):n(d)}function f(d){return d===45?(e.consume(d),h):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),p):M(d)?(l=c,Q(d)):(e.consume(d),c)}function p(d){return d===45?(e.consume(d),h):c(d)}function h(d){return d===62?$(d):d===45?p(d):c(d)}function g(d){const te="CDATA[";return d===te.charCodeAt(o++)?(e.consume(d),o===te.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):M(d)?(l=b,Q(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?$(d):d===93?(e.consume(d),x):b(d)}function E(d){return d===null||d===62?$(d):M(d)?(l=E,Q(d)):(e.consume(d),E)}function v(d){return d===null?n(d):d===63?(e.consume(d),F):M(d)?(l=v,Q(d)):(e.consume(d),v)}function F(d){return d===62?$(d):v(d)}function D(d){return le(d)?(e.consume(d),w):n(d)}function w(d){return d===45||re(d)?(e.consume(d),w):N(d)}function N(d){return M(d)?(l=N,Q(d)):B(d)?(e.consume(d),N):$(d)}function V(d){return d===45||re(d)?(e.consume(d),V):d===47||d===62||X(d)?O(d):n(d)}function O(d){return d===47?(e.consume(d),$):d===58||d===95||le(d)?(e.consume(d),k):M(d)?(l=O,Q(d)):B(d)?(e.consume(d),O):$(d)}function k(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),k):P(d)}function P(d){return d===61?(e.consume(d),A):M(d)?(l=P,Q(d)):B(d)?(e.consume(d),P):O(d)}function A(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,U):M(d)?(l=A,Q(d)):B(d)?(e.consume(d),A):(e.consume(d),z)}function U(d){return d===i?(e.consume(d),i=void 0,L):d===null?n(d):M(d)?(l=U,Q(d)):(e.consume(d),U)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||X(d)?O(d):(e.consume(d),z)}function L(d){return d===47||d===62||X(d)?O(d):n(d)}function $(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function Q(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ne}function ne(d){return B(d)?W(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):he(d)}function he(d){return e.enter("htmlTextData"),l(d)}}const wn={name:"labelEnd",resolveAll:jo,resolveTo:Bo,tokenize:Vo},No={tokenize:Uo},_o={tokenize:Ho},Oo={tokenize:Wo};function jo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ce(e,0,e.length,n),e}function Bo(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=fe(a,e.slice(o+1,o+r+3)),a=fe(a,[["enter",f,t]]),a=fe(a,bt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=fe(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=fe(a,e.slice(l+1)),a=fe(a,[["exit",s,t]]),ce(e,o,e.length,a),e}function Vo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(No,f,l?f:c)(p):p===91?e.attempt(_o,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(Oo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Uo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return X(c)?Je(e,o)(c):o(c)}function o(c){return c===41?f(c):Hr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return X(c)?Je(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?$r(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return X(c)?Je(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Ho(e,t,n){const r=this;return i;function i(a){return Wr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Wo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const $o={name:"labelStartImage",resolveAll:wn.resolveAll,tokenize:qo};function qo(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Yo={name:"labelStartLink",resolveAll:wn.resolveAll,tokenize:Xo};function Xo(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const _t={name:"lineEnding",tokenize:Go};function Go(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),W(e,t,"linePrefix")}}const dt={name:"thematicBreak",tokenize:Qo};function Qo(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||M(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?W(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:ea},exit:na,name:"list",tokenize:Ko},Zo={partial:!0,tokenize:ra},Jo={partial:!0,tokenize:ta};function Ko(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:nn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(dt,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return nn(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(it,r.interrupt?n:f,e.attempt(Zo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return B(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ea(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,W(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,W(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ta(e,t,n){const r=this;return W(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function na(e){e.exit(this.containerState.type)}function ra(e,t,n){const r=this;return W(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qn={name:"setextUnderline",resolveTo:ia,tokenize:la};function ia(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function la(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?W(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||M(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const oa={tokenize:aa};function aa(e){const t=this,n=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,W(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sa={resolveAll:Yr()},ua=qr("string"),ca=qr("text");function qr(e){return{resolveAll:Yr(e==="text"?fa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Yr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const ha={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:jr},pa={91:xo},da={[-2]:Nt,[-1]:Nt,32:Nt},ma={35:vo,42:dt,45:[Qn,dt],60:Lo,61:Qn,95:dt,96:Xn,126:Xn},ga={38:Vr,92:Br},xa={[-5]:_t,[-4]:_t,[-3]:_t,33:$o,38:Vr,42:rn,60:[ql,Ro],91:Yo,92:[bo,Br],93:wn,95:rn,96:lo},ka={null:[rn,sa]},ya={null:[42,95]},wa={null:[]},ba=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ya,contentInitial:pa,disable:wa,document:ha,flow:ma,flowInitial:da,insideSpan:ka,string:ga,text:xa},Symbol.toStringTag,{value:"Module"}));function Sa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(w),consume:E,enter:v,exit:F,interrupt:N(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(P){return l=fe(l,P),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=bt(o,u.events,u),u.events)}function p(P,A){return Ca(h(P),A)}function h(P){return va(l,P)}function g(){const{_bufferIndex:P,_index:A,line:U,column:z,offset:L}=r;return{_bufferIndex:P,_index:A,line:U,column:z,offset:L}}function b(P){i[P.line]=P.column,k()}function S(){let P;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<A.length;)x(A.charCodeAt(r._bufferIndex));else x(A)}}function x(P){f=f(P)}function E(P){M(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,k()):P!==-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=P}function v(P,A){const U=A||{};return U.type=P,U.start=g(),u.events.push(["enter",U,u]),a.push(U),U}function F(P){const A=a.pop();return A.end=g(),u.events.push(["exit",A,u]),A}function D(P,A){V(P,A.from)}function w(P,A){A.restore()}function N(P,A){return U;function U(z,L,$){let Q,ne,he,d;return Array.isArray(z)?pe(z):"tokenize"in z?pe([z]):te(z);function te(K){return Ae;function Ae(xe){const Ce=xe!==null&&K[xe],Ee=xe!==null&&K.null,Ie=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return pe(Ie)(xe)}}function pe(K){return Q=K,ne=0,K.length===0?$:m(K[ne])}function m(K){return Ae;function Ae(xe){return d=O(),he=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?de():K.tokenize.call(A?Object.assign(Object.create(u),A):u,s,ee,de)(xe)}}function ee(K){return P(he,d),L}function de(K){return d.restore(),++ne<Q.length?m(Q[ne]):$}}}function V(P,A){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ce(u.events,A,u.events.length-A,P.resolve(u.events.slice(A),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function O(){const P=g(),A=u.previous,U=u.currentConstruct,z=u.events.length,L=Array.from(a);return{from:z,restore:$};function $(){r=P,u.previous=A,u.currentConstruct=U,u.events.length=z,a=L,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function va(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ca(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
1
+ import{g as Sr,j as T,b as q,t as j,J as Fi,H as Ri,D as Ni,A as _i}from"./index-BZLcEHW3.js";import{D as Oi}from"./WorkbenchModal-0tPIIhca.js";import{f as ji,e as Bi}from"./App-BZvapsi8.js";import{b9 as Mt,ba as Vi}from"./WorkbenchLayout-DGm8Tc5M.js";function Ui(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hi=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$i={};function Mn(e,t){return($i.jsx?Wi:Hi).test(e)}const qi=/[ \t\n\f\r]/g;function Yi(e){return typeof e=="object"?e.type==="text"?Dn(e.value):!1:Dn(e)}function Dn(e){return e.replace(qi,"")===""}class rt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}rt.prototype.normal={};rt.prototype.property={};rt.prototype.space=void 0;function vr(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new rt(n,r,t)}function Jt(e){return e.toLowerCase()}class ae{constructor(t,n){this.attribute=n,this.property=t}}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 Xi=0;const _=Fe(),J=Fe(),Kt=Fe(),C=Fe(),G=Fe(),Ve=Fe(),ue=Fe();function Fe(){return 2**++Xi}const en=Object.freeze(Object.defineProperty({__proto__:null,boolean:_,booleanish:J,commaOrSpaceSeparated:ue,commaSeparated:Ve,number:C,overloadedBoolean:Kt,spaceSeparated:G},Symbol.toStringTag,{value:"Module"})),Dt=Object.keys(en);class hn extends ae{constructor(t,n,r,i){let o=-1;if(super(t,n),Fn(this,"space",i),typeof r=="number")for(;++o<Dt.length;){const l=Dt[o];Fn(this,Dt[o],(r&en[l])===en[l])}}}hn.prototype.defined=!0;function Fn(e,t,n){n&&(e[t]=n)}function He(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new hn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Jt(r)]=r,n[Jt(o.attribute)]=r}return new rt(t,n,e.space)}const Cr=He({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:C,ariaColIndex:C,ariaColSpan:C,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:J,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:G,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:C,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:C,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:G,ariaRowCount:C,ariaRowIndex:C,ariaRowSpan:C,ariaSelected:J,ariaSetSize:C,ariaSort:null,ariaValueMax:C,ariaValueMin:C,ariaValueNow:C,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Er(e,t){return t in e?e[t]:t}function Ir(e,t){return Er(e,t.toLowerCase())}const Gi=He({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ve,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:_,allowPaymentRequest:_,allowUserMedia:_,alt:null,as:null,async:_,autoCapitalize:null,autoComplete:G,autoFocus:_,autoPlay:_,blocking:G,capture:null,charSet:null,checked:_,cite:null,className:G,cols:C,colSpan:null,content:null,contentEditable:J,controls:_,controlsList:G,coords:C|Ve,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_,defer:_,dir:null,dirName:null,disabled:_,download:Kt,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_,formTarget:null,headers:G,height:C,hidden:Kt,high:C,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:_,inputMode:null,integrity:null,is:null,isMap:_,itemId:null,itemProp:G,itemRef:G,itemScope:_,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_,low:C,manifest:null,max:null,maxLength:C,media:null,method:null,min:null,minLength:C,multiple:_,muted:_,name:null,nonce:null,noModule:_,noValidate:_,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:_,optimum:C,pattern:null,ping:G,placeholder:null,playsInline:_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_,referrerPolicy:null,rel:G,required:_,reversed:_,rows:C,rowSpan:C,sandbox:G,scope:null,scoped:_,seamless:_,selected:_,shadowRootClonable:_,shadowRootDelegatesFocus:_,shadowRootMode:null,shape:null,size:C,sizes:null,slot:null,span:C,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:C,step:null,style:null,tabIndex:C,target:null,title:null,translate:null,type:null,typeMustMatch:_,useMap:null,value:J,width:C,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:C,borderColor:null,bottomMargin:C,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_,declare:_,event:null,face:null,frame:null,frameBorder:null,hSpace:C,leftMargin:C,link:null,longDesc:null,lowSrc:null,marginHeight:C,marginWidth:C,noResize:_,noHref:_,noShade:_,noWrap:_,object:null,profile:null,prompt:null,rev:null,rightMargin:C,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:C,valueType:null,version:null,vAlign:null,vLink:null,vSpace:C,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_,disableRemotePlayback:_,prefix:null,property:null,results:C,security:null,unselectable:null},space:"html",transform:Ir}),Qi=He({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ue,accentHeight:C,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:C,amplitude:C,arabicForm:null,ascent:C,attributeName:null,attributeType:null,azimuth:C,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:C,by:null,calcMode:null,capHeight:C,className:G,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:C,diffuseConstant:C,direction:null,display:null,dur:null,divisor:C,dominantBaseline:null,download:_,dx:null,dy:null,edgeMode:null,editable:null,elevation:C,enableBackground:null,end:null,event:null,exponent:C,externalResourcesRequired:null,fill:null,fillOpacity:C,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:Ve,g2:Ve,glyphName:Ve,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:C,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:C,horizOriginX:C,horizOriginY:C,id:null,ideographic:C,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:C,k:C,k1:C,k2:C,k3:C,k4:C,kernelMatrix:ue,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:C,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:C,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:C,overlineThickness:C,paintOrder:null,panose1:null,path:null,pathLength:C,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:C,pointsAtY:C,pointsAtZ:C,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ue,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ue,rev:ue,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ue,requiredFeatures:ue,requiredFonts:ue,requiredFormats:ue,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:C,specularExponent:C,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:C,strikethroughThickness:C,string:null,stroke:null,strokeDashArray:ue,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:C,strokeOpacity:C,strokeWidth:null,style:null,surfaceScale:C,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ue,tabIndex:C,tableValues:null,target:null,targetX:C,targetY:C,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ue,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:C,underlineThickness:C,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:C,values:null,vAlphabetic:C,vMathematical:C,vectorEffect:null,vHanging:C,vIdeographic:C,version:null,vertAdvY:C,vertOriginX:C,vertOriginY:C,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:C,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Er}),Lr=He({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tr=He({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ir}),Pr=He({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Zi={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"},Ji=/[A-Z]/g,Rn=/-[a-z]/g,Ki=/^data[-\w.:]+$/i;function el(e,t){const n=Jt(t);let r=t,i=ae;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ki.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Rn,nl);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Rn.test(o)){let l=o.replace(Ji,tl);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=hn}return new i(r,t)}function tl(e){return"-"+e.toLowerCase()}function nl(e){return e.charAt(1).toUpperCase()}const rl=vr([Cr,Gi,Lr,Tr,Pr],"html"),pn=vr([Cr,Qi,Lr,Tr,Pr],"svg");function il(e){return e.join(" ").trim()}var Oe={},Ft,Nn;function ll(){if(Nn)return Ft;Nn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s=`
2
+ `,u="/",f="*",c="",p="comment",h="declaration";function g(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var E=1,v=1;function R(z){var L=z.match(t);L&&(E+=L.length);var $=z.lastIndexOf(s);v=~$?z.length-$:v+z.length}function D(){var z={line:E,column:v};return function(L){return L.position=new w(z),O(),L}}function w(z){this.start=z,this.end={line:E,column:v},this.source=x.source}w.prototype.content=S;function N(z){var L=new Error(x.source+":"+E+":"+v+": "+z);if(L.reason=z,L.filename=x.source,L.line=E,L.column=v,L.source=S,!x.silent)throw L}function V(z){var L=z.exec(S);if(L){var $=L[0];return R($),S=S.slice($.length),L}}function O(){V(n)}function k(z){var L;for(z=z||[];L=P();)L!==!1&&z.push(L);return z}function P(){var z=D();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 N("End of comment missing");var $=S.slice(2,L-2);return v+=2,R($),S=S.slice(L),v+=2,z({type:p,comment:$})}}function A(){var z=D(),L=V(r);if(L){if(P(),!V(i))return N("property missing ':'");var $=V(o),Q=z({type:h,property:b(L[0].replace(e,c)),value:$?b($[0].replace(e,c)):c});return V(l),Q}}function U(){var z=[];k(z);for(var L;L=A();)L!==!1&&(z.push(L),k(z));return z}return O(),U()}function b(S){return S?S.replace(a,c):c}return Ft=g,Ft}var _n;function ol(){if(_n)return Oe;_n=1;var e=Oe&&Oe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=n;const t=e(ll());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return Oe}var Ye={},On;function al(){if(On)return Ye;On=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||n.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(t,l))};return Ye.camelCase=s,Ye}var Xe,jn;function sl(){if(jn)return Xe;jn=1;var e=Xe&&Xe.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ol()),n=al();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(a,s){a&&s&&(l[(0,n.camelCase)(a,o)]=s)}),l}return r.default=r,Xe=r,Xe}var ul=sl();const cl=Sr(ul),Ar=zr("end"),dn=zr("start");function zr(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function fl(e){const t=dn(e),n=Ar(e);if(t&&n)return{start:t,end:n}}function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Bn(e.position):"start"in e||"end"in e?Bn(e):"line"in e||"column"in e?tn(e):""}function tn(e){return Vn(e&&e.line)+":"+Vn(e&&e.column)}function Bn(e){return tn(e&&e.start)+"-"+tn(e&&e.end)}function Vn(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Ze(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.column=void 0;ie.prototype.line=void 0;ie.prototype.ancestors=void 0;ie.prototype.cause=void 0;ie.prototype.fatal=void 0;ie.prototype.place=void 0;ie.prototype.ruleId=void 0;ie.prototype.source=void 0;const mn={}.hasOwnProperty,hl=new Map,pl=/[A-Z]/g,dl=new Set(["table","tbody","thead","tfoot","tr"]),ml=new Set(["td","th"]),Mr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gl(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Cl(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=vl(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?pn:rl,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Dr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Dr(e,t,n){if(t.type==="element")return xl(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kl(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wl(e,t,n);if(t.type==="mdxjsEsm")return yl(e,t);if(t.type==="root")return bl(e,t,n);if(t.type==="text")return Sl(e,t)}function xl(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=Rr(e,t.tagName,!1),l=El(e,t);let a=xn(e,t);return dl.has(t.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!Yi(s):!0})),Fr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function kl(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}tt(e,t.position)}function yl(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function wl(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=pn,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Rr(e,t.name,!0),l=Il(e,t),a=xn(e,t);return Fr(e,l,o,t),gn(l,a),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function bl(e,t,n){const r={};return gn(r,xn(e,t)),e.create(t,e.Fragment,r,n)}function Sl(e,t){return t.value}function Fr(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gn(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function vl(e,t,n){return r;function r(i,o,l,a){const u=Array.isArray(l.children)?n:t;return a?u(o,l,a):u(o,l)}}function Cl(e,t){return n;function n(r,i,o,l){const a=Array.isArray(o.children),s=dn(r);return t(i,o,l,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function El(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&mn.call(t.properties,i)){const o=Ll(e,i,t.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ml.has(t.tagName)?r=a:n[l]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Il(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tt(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else tt(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function xn(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:hl;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const s=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(s){const u=i.get(s)||0;l=s+"-"+u,i.set(s,u+1)}}const a=Dr(e,o,l);a!==void 0&&n.push(a)}return n}function Ll(e,t,n){const r=el(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ui(n):il(n)),r.property==="style"){let i=typeof n=="object"?n:Tl(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Pl(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Zi[r.property]||r.property:r.attribute,n]}}function Tl(e,t){try{return cl(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new ie("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=Mr+"#cannot-parse-style-attribute",i}}function Rr(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const a=Mn(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=Mn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return mn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){const n=new ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Mr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Pl(e){const t={};let n;for(n in e)mn.call(e,n)&&(t[Al(n)]=e[n]);return t}function Al(e){let t=e.replace(pl,zl);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function zl(e){return"-"+e.toLowerCase()}const Rt={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"]},Ml={};function kn(e,t){const n=Ml,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nr(e,r,i)}function Nr(e,t,n){if(Dl(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Un(e.children,t,n)}return Array.isArray(e)?Un(e,t,n):""}function Un(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nr(e[i],t,n);return r.join("")}function Dl(e){return!!(e&&typeof e=="object")}const Hn=document.createElement("i");function yn(e){const t="&"+e+";";Hn.innerHTML=t;const n=Hn.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ce(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ce(e,e.length,0,t),e):t}const Wn={}.hasOwnProperty;function _r(e){const t={};let n=-1;for(;++n<e.length;)Fl(t,e[n]);return t}function Fl(e,t){let n;for(n in t){const i=(Wn.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Wn.call(i,l)||(i[l]=[]);const a=o[l];Rl(i[l],Array.isArray(a)?a:a?[a]:[])}}}function Rl(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ce(e,0,0,r)}function Or(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ge(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const le=Pe(/[A-Za-z]/),re=Pe(/[\dA-Za-z]/),Nl=Pe(/[#-'*+\--9=?A-Z^-~]/);function gt(e){return e!==null&&(e<32||e===127)}const nn=Pe(/\d/),_l=Pe(/[\dA-Fa-f]/),Ol=Pe(/[!-/:-@[-`{-~]/);function M(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const wt=Pe(new RegExp("\\p{P}|\\p{S}","u")),De=Pe(/\s/);function Pe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function We(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&re(e.charCodeAt(n+1))&&re(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function W(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(s){return B(s)?(e.enter(n),a(s)):t(s)}function a(s){return B(s)&&o++<i?(e.consume(s),a):(e.exit(n),t(s))}}const jl={tokenize:Bl};function Bl(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),W(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return M(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}const Vl={tokenize:Ul},$n={tokenize:Hl};function Ul(e){const t=this,n=[];let r=0,i,o,l;return a;function a(v){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,s,u)(v)}return u(v)}function s(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const R=t.events.length;let D=R,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){w=t.events[D][1].end;break}x(r);let N=R;for(;N<t.events.length;)t.events[N][1].end={...w},N++;return ce(t.events,D+1,0,t.events.slice(R)),t.events.length=N,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($n,f,c)(v)}function f(v){return i&&E(),x(r),p(v)}function c(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,g(v)}function p(v){return t.containerState={},e.attempt($n,h,g)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function g(v){if(v===null){i&&E(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return M(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),b)}function S(v,R){const D=t.sliceStream(v);if(R&&D.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(D),t.parser.lazy[v.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<l&&(!i.events[w][1].end||i.events[w][1].end.offset>l))return;const N=t.events.length;let V=N,O,k;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(O){k=t.events[V][1].end;break}O=!0}for(x(r),w=N;w<t.events.length;)t.events[w][1].end={...k},w++;ce(t.events,V+1,0,t.events.slice(N)),t.events.length=w}}function x(v){let R=n.length;for(;R-- >v;){const D=n[R];t.containerState=D[1],D[0].exit.call(t,e)}n.length=v}function E(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Hl(e,t,n){return W(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||X(e)||De(e))return 1;if(wt(e))return 2}function bt(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const rn={name:"attention",resolveAll:Wl,tokenize:$l};function Wl(e,t){let n=-1,r,i,o,l,a,s,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};qn(c,-s),qn(p,s),l={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fe(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=fe(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),u=fe(u,bt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=fe(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=fe(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,ce(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $l(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r);let o;return l;function l(s){return o=s,e.enter("attentionSequence"),a(s)}function a(s){if(s===o)return e.consume(s),a;const u=e.exit("attentionSequence"),f=Ue(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return u._open=!!(o===42?c:c&&(i||!p)),u._close=!!(o===42?p:p&&(f||!c)),t(s)}}function qn(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ql={name:"autolink",tokenize:Yl};function Yl(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return le(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||re(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||re(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||gt(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),f):Nl(h)?(e.consume(h),u):n(h)}function f(h){return re(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||re(h))&&r++<63){const g=h===45?p:c;return e.consume(h),g}return n(h)}}const it={partial:!0,tokenize:Xl};function Xl(e,t,n){return r;function r(o){return B(o)?W(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||M(o)?t(o):n(o)}}const jr={continuation:{tokenize:Ql},exit:Zl,name:"blockQuote",tokenize:Gl};function Gl(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ql(e,t,n){const r=this;return i;function i(l){return B(l)?W(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(jr,t,n)(l)}}function Zl(e){e.exit("blockQuote")}const Br={name:"characterEscape",tokenize:Jl};function Jl(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ol(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Vr={name:"characterReference",tokenize:Kl};function Kl(e,t,n){const r=this;let i=0,o,l;return a;function a(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,l=re,f(c))}function u(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=_l,f):(e.enter("characterReferenceValue"),o=7,l=nn,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return l===re&&!yn(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(c)&&i++<o?(e.consume(c),f):n(c)}}const Yn={partial:!0,tokenize:to},Xn={concrete:!0,name:"codeFenced",tokenize:eo};function eo(e,t,n){const r=this,i={partial:!0,tokenize:D};let o=0,l=0,a;return s;function s(w){return u(w)}function u(w){const N=r.events[r.events.length-1];return o=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===a?(l++,e.consume(w),f):l<3?n(w):(e.exit("codeFencedFenceSequence"),B(w)?W(e,c,"whitespace")(w):c(w))}function c(w){return w===null||M(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Yn,b,R)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):B(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),W(e,h,"whitespace")(w)):w===96&&w===a?n(w):(e.consume(w),p)}function h(w){return w===null||M(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||M(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===a?n(w):(e.consume(w),g)}function b(w){return e.attempt(i,R,S)(w)}function S(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),x}function x(w){return o>0&&B(w)?W(e,E,"linePrefix",o+1)(w):E(w)}function E(w){return w===null||M(w)?e.check(Yn,b,R)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||M(w)?(e.exit("codeFlowValue"),E(w)):(e.consume(w),v)}function R(w){return e.exit("codeFenced"),t(w)}function D(w,N,V){let O=0;return k;function k(L){return w.enter("lineEnding"),w.consume(L),w.exit("lineEnding"),P}function P(L){return w.enter("codeFencedFence"),B(L)?W(w,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):A(L)}function A(L){return L===a?(w.enter("codeFencedFenceSequence"),U(L)):V(L)}function U(L){return L===a?(O++,w.consume(L),U):O>=l?(w.exit("codeFencedFenceSequence"),B(L)?W(w,z,"whitespace")(L):z(L)):V(L)}function z(L){return L===null||M(L)?(w.exit("codeFencedFence"),N(L)):V(L)}}}function to(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Nt={name:"codeIndented",tokenize:ro},no={partial:!0,tokenize:io};function ro(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),W(e,o,"linePrefix",5)(u)}function o(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):M(u)?e.attempt(no,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||M(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function io(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):W(e,o,"linePrefix",5)(l)}function o(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):M(l)?i(l):n(l)}}const lo={name:"codeText",previous:ao,resolve:oo,tokenize:so};function oo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ao(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function so(e,t,n){let r=0,i,o;return l;function l(c){return e.enter("codeText"),e.enter("codeTextSequence"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(o=e.enter("codeTextSequence"),i=0,f(c)):M(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(c))}function u(c){return c===null||c===32||c===96||M(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(o.type="codeTextData",u(c))}}class uo{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ge(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ge(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ge(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ge(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ge(this.left,n.reverse())}}}function Ge(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ur(e){const t={};let n=-1,r,i,o,l,a,s,u;const f=new uo(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,o=0,o<s.length&&s[o][1].type==="lineEndingBlank"&&(o+=2),o<s.length&&s[o][1].type==="content"))for(;++o<s.length&&s[o][1].type!=="content";)s[o][1].type==="chunkText"&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,co(f,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return ce(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function co(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],u={};let f,c,p=-1,h=n,g=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(b=p+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const x=a.slice(S[p],S[p+1]),E=o.pop();s.push([E,E+x.length-1]),e.splice(E,2,x)}for(s.reverse(),p=-1;++p<s.length;)u[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return u}const fo={resolve:po,tokenize:mo},ho={partial:!0,tokenize:go};function po(e){return Ur(e),e}function mo(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):M(a)?e.check(ho,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function go(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),W(e,o,"linePrefix")}function o(l){if(l===null||M(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Hr(e,t,n,r,i,o,l,a,s){const u=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),p):x===null||x===32||x===41||gt(x)?n(x):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(x))}function p(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(a),p(x)):x===null||x===60||M(x)?n(x):(e.consume(x),x===92?g:h)}function g(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function b(x){return!f&&(x===null||x===41||X(x))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,b):x===41?(e.consume(x),f--,b):x===null||x===32||x===40||gt(x)?n(x):(e.consume(x),x===92?S:b)}function S(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Wr(e,t,n,r,i,o){const l=this;let a=0,s;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!s||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):M(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===null||h===91||h===93||M(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),s||(s=!B(h)),h===92?p:c)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function $r(e,t,n,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,s):n(p)}function s(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===l?(e.exit(o),s(l)):p===null?n(p):M(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),W(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||M(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?c:f)}function c(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Je(e,t){let n;return r;function r(i){return M(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):B(i)?W(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const xo={name:"definition",tokenize:yo},ko={partial:!0,tokenize:wo};function yo(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return Wr.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return X(h)?Je(e,u)(h):u(h)}function u(h){return Hr(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(ko,c,c)(h)}function c(h){return B(h)?W(e,p,"whitespace")(h):p(h)}function p(h){return h===null||M(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function wo(e,t,n){return r;function r(a){return X(a)?Je(e,i)(a):n(a)}function i(a){return $r(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?W(e,l,"whitespace")(a):l(a)}function l(a){return a===null||M(a)?t(a):n(a)}}const bo={name:"hardBreakEscape",tokenize:So};function So(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return M(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const vo={name:"headingAtx",resolve:Co,tokenize:Eo};function Co(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ce(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Eo(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||X(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||M(f)?(e.exit("atxHeading"),t(f)):B(f)?W(e,a,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),a(f))}function u(f){return f===null||f===35||X(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),u)}}const Io=["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"],Gn=["pre","script","style","textarea"],Lo={concrete:!0,name:"htmlFlow",resolveTo:Ao,tokenize:zo},To={partial:!0,tokenize:Do},Po={partial:!0,tokenize:Mo};function Ao(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zo(e,t,n){const r=this;let i,o,l,a,s;return u;function u(m){return f(m)}function f(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),c}function c(m){return m===33?(e.consume(m),p):m===47?(e.consume(m),o=!0,b):m===63?(e.consume(m),i=3,r.interrupt?t:d):le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function p(m){return m===45?(e.consume(m),i=2,h):m===91?(e.consume(m),i=5,a=0,g):le(m)?(e.consume(m),i=4,r.interrupt?t:d):n(m)}function h(m){return m===45?(e.consume(m),r.interrupt?t:d):n(m)}function g(m){const ee="CDATA[";return m===ee.charCodeAt(a++)?(e.consume(m),a===ee.length?r.interrupt?t:A:g):n(m)}function b(m){return le(m)?(e.consume(m),l=String.fromCharCode(m),S):n(m)}function S(m){if(m===null||m===47||m===62||X(m)){const ee=m===47,de=l.toLowerCase();return!ee&&!o&&Gn.includes(de)?(i=1,r.interrupt?t(m):A(m)):Io.includes(l.toLowerCase())?(i=6,ee?(e.consume(m),x):r.interrupt?t(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(m):o?E(m):v(m))}return m===45||re(m)?(e.consume(m),l+=String.fromCharCode(m),S):n(m)}function x(m){return m===62?(e.consume(m),r.interrupt?t:A):n(m)}function E(m){return B(m)?(e.consume(m),E):k(m)}function v(m){return m===47?(e.consume(m),k):m===58||m===95||le(m)?(e.consume(m),R):B(m)?(e.consume(m),v):k(m)}function R(m){return m===45||m===46||m===58||m===95||re(m)?(e.consume(m),R):D(m)}function D(m){return m===61?(e.consume(m),w):B(m)?(e.consume(m),D):v(m)}function w(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),s=m,N):B(m)?(e.consume(m),w):V(m)}function N(m){return m===s?(e.consume(m),s=null,O):m===null||M(m)?n(m):(e.consume(m),N)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||X(m)?D(m):(e.consume(m),V)}function O(m){return m===47||m===62||B(m)?v(m):n(m)}function k(m){return m===62?(e.consume(m),P):n(m)}function P(m){return m===null||M(m)?A(m):B(m)?(e.consume(m),P):n(m)}function A(m){return m===45&&i===2?(e.consume(m),$):m===60&&i===1?(e.consume(m),Q):m===62&&i===4?(e.consume(m),te):m===63&&i===3?(e.consume(m),d):m===93&&i===5?(e.consume(m),he):M(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(To,pe,U)(m)):m===null||M(m)?(e.exit("htmlFlowData"),U(m)):(e.consume(m),A)}function U(m){return e.check(Po,z,pe)(m)}function z(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),L}function L(m){return m===null||M(m)?U(m):(e.enter("htmlFlowData"),A(m))}function $(m){return m===45?(e.consume(m),d):A(m)}function Q(m){return m===47?(e.consume(m),l="",ne):A(m)}function ne(m){if(m===62){const ee=l.toLowerCase();return Gn.includes(ee)?(e.consume(m),te):A(m)}return le(m)&&l.length<8?(e.consume(m),l+=String.fromCharCode(m),ne):A(m)}function he(m){return m===93?(e.consume(m),d):A(m)}function d(m){return m===62?(e.consume(m),te):m===45&&i===2?(e.consume(m),d):A(m)}function te(m){return m===null||M(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),te)}function pe(m){return e.exit("htmlFlow"),t(m)}}function Mo(e,t,n){const r=this;return i;function i(l){return M(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Do(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,t,n)}}const Fo={name:"htmlText",tokenize:Ro};function Ro(e,t,n){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),s}function s(d){return d===33?(e.consume(d),u):d===47?(e.consume(d),D):d===63?(e.consume(d),v):le(d)?(e.consume(d),V):n(d)}function u(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,g):le(d)?(e.consume(d),E):n(d)}function f(d){return d===45?(e.consume(d),h):n(d)}function c(d){return d===null?n(d):d===45?(e.consume(d),p):M(d)?(l=c,Q(d)):(e.consume(d),c)}function p(d){return d===45?(e.consume(d),h):c(d)}function h(d){return d===62?$(d):d===45?p(d):c(d)}function g(d){const te="CDATA[";return d===te.charCodeAt(o++)?(e.consume(d),o===te.length?b:g):n(d)}function b(d){return d===null?n(d):d===93?(e.consume(d),S):M(d)?(l=b,Q(d)):(e.consume(d),b)}function S(d){return d===93?(e.consume(d),x):b(d)}function x(d){return d===62?$(d):d===93?(e.consume(d),x):b(d)}function E(d){return d===null||d===62?$(d):M(d)?(l=E,Q(d)):(e.consume(d),E)}function v(d){return d===null?n(d):d===63?(e.consume(d),R):M(d)?(l=v,Q(d)):(e.consume(d),v)}function R(d){return d===62?$(d):v(d)}function D(d){return le(d)?(e.consume(d),w):n(d)}function w(d){return d===45||re(d)?(e.consume(d),w):N(d)}function N(d){return M(d)?(l=N,Q(d)):B(d)?(e.consume(d),N):$(d)}function V(d){return d===45||re(d)?(e.consume(d),V):d===47||d===62||X(d)?O(d):n(d)}function O(d){return d===47?(e.consume(d),$):d===58||d===95||le(d)?(e.consume(d),k):M(d)?(l=O,Q(d)):B(d)?(e.consume(d),O):$(d)}function k(d){return d===45||d===46||d===58||d===95||re(d)?(e.consume(d),k):P(d)}function P(d){return d===61?(e.consume(d),A):M(d)?(l=P,Q(d)):B(d)?(e.consume(d),P):O(d)}function A(d){return d===null||d===60||d===61||d===62||d===96?n(d):d===34||d===39?(e.consume(d),i=d,U):M(d)?(l=A,Q(d)):B(d)?(e.consume(d),A):(e.consume(d),z)}function U(d){return d===i?(e.consume(d),i=void 0,L):d===null?n(d):M(d)?(l=U,Q(d)):(e.consume(d),U)}function z(d){return d===null||d===34||d===39||d===60||d===61||d===96?n(d):d===47||d===62||X(d)?O(d):(e.consume(d),z)}function L(d){return d===47||d===62||X(d)?O(d):n(d)}function $(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),t):n(d)}function Q(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ne}function ne(d){return B(d)?W(e,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):he(d)}function he(d){return e.enter("htmlTextData"),l(d)}}const wn={name:"labelEnd",resolveAll:jo,resolveTo:Bo,tokenize:Vo},No={tokenize:Uo},_o={tokenize:Ho},Oo={tokenize:Wo};function jo(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ce(e,0,e.length,n),e}function Bo(e,t){let n=e.length,r=0,i,o,l,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const s={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",s,t],["enter",u,t]],a=fe(a,e.slice(o+1,o+r+3)),a=fe(a,[["enter",f,t]]),a=fe(a,bt(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),a=fe(a,[["exit",f,t],e[l-2],e[l-1],["exit",u,t]]),a=fe(a,e.slice(l+1)),a=fe(a,[["exit",s,t]]),ce(e,o,e.length,a),e}function Vo(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(p){return o?o._inactive?c(p):(l=r.parser.defined.includes(ge(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(No,f,l?f:c)(p):p===91?e.attempt(_o,f,l?u:c)(p):l?f(p):c(p)}function u(p){return e.attempt(Oo,f,c)(p)}function f(p){return t(p)}function c(p){return o._balanced=!0,n(p)}}function Uo(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return X(c)?Je(e,o)(c):o(c)}function o(c){return c===41?f(c):Hr(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function l(c){return X(c)?Je(e,s)(c):f(c)}function a(c){return n(c)}function s(c){return c===34||c===39||c===40?$r(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return X(c)?Je(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function Ho(e,t,n){const r=this;return i;function i(a){return Wr.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(ge(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function Wo(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const $o={name:"labelStartImage",resolveAll:wn.resolveAll,tokenize:qo};function qo(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Yo={name:"labelStartLink",resolveAll:wn.resolveAll,tokenize:Xo};function Xo(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const _t={name:"lineEnding",tokenize:Go};function Go(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),W(e,t,"linePrefix")}}const dt={name:"thematicBreak",tokenize:Qo};function Qo(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||M(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),B(u)?W(e,a,"whitespace")(u):a(u))}}const oe={continuation:{tokenize:ea},exit:na,name:"list",tokenize:Ko},Zo={partial:!0,tokenize:ra},Jo={partial:!0,tokenize:ta};function Ko(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:nn(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(dt,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return nn(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(it,r.interrupt?n:f,e.attempt(Zo,p,c))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function c(h){return B(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ea(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,W(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Jo,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,W(e,e.attempt(oe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ta(e,t,n){const r=this;return W(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function na(e){e.exit(this.containerState.type)}function ra(e,t,n){const r=this;return W(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Qn={name:"setextUnderline",resolveTo:ia,tokenize:la};function ia(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function la(e,t,n){const r=this;let i;return o;function o(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),B(u)?W(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||M(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const oa={tokenize:aa};function aa(e){const t=this,n=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,W(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fo,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const sa={resolveAll:Yr()},ua=qr("string"),ca=qr("text");function qr(e){return{resolveAll:Yr(e==="text"?fa:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,a);return l;function l(f){return u(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),o(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const h=c[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Yr(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function fa(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,a=0,s;for(;o--;){const u=i[o];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)s=!0,a++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||s||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const ha={42:oe,43:oe,45:oe,48:oe,49:oe,50:oe,51:oe,52:oe,53:oe,54:oe,55:oe,56:oe,57:oe,62:jr},pa={91:xo},da={[-2]:Nt,[-1]:Nt,32:Nt},ma={35:vo,42:dt,45:[Qn,dt],60:Lo,61:Qn,95:dt,96:Xn,126:Xn},ga={38:Vr,92:Br},xa={[-5]:_t,[-4]:_t,[-3]:_t,33:$o,38:Vr,42:rn,60:[ql,Fo],91:Yo,92:[bo,Br],93:wn,95:rn,96:lo},ka={null:[rn,sa]},ya={null:[42,95]},wa={null:[]},ba=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ya,contentInitial:pa,disable:wa,document:ha,flow:ma,flowInitial:da,insideSpan:ka,string:ga,text:xa},Symbol.toStringTag,{value:"Module"}));function Sa(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],a=[];const s={attempt:N(D),check:N(w),consume:E,enter:v,exit:R,interrupt:N(w,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:c};let f=t.tokenize.call(u,s);return t.resolveAll&&o.push(t),u;function c(P){return l=fe(l,P),S(),l[l.length-1]!==null?[]:(V(t,0),u.events=bt(o,u.events,u),u.events)}function p(P,A){return Ca(h(P),A)}function h(P){return va(l,P)}function g(){const{_bufferIndex:P,_index:A,line:U,column:z,offset:L}=r;return{_bufferIndex:P,_index:A,line:U,column:z,offset:L}}function b(P){i[P.line]=P.column,k()}function S(){let P;for(;r._index<l.length;){const A=l[r._index];if(typeof A=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<A.length;)x(A.charCodeAt(r._bufferIndex));else x(A)}}function x(P){f=f(P)}function E(P){M(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,k()):P!==-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=P}function v(P,A){const U=A||{};return U.type=P,U.start=g(),u.events.push(["enter",U,u]),a.push(U),U}function R(P){const A=a.pop();return A.end=g(),u.events.push(["exit",A,u]),A}function D(P,A){V(P,A.from)}function w(P,A){A.restore()}function N(P,A){return U;function U(z,L,$){let Q,ne,he,d;return Array.isArray(z)?pe(z):"tokenize"in z?pe([z]):te(z);function te(K){return Ae;function Ae(xe){const Ce=xe!==null&&K[xe],Ee=xe!==null&&K.null,Ie=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return pe(Ie)(xe)}}function pe(K){return Q=K,ne=0,K.length===0?$:m(K[ne])}function m(K){return Ae;function Ae(xe){return d=O(),he=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?de():K.tokenize.call(A?Object.assign(Object.create(u),A):u,s,ee,de)(xe)}}function ee(K){return P(he,d),L}function de(K){return d.restore(),++ne<Q.length?m(Q[ne]):$}}}function V(P,A){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ce(u.events,A,u.events.length-A,P.resolve(u.events.slice(A),u)),P.resolveTo&&(u.events=P.resolveTo(u.events,u))}function O(){const P=g(),A=u.previous,U=u.currentConstruct,z=u.events.length,L=Array.from(a);return{from:z,restore:$};function $(){r=P,u.previous=A,u.currentConstruct=U,u.events.length=z,a=L,k()}}function k(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function va(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Ca(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
3
3
  `;break}case-3:{l=`\r
4
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ea(e){const r={constructs:_r([ba,...(e||{}).extensions||[]]),content:i(jl),defined:[],document:i(Vl),flow:i(oa),lazy:{},string:i(ua),text:i(ca)};return r;function i(o){return l;function l(a){return Sa(r,o,a)}}}function Ia(e){for(;!Ur(e););return e}const Zn=/[\0\t\n\r]/g;function La(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Zn.lastIndex=c,u=Zn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Ta=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pa(e){return e.replace(Ta,Aa)}function Aa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Or(n.slice(o?2:1),o?16:10)}return yn(n)||e}const Xr={}.hasOwnProperty;function za(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ma(n)(Ia(Ea(n).document().write(La()(e,t,!0))))}function Ma(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(at),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(we),blockQuote:o(Ee),characterEscape:O,characterReference:O,codeFenced:o(Ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ie,l),codeText:o(Lt,l),codeTextData:O,data:O,codeFlowValue:O,definition:o(Tt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Pt),hardBreakEscape:o(Le),hardBreakTrailing:o(Le),htmlFlow:o(ot,l),htmlFlowData:O,htmlText:o(ot,l),htmlTextData:O,image:o(At),label:l,link:o(at),listItem:o(zt),listItemValue:p,listOrdered:o(Fe,c),listUnordered:o(Fe),paragraph:o(st),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(we),strong:o(ut),thematicBreak:o(Ne)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Ce,autolinkProtocol:xe,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:K,characterReference:Ae,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:s(x),codeText:s(L),codeTextData:k,data:k,definition:s(),definitionDestinationString:F,definitionLabelString:E,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(A),hardBreakTrailing:s(A),htmlFlow:s(U),htmlFlowData:k,htmlText:s(z),htmlTextData:k,image:s(Q),label:he,labelText:ne,lineEnding:P,link:s($),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ee,resourceDestinationString:d,resourceTitleString:te,resource:pe,setextHeading:s(V),setextHeadingLineSequence:N,setextHeadingText:w,strong:s(),thematicBreak:s()}};Gr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(y){let I={type:"root",children:[]};const R={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},H=[];let Y=-1;for(;++Y<y.length;)if(y[Y][1].type==="listOrdered"||y[Y][1].type==="listUnordered")if(y[Y][0]==="enter")H.push(Y);else{const me=H.pop();Y=i(y,me,Y)}for(Y=-1;++Y<y.length;){const me=t[y[Y][0]];Xr.call(me,y[Y][1].type)&&me[y[Y][1].type].call(Object.assign({sliceSerialize:y[Y][2].sliceSerialize},R),y[Y][1])}if(R.tokenStack.length>0){const me=R.tokenStack[R.tokenStack.length-1];(me[1]||Jn).call(R,void 0,me[0])}for(I.position={start:Te(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:Te(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<t.transforms.length;)I=t.transforms[Y](I)||I;return I}function i(y,I,R){let H=I-1,Y=-1,me=!1,ze,be,$e,qe;for(;++H<=R;){const se=y[H];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?Y++:Y--,qe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(ze&&!qe&&!Y&&!$e&&($e=H),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!Y&&se[0]==="enter"&&se[1].type==="listItemPrefix"||Y===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(ze){let _e=H;for(be=void 0;_e--;){const Se=y[_e];if(Se[1].type==="lineEnding"||Se[1].type==="lineEndingBlank"){if(Se[0]==="exit")continue;be&&(y[be][1].type="lineEndingBlank",me=!0),Se[1].type="lineEnding",be=_e}else if(!(Se[1].type==="linePrefix"||Se[1].type==="blockQuotePrefix"||Se[1].type==="blockQuotePrefixWhitespace"||Se[1].type==="blockQuoteMarker"||Se[1].type==="listItemIndent"))break}$e&&(!be||$e<be)&&(ze._spread=!0),ze.end=Object.assign({},be?y[be][1].start:se[1].end),y.splice(be||H,0,["exit",ze,se[2]]),H++,R++}if(se[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};ze=_e,y.splice(H,0,["enter",_e,se[2]]),H++,R++,$e=void 0,qe=!0}}}return y[I][1]._spread=me,R}function o(y,I){return R;function R(H){a.call(this,y(H),H),I&&I.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(y,I,R){this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([I,R||void 0]),y.position={start:Te(I.start),end:void 0}}function s(y){return I;function I(R){y&&y.call(this,R),u.call(this,R)}}function u(y,I){const R=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==y.type&&(I?I.call(this,y,H[0]):(H[1]||Jn).call(this,y,H[0]));else throw new Error("Cannot close `"+y.type+"` ("+Ze({start:y.start,end:y.end})+"): it’s not open");R.position.end=Te(y.end)}function f(){return kn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(y){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const y=this.resume(),I=this.stack[this.stack.length-1];I.lang=y}function g(){const y=this.resume(),I=this.stack[this.stack.length-1];I.meta=y}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/(\r?\n|\r)$/g,"")}function E(y){const I=this.resume(),R=this.stack[this.stack.length-1];R.label=I,R.identifier=ge(this.sliceSerialize(y)).toLowerCase()}function v(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function F(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function D(y){const I=this.stack[this.stack.length-1];if(!I.depth){const R=this.sliceSerialize(y).length;I.depth=R}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function N(y){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(y).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function O(y){const R=this.stack[this.stack.length-1].children;let H=R[R.length-1];(!H||H.type!=="text")&&(H=Z(),H.position={start:Te(y.start),end:void 0},R.push(H)),this.stack.push(H)}function k(y){const I=this.stack.pop();I.value+=this.sliceSerialize(y),I.position.end=Te(y.end)}function P(y){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const R=I.children[I.children.length-1];R.position.end=Te(y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(O.call(this,y),k.call(this,y))}function A(){this.data.atHardBreak=!0}function U(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function z(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function L(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function $(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function Q(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function ne(y){const I=this.sliceSerialize(y),R=this.stack[this.stack.length-2];R.label=Pa(I),R.identifier=ge(I).toLowerCase()}function he(){const y=this.stack[this.stack.length-1],I=this.resume(),R=this.stack[this.stack.length-1];if(this.data.inReference=!0,R.type==="link"){const H=y.children;R.children=H}else R.alt=I}function d(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function te(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ee(y){const I=this.resume(),R=this.stack[this.stack.length-1];R.label=I,R.identifier=ge(this.sliceSerialize(y)).toLowerCase(),this.data.referenceType="full"}function de(y){this.data.characterReferenceType=y.type}function K(y){const I=this.sliceSerialize(y),R=this.data.characterReferenceType;let H;R?(H=Or(I,R==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=yn(I);const Y=this.stack[this.stack.length-1];Y.value+=H}function Ae(y){const I=this.stack.pop();I.position.end=Te(y.end)}function xe(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(y)}function Ce(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(y)}function Ee(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function we(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function ot(){return{type:"html",value:""}}function At(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Fe(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[]}}function zt(y){return{type:"listItem",spread:y._spread,checked:null,children:[]}}function st(){return{type:"paragraph",children:[]}}function ut(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function Ne(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function Gr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Gr(e,r):Da(e,r)}}function Da(e,t){let n;for(n in t)if(Xr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Jn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function Ra(e){const t=this;t.parser=n;function n(r){return za(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fa(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Na(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
4
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Ea(e){const r={constructs:_r([ba,...(e||{}).extensions||[]]),content:i(jl),defined:[],document:i(Vl),flow:i(oa),lazy:{},string:i(ua),text:i(ca)};return r;function i(o){return l;function l(a){return Sa(r,o,a)}}}function Ia(e){for(;!Ur(e););return e}const Zn=/[\0\t\n\r]/g;function La(){let e=1,t="",n=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,t="",n&&(o.charCodeAt(0)===65279&&c++,n=void 0);c<o.length;){if(Zn.lastIndex=c,u=Zn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){t=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const Ta=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pa(e){return e.replace(Ta,Aa)}function Aa(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Or(n.slice(o?2:1),o?16:10)}return yn(n)||e}const Xr={}.hasOwnProperty;function za(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ma(n)(Ia(Ea(n).document().write(La()(e,t,!0))))}function Ma(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(at),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(we),blockQuote:o(Ee),characterEscape:O,characterReference:O,codeFenced:o(Ie),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Ie,l),codeText:o(Lt,l),codeTextData:O,data:O,codeFlowValue:O,definition:o(Tt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Pt),hardBreakEscape:o(Le),hardBreakTrailing:o(Le),htmlFlow:o(ot,l),htmlFlowData:O,htmlText:o(ot,l),htmlTextData:O,image:o(At),label:l,link:o(at),listItem:o(zt),listItemValue:p,listOrdered:o(Re,c),listUnordered:o(Re),paragraph:o(st),reference:m,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(we),strong:o(ut),thematicBreak:o(Ne)},exit:{atxHeading:s(),atxHeadingSequence:D,autolink:s(),autolinkEmail:Ce,autolinkProtocol:xe,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:K,characterReference:Ae,codeFenced:s(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:s(x),codeText:s(L),codeTextData:k,data:k,definition:s(),definitionDestinationString:R,definitionLabelString:E,definitionTitleString:v,emphasis:s(),hardBreakEscape:s(A),hardBreakTrailing:s(A),htmlFlow:s(U),htmlFlowData:k,htmlText:s(z),htmlTextData:k,image:s(Q),label:he,labelText:ne,lineEnding:P,link:s($),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ee,resourceDestinationString:d,resourceTitleString:te,resource:pe,setextHeading:s(V),setextHeadingLineSequence:N,setextHeadingText:w,strong:s(),thematicBreak:s()}};Gr(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(y){let I={type:"root",children:[]};const F={stack:[I],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:f,data:n},H=[];let Y=-1;for(;++Y<y.length;)if(y[Y][1].type==="listOrdered"||y[Y][1].type==="listUnordered")if(y[Y][0]==="enter")H.push(Y);else{const me=H.pop();Y=i(y,me,Y)}for(Y=-1;++Y<y.length;){const me=t[y[Y][0]];Xr.call(me,y[Y][1].type)&&me[y[Y][1].type].call(Object.assign({sliceSerialize:y[Y][2].sliceSerialize},F),y[Y][1])}if(F.tokenStack.length>0){const me=F.tokenStack[F.tokenStack.length-1];(me[1]||Jn).call(F,void 0,me[0])}for(I.position={start:Te(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:Te(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},Y=-1;++Y<t.transforms.length;)I=t.transforms[Y](I)||I;return I}function i(y,I,F){let H=I-1,Y=-1,me=!1,ze,be,$e,qe;for(;++H<=F;){const se=y[H];switch(se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{se[0]==="enter"?Y++:Y--,qe=void 0;break}case"lineEndingBlank":{se[0]==="enter"&&(ze&&!qe&&!Y&&!$e&&($e=H),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!Y&&se[0]==="enter"&&se[1].type==="listItemPrefix"||Y===-1&&se[0]==="exit"&&(se[1].type==="listUnordered"||se[1].type==="listOrdered")){if(ze){let _e=H;for(be=void 0;_e--;){const Se=y[_e];if(Se[1].type==="lineEnding"||Se[1].type==="lineEndingBlank"){if(Se[0]==="exit")continue;be&&(y[be][1].type="lineEndingBlank",me=!0),Se[1].type="lineEnding",be=_e}else if(!(Se[1].type==="linePrefix"||Se[1].type==="blockQuotePrefix"||Se[1].type==="blockQuotePrefixWhitespace"||Se[1].type==="blockQuoteMarker"||Se[1].type==="listItemIndent"))break}$e&&(!be||$e<be)&&(ze._spread=!0),ze.end=Object.assign({},be?y[be][1].start:se[1].end),y.splice(be||H,0,["exit",ze,se[2]]),H++,F++}if(se[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},se[1].start),end:void 0};ze=_e,y.splice(H,0,["enter",_e,se[2]]),H++,F++,$e=void 0,qe=!0}}}return y[I][1]._spread=me,F}function o(y,I){return F;function F(H){a.call(this,y(H),H),I&&I.call(this,H)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(y,I,F){this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([I,F||void 0]),y.position={start:Te(I.start),end:void 0}}function s(y){return I;function I(F){y&&y.call(this,F),u.call(this,F)}}function u(y,I){const F=this.stack.pop(),H=this.tokenStack.pop();if(H)H[0].type!==y.type&&(I?I.call(this,y,H[0]):(H[1]||Jn).call(this,y,H[0]));else throw new Error("Cannot close `"+y.type+"` ("+Ze({start:y.start,end:y.end})+"): it’s not open");F.position.end=Te(y.end)}function f(){return kn(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(y){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const y=this.resume(),I=this.stack[this.stack.length-1];I.lang=y}function g(){const y=this.resume(),I=this.stack[this.stack.length-1];I.meta=y}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y.replace(/(\r?\n|\r)$/g,"")}function E(y){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(y)).toLowerCase()}function v(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function R(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function D(y){const I=this.stack[this.stack.length-1];if(!I.depth){const F=this.sliceSerialize(y).length;I.depth=F}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function N(y){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(y).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function O(y){const F=this.stack[this.stack.length-1].children;let H=F[F.length-1];(!H||H.type!=="text")&&(H=Z(),H.position={start:Te(y.start),end:void 0},F.push(H)),this.stack.push(H)}function k(y){const I=this.stack.pop();I.value+=this.sliceSerialize(y),I.position.end=Te(y.end)}function P(y){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=I.children[I.children.length-1];F.position.end=Te(y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(O.call(this,y),k.call(this,y))}function A(){this.data.atHardBreak=!0}function U(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function z(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function L(){const y=this.resume(),I=this.stack[this.stack.length-1];I.value=y}function $(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function Q(){const y=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";y.type+="Reference",y.referenceType=I,delete y.url,delete y.title}else delete y.identifier,delete y.label;this.data.referenceType=void 0}function ne(y){const I=this.sliceSerialize(y),F=this.stack[this.stack.length-2];F.label=Pa(I),F.identifier=ge(I).toLowerCase()}function he(){const y=this.stack[this.stack.length-1],I=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const H=y.children;F.children=H}else F.alt=I}function d(){const y=this.resume(),I=this.stack[this.stack.length-1];I.url=y}function te(){const y=this.resume(),I=this.stack[this.stack.length-1];I.title=y}function pe(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function ee(y){const I=this.resume(),F=this.stack[this.stack.length-1];F.label=I,F.identifier=ge(this.sliceSerialize(y)).toLowerCase(),this.data.referenceType="full"}function de(y){this.data.characterReferenceType=y.type}function K(y){const I=this.sliceSerialize(y),F=this.data.characterReferenceType;let H;F?(H=Or(I,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):H=yn(I);const Y=this.stack[this.stack.length-1];Y.value+=H}function Ae(y){const I=this.stack.pop();I.position.end=Te(y.end)}function xe(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(y)}function Ce(y){k.call(this,y);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(y)}function Ee(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function Tt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function we(){return{type:"heading",depth:0,children:[]}}function Le(){return{type:"break"}}function ot(){return{type:"html",value:""}}function At(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function Re(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[]}}function zt(y){return{type:"listItem",spread:y._spread,checked:null,children:[]}}function st(){return{type:"paragraph",children:[]}}function ut(){return{type:"strong",children:[]}}function Z(){return{type:"text",value:""}}function Ne(){return{type:"thematicBreak"}}}function Te(e){return{line:e.line,column:e.column,offset:e.offset}}function Gr(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Gr(e,r):Da(e,r)}}function Da(e,t){let n;for(n in t)if(Xr.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Jn(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ze({start:t.start,end:t.end})+") is still open")}function Fa(e){const t=this;t.parser=n;function n(r){return za(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ra(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Na(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
5
5
  `}]}function _a(e,t){const n=t.value?t.value+`
6
6
  `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Oa(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ja(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ba(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=We(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function Va(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ua(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Qr(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.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 Ha(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qr(e,t);const i={src:We(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Wa(e,t){const n={src:We(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function $a(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qa(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Qr(e,t);const i={href:We(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ya(e,t){const n={href:We(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Xa(e,t,n){const r=e.all(t),i=n?Ga(n):Zr(t),o={},l=[];if(typeof t.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:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
7
7
  `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
8
- `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Ga(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Zr(n[r])}return t}function Zr(e){const t=e.spread;return t??e.children.length>1}function Qa(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.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")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Za(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ja(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ka(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function es(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=dn(t.children[1]),s=Ar(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ts(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ns(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Kn=9,er=32;function rs(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(tr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(tr(t.slice(i),i>0,!1)),o.join("")}function tr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Kn||o===er;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Kn||o===er;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function is(e,t){const n={type:"text",value:rs(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ls(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const os={blockquote:Fa,break:Na,code:_a,delete:Oa,emphasis:ja,footnoteReference:Ba,heading:Va,html:Ua,imageReference:Ha,image:Wa,inlineCode:$a,linkReference:qa,link:Ya,listItem:Xa,list:Qa,paragraph:Za,root:Ja,strong:Ka,table:es,tableCell:ns,tableRow:ts,text:is,thematicBreak:ls,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const Jr=-1,St=0,Ke=1,xt=2,bn=3,Sn=4,vn=5,Cn=6,Kr=7,ei=8,nr=typeof self=="object"?self:globalThis,as=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case St:case Jr:return n(l,i);case Ke:{const a=n([],i);for(const s of l)a.push(r(s));return a}case xt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case bn:return n(new Date(l),i);case Sn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case vn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case Cn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case Kr:{const{name:a,message:s}=l;return n(new nr[a](s),i)}case ei:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new nr[o](l),i)};return r},rr=e=>as(new Map,e)(0),je="",{toString:ss}={},{keys:us}=Object,Qe=e=>{const t=typeof e;if(t!=="object"||!e)return[St,t];const n=ss.call(e).slice(8,-1);switch(n){case"Array":return[Ke,je];case"Object":return[xt,je];case"Date":return[bn,je];case"RegExp":return[Sn,je];case"Map":return[vn,je];case"Set":return[Cn,je];case"DataView":return[Ke,n]}return n.includes("Array")?[Ke,n]:n.includes("Error")?[Kr,n]:[xt,n]},ft=([e,t])=>e===St&&(t==="function"||t==="symbol"),cs=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Qe(l);switch(a){case St:{let f=l;switch(s){case"bigint":a=ei,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([Jr],l)}return i([a,f],l)}case Ke:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(l)),i([s,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case xt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of us(l))(e||!ft(Qe(l[p])))&&f.push([o(p),o(l[p])]);return c}case bn:return i([a,l.toISOString()],l);case Sn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case vn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(ft(Qe(p))||ft(Qe(h))))&&f.push([o(p),o(h)]);return c}case Cn:{const f=[],c=i([a,f],l);for(const p of l)(e||!ft(Qe(p)))&&f.push(o(p));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},ir=(e,{json:t,lossy:n}={})=>{const r=[];return cs(!(t||n),!!t,new Map,r)(e),r},kt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rr(ir(e,t)):structuredClone(e):(e,t)=>rr(ir(e,t));function fs(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ps(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fs,r=e.options.footnoteBackLabel||hs,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=We(c.toLowerCase());let h=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++h<=b;){g.length>0&&g.push({type:"text",value:" "});let E=typeof n=="string"?n:n(s,h);typeof E=="string"&&(E={type:"text",value:E}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),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(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...kt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
8
+ `});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,u),e.applyData(t,u)}function Ga(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Zr(n[r])}return t}function Zr(e){const t=e.spread;return t??e.children.length>1}function Qa(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.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")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Za(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ja(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ka(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function es(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=dn(t.children[1]),s=Ar(t.children[t.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ts(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<a;){const c=t.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let g={type:"element",tagName:o,properties:p,children:[]};c&&(g.children=e.all(c),e.patch(c,g),g=e.applyData(c,g)),u.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function ns(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Kn=9,er=32;function rs(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(tr(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(tr(t.slice(i),i>0,!1)),o.join("")}function tr(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Kn||o===er;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Kn||o===er;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function is(e,t){const n={type:"text",value:rs(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ls(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const os={blockquote:Ra,break:Na,code:_a,delete:Oa,emphasis:ja,footnoteReference:Ba,heading:Va,html:Ua,imageReference:Ha,image:Wa,inlineCode:$a,linkReference:qa,link:Ya,listItem:Xa,list:Qa,paragraph:Za,root:Ja,strong:Ka,table:es,tableCell:ns,tableRow:ts,text:is,thematicBreak:ls,toml:ct,yaml:ct,definition:ct,footnoteDefinition:ct};function ct(){}const Jr=-1,St=0,Ke=1,xt=2,bn=3,Sn=4,vn=5,Cn=6,Kr=7,ei=8,nr=typeof self=="object"?self:globalThis,as=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case St:case Jr:return n(l,i);case Ke:{const a=n([],i);for(const s of l)a.push(r(s));return a}case xt:{const a=n({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case bn:return n(new Date(l),i);case Sn:{const{source:a,flags:s}=l;return n(new RegExp(a,s),i)}case vn:{const a=n(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case Cn:{const a=n(new Set,i);for(const s of l)a.add(r(s));return a}case Kr:{const{name:a,message:s}=l;return n(new nr[a](s),i)}case ei:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new nr[o](l),i)};return r},rr=e=>as(new Map,e)(0),je="",{toString:ss}={},{keys:us}=Object,Qe=e=>{const t=typeof e;if(t!=="object"||!e)return[St,t];const n=ss.call(e).slice(8,-1);switch(n){case"Array":return[Ke,je];case"Object":return[xt,je];case"Date":return[bn,je];case"RegExp":return[Sn,je];case"Map":return[vn,je];case"Set":return[Cn,je];case"DataView":return[Ke,n]}return n.includes("Array")?[Ke,n]:n.includes("Error")?[Kr,n]:[xt,n]},ft=([e,t])=>e===St&&(t==="function"||t==="symbol"),cs=(e,t,n,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return n.set(a,s),s},o=l=>{if(n.has(l))return n.get(l);let[a,s]=Qe(l);switch(a){case St:{let f=l;switch(s){case"bigint":a=ei,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([Jr],l)}return i([a,f],l)}case Ke:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(l)),i([s,[...p]],l)}const f=[],c=i([a,f],l);for(const p of l)f.push(o(p));return c}case xt:{if(s)switch(s){case"BigInt":return i([s,l.toString()],l);case"Boolean":case"Number":case"String":return i([s,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const f=[],c=i([a,f],l);for(const p of us(l))(e||!ft(Qe(l[p])))&&f.push([o(p),o(l[p])]);return c}case bn:return i([a,l.toISOString()],l);case Sn:{const{source:f,flags:c}=l;return i([a,{source:f,flags:c}],l)}case vn:{const f=[],c=i([a,f],l);for(const[p,h]of l)(e||!(ft(Qe(p))||ft(Qe(h))))&&f.push([o(p),o(h)]);return c}case Cn:{const f=[],c=i([a,f],l);for(const p of l)(e||!ft(Qe(p)))&&f.push(o(p));return c}}const{message:u}=l;return i([a,{name:s,message:u}],l)};return o},ir=(e,{json:t,lossy:n}={})=>{const r=[];return cs(!(t||n),!!t,new Map,r)(e),r},kt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rr(ir(e,t)):structuredClone(e):(e,t)=>rr(ir(e,t));function fs(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function hs(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ps(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||fs,r=e.options.footnoteBackLabel||hs,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),p=We(c.toLowerCase());let h=0;const g=[],b=e.footnoteCounts.get(c);for(;b!==void 0&&++h<=b;){g.length>0&&g.push({type:"text",value:" "});let E=typeof n=="string"?n:n(s,h);typeof E=="string"&&(E={type:"text",value:E}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),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(...g)}else f.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,x),a.push(x)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...kt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
9
9
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
10
10
  `}]}}const vt=(function(e){if(e==null)return xs;if(typeof e=="function")return Ct(e);if(typeof e=="object")return Array.isArray(e)?ds(e):ms(e);if(typeof e=="string")return gs(e);throw new Error("Expected function, string, or object as test")});function ds(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vt(e[n]);return Ct(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function ms(e){const t=e;return Ct(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function gs(e){return Ct(t);function t(n){return n&&n.type===e}}function Ct(e){return t;function t(n,r,i){return!!(ks(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function xs(){return!0}function ks(e){return e!==null&&typeof e=="object"&&"type"in e}const ti=[],ys=!0,ln=!1,ws="skip";function ni(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=vt(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=ti,g,b,S;if((!t||o(s,u,f[f.length-1]||void 0))&&(h=bs(n(s,f)),h[0]===ln))return h;if("children"in s&&s.children){const x=s;if(x.children&&h[0]!==ws)for(b=(r?x.children.length:-1)+l,S=f.concat(x);b>-1&&b<x.children.length;){const E=x.children[b];if(g=a(E,b,S)(),g[0]===ln)return g;b=typeof g[1]=="number"?g[1]:b+l}}return h}}}function bs(e){return Array.isArray(e)?e:typeof e=="number"?[ys,e]:e==null?ti:[e]}function En(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),ni(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const on={}.hasOwnProperty,Ss={};function vs(e,t){const n=t||Ss,r=new Map,i=new Map,o=new Map,l={...os,...n.handlers},a={all:u,applyData:Es,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:n,patch:Cs,wrap:Ls};return En(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function s(f,c){const p=f.type,h=a.handlers[p];if(on.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:b,...S}=f,x=kt(S);return x.children=a.all(f),x}return kt(f)}return(a.options.unknownHandler||Is)(a,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const g=a.one(p[h],f);if(g){if(h&&p[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=lr(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=lr(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function Cs(e,t){e.position&&(t.position=fl(e))}function Es(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,kt(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Is(e,t){const n=t.data||{},r="value"in t&&!(on.call(n,"hProperties")||on.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ls(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
11
11
  `});++r<e.length;)r&&n.push({type:"text",value:`
12
12
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
13
13
  `}),n}function lr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function or(e,t){const n=vs(e,t),r=n.one(e,void 0),i=ps(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
14
- `},i),o}function Ts(e,t){return e&&"run"in e?async function(n,r){const i=or(n,{file:r,...t});await e.run(i,r)}:function(n,r){return or(n,{file:r,...e||t})}}function ar(e){if(e)throw e}var Ot,sr;function Ps(){if(sr)return Ot;sr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.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 p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=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 s(){var u,f,c,p,h,g,b=arguments[0],S=1,x=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<x;++S)if(u=arguments[S],u!=null)for(f in u)c=a(b,f),p=a(u,f),b!==p&&(E&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(b,{name:f,newValue:s(E,g,p)})):typeof p<"u"&&l(b,{name:f,newValue:p}));return b},Ot}var As=Ps();const jt=Sr(As);function an(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zs(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Ms(f,a)(...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),t}}function Ms(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const ke={basename:Ds,dirname:Rs,extname:Fs,join:Ns,sep:"/"};function Ds(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');lt(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Rs(e){if(lt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Fs(e){lt(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ns(...e){let t=-1,n;for(;++t<e.length;)lt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":_s(n)}function _s(e){lt(e);const t=e.codePointAt(0)===47;let n=Os(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Os(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function lt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const js={cwd:Bs};function Bs(){return"/"}function sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Vs(e){if(typeof e=="string")e=new URL(e);else if(!sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Us(e)}function Us(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+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(t)}const Bt=["history","path","basename","stem","extname","dirname"];class ri{constructor(t){let n;t?sn(t)?n={path:t}:typeof t=="string"||Hs(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":js.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bt.length;){const o=Bt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Bt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(t){Ut(t,"basename"),Vt(t,"basename"),this.path=ke.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(t){ur(this.basename,"dirname"),this.path=ke.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(t){if(Vt(t,"extname"),ur(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sn(t)&&(t=Vs(t)),Ut(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(t){Ut(t,"stem"),Vt(t,"stem"),this.path=ke.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ie(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vt(e,t){if(e&&e.includes(ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ke.sep+"`")}function Ut(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ur(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ws=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),$s={}.hasOwnProperty;class In extends Ws{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=zs()}copy(){const t=new In;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(jt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($t("data",this.frozen),this.namespace[t]=n,this):$s.call(this.namespace,t)&&this.namespace[t]||void 0:t?($t("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ht(t),r=this.parser||this.Parser;return Ht("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ht("process",this.parser||this.Parser),Wt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=ht(t),s=r.parse(a);r.run(s,a,function(f,c,p){if(f||!c||!p)return u(f);const h=c,g=r.stringify(h,p);Xs(g)?p.value=g:p.result=g,u(f,p)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ht("processSync",this.parser||this.Parser),Wt("processSync",this.compiler||this.Compiler),this.process(t,i),fr("processSync","process",n),r;function i(o,l){n=!0,ar(o),r=l}}run(t,n,r){cr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ht(n);i.run(t,s,u);function u(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),fr("runSync","run",r),i;function o(l,a){ar(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=ht(n),i=this.compiler||this.Compiler;return Wt("stringify",i),cr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($t("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(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");a(u.plugins),u.settings&&(i.settings=jt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...g]=f;const b=r[p][1];an(b)&&an(h)&&(h=jt(!0,b,h)),r[p]=[u,h,...g]}}}}const qs=new In().freeze();function Ht(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $t(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cr(e){if(!an(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ht(e){return Ys(e)?e:new ri(e)}function Ys(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xs(e){return typeof e=="string"||Gs(e)}function Gs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qs="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hr=[],pr={allowDangerousHtml:!0},Zs=/^(https?|ircs?|mailto|xmpp)$/i,Js=[{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 Ks(e){const t=eu(e),n=tu(e);return nu(t.runSync(t.parse(n),n),e)}function eu(e){const t=e.rehypePlugins||hr,n=e.remarkPlugins||hr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pr}:pr;return qs().use(Ra).use(n).use(Ts,r).use(t)}function tu(e){const t=e.children||"",n=new ri;return typeof t=="string"&&(n.value=t),n}function nu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||ru;for(const f of Js)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Qs+f.id,void 0);return En(e,u),gl(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in Ft)if(Object.hasOwn(Ft,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],b=Ft[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=s(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function ru(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Zs.test(e.slice(0,t))?e:""}function dr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function iu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lu(e,t,n){const i=vt((n||{}).ignore||[]),o=ou(t);let l=-1;for(;++l<o.length;)ni(e,"text",a);function a(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return s(u,f)}function s(u,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const S=c.children.indexOf(u);let x=!1,E=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const F=v.index,D={index:v.index,input:v.input,stack:[...f,u]};let w=h(...v,D);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?p.lastIndex=F+1:(g!==F&&E.push({type:"text",value:u.value.slice(g,F)}),Array.isArray(w)?E.push(...w):w&&E.push(w),g=F+v[0].length,x=!0),!p.global)break;v=p.exec(u.value)}return x?(g<u.value.length&&E.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function ou(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([au(i[0]),su(i[1])])}return t}function au(e){return typeof e=="string"?new RegExp(iu(e),"g"):e}function su(e){return typeof e=="function"?e:function(){return e}}const qt="phrasing",Yt=["autolink","link","image","label"];function uu(){return{transforms:[gu],enter:{literalAutolink:fu,literalAutolinkEmail:Xt,literalAutolinkHttp:Xt,literalAutolinkWww:Xt},exit:{literalAutolink:mu,literalAutolinkEmail:du,literalAutolinkHttp:hu,literalAutolinkWww:pu}}}function cu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:qt,notInConstruct:Yt}]}}function fu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xt(e){this.config.enter.autolinkProtocol.call(this,e)}function hu(e){this.config.exit.autolinkProtocol.call(this,e)}function pu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function du(e){this.config.exit.autolinkEmail.call(this,e)}function mu(e){this.exit(e)}function gu(e){lu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ku]],{ignore:["link","linkReference"]})}function xu(e,t,n,r,i){let o="";if(!ii(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!yu(n)))return!1;const l=wu(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ku(e,t,n,r){return!ii(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yu(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wu(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=dr(e,"(");let o=dr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ii(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||De(n)||wt(n))&&(!t||n!==47)}li.peek=Pu;function bu(){this.buffer()}function Su(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vu(){this.buffer()}function Cu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Eu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Iu(e){this.exit(e)}function Lu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tu(e){this.exit(e)}function Pu(){return"["}function li(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Au(){return{enter:{gfmFootnoteCallString:bu,gfmFootnoteCall:Su,gfmFootnoteDefinitionLabelString:vu,gfmFootnoteDefinition:Cu},exit:{gfmFootnoteCallString:Eu,gfmFootnoteCall:Iu,gfmFootnoteDefinitionLabelString:Lu,gfmFootnoteDefinition:Tu}}}function zu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:li},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
15
- `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?oi:Mu))),u(),s}}function Mu(e,t,n){return t===0?e:oi(e,t,n)}function oi(e,t,n){return(n?"":" ")+e}const Du=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ai.peek=Ou;function Ru(){return{canContainEols:["delete"],enter:{strikethrough:Nu},exit:{strikethrough:_u}}}function Fu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Du}],handlers:{delete:ai}}}function Nu(e){this.enter({type:"delete",children:[]},e)}function _u(e){this.exit(e)}function ai(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Ou(){return"~"}function ju(e){return e.length}function Bu(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ju,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],S=[];let x=-1;for(e[f].length>u&&(u=e[f].length);++x<e[f].length;){const E=Vu(e[f][x]);if(n.alignDelimiters!==!1){const v=i(E);S[x]=v,(s[x]===void 0||v>s[x])&&(s[x]=v)}b.push(E)}l[f]=b,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=mr(r[c]);else{const b=mr(r);for(;++c<u;)o[c]=b}c=-1;const p=[],h=[];for(;++c<u;){const b=o[c];let S="",x="";b===99?(S=":",x=":"):b===108?S=":":b===114&&(x=":");let E=n.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-x.length);const v=S+"-".repeat(E)+x;n.alignDelimiters!==!1&&(E=S.length+E+x.length,E>s[c]&&(s[c]=E),h[c]=E),p[c]=v}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const b=l[f],S=a[f];c=-1;const x=[];for(;++c<u;){const E=b[c]||"";let v="",F="";if(n.alignDelimiters!==!1){const D=s[c]-(S[c]||0),w=o[c];w===114?v=" ".repeat(D):w===99?D%2?(v=" ".repeat(D/2+.5),F=" ".repeat(D/2-.5)):(v=" ".repeat(D/2),F=v):F=" ".repeat(D)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(E),n.alignDelimiters!==!1&&x.push(F),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
14
+ `},i),o}function Ts(e,t){return e&&"run"in e?async function(n,r){const i=or(n,{file:r,...t});await e.run(i,r)}:function(n,r){return or(n,{file:r,...e||t})}}function ar(e){if(e)throw e}var Ot,sr;function Ps(){if(sr)return Ot;sr=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},o=function(u){if(!u||t.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 p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=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 s(){var u,f,c,p,h,g,b=arguments[0],S=1,x=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},S=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});S<x;++S)if(u=arguments[S],u!=null)for(f in u)c=a(b,f),p=a(u,f),b!==p&&(E&&p&&(o(p)||(h=i(p)))?(h?(h=!1,g=c&&i(c)?c:[]):g=c&&o(c)?c:{},l(b,{name:f,newValue:s(E,g,p)})):typeof p<"u"&&l(b,{name:f,newValue:p}));return b},Ot}var As=Ps();const jt=Sr(As);function an(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zs(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Ms(f,a)(...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),t}}function Ms(e,t){let n;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){n||(n=!0,t(l,...a))}function o(l){i(null,l)}}const ke={basename:Ds,dirname:Fs,extname:Rs,join:Ns,sep:"/"};function Ds(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');lt(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Fs(e){if(lt(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Rs(e){lt(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Ns(...e){let t=-1,n;for(;++t<e.length;)lt(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":_s(n)}function _s(e){lt(e);const t=e.codePointAt(0)===47;let n=Os(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Os(e,t){let n="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return n}function lt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const js={cwd:Bs};function Bs(){return"/"}function sn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Vs(e){if(typeof e=="string")e=new URL(e);else if(!sn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Us(e)}function Us(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 t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+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(t)}const Bt=["history","path","basename","stem","extname","dirname"];class ri{constructor(t){let n;t?sn(t)?n={path:t}:typeof t=="string"||Hs(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":js.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Bt.length;){const o=Bt[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Bt.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ke.basename(this.path):void 0}set basename(t){Ut(t,"basename"),Vt(t,"basename"),this.path=ke.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ke.dirname(this.path):void 0}set dirname(t){ur(this.basename,"dirname"),this.path=ke.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ke.extname(this.path):void 0}set extname(t){if(Vt(t,"extname"),ur(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ke.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sn(t)&&(t=Vs(t)),Ut(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ke.basename(this.path,this.extname):void 0}set stem(t){Ut(t,"stem"),Vt(t,"stem"),this.path=ke.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ie(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vt(e,t){if(e&&e.includes(ke.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ke.sep+"`")}function Ut(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ur(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Hs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ws=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),$s={}.hasOwnProperty;class In extends Ws{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=zs()}copy(){const t=new In;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(jt(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($t("data",this.frozen),this.namespace[t]=n,this):$s.call(this.namespace,t)&&this.namespace[t]||void 0:t?($t("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ht(t),r=this.parser||this.Parser;return Ht("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ht("process",this.parser||this.Parser),Wt("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const a=ht(t),s=r.parse(a);r.run(s,a,function(f,c,p){if(f||!c||!p)return u(f);const h=c,g=r.stringify(h,p);Xs(g)?p.value=g:p.result=g,u(f,p)});function u(f,c){f||!c?l(f):o?o(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ht("processSync",this.parser||this.Parser),Wt("processSync",this.compiler||this.Compiler),this.process(t,i),fr("processSync","process",n),r;function i(o,l){n=!0,ar(o),r=l}}run(t,n,r){cr(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const s=ht(n);i.run(t,s,u);function u(f,c,p){const h=c||t;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),fr("runSync","run",r),i;function o(l,a){ar(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=ht(n),i=this.compiler||this.Compiler;return Wt("stringify",i),cr(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($t("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...c]=u;s(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");a(u.plugins),u.settings&&(i.settings=jt(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];o(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,p=-1;for(;++c<r.length;)if(r[c][0]===u){p=c;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[h,...g]=f;const b=r[p][1];an(b)&&an(h)&&(h=jt(!0,b,h)),r[p]=[u,h,...g]}}}}const qs=new In().freeze();function Ht(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wt(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $t(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cr(e){if(!an(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ht(e){return Ys(e)?e:new ri(e)}function Ys(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xs(e){return typeof e=="string"||Gs(e)}function Gs(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qs="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hr=[],pr={allowDangerousHtml:!0},Zs=/^(https?|ircs?|mailto|xmpp)$/i,Js=[{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 Ks(e){const t=eu(e),n=tu(e);return nu(t.runSync(t.parse(n),n),e)}function eu(e){const t=e.rehypePlugins||hr,n=e.remarkPlugins||hr,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pr}:pr;return qs().use(Fa).use(n).use(Ts,r).use(t)}function tu(e){const t=e.children||"",n=new ri;return typeof t=="string"&&(n.value=t),n}function nu(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||ru;for(const f of Js)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Qs+f.id,void 0);return En(e,u),gl(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function u(f,c,p){if(f.type==="raw"&&p&&typeof c=="number")return l?p.children.splice(c,1):p.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let h;for(h in Rt)if(Object.hasOwn(Rt,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],b=Rt[h];(b===null||b.includes(f.tagName))&&(f.properties[h]=s(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof c=="number"&&(h=!r(f,c,p)),h&&p&&typeof c=="number")return a&&f.children?p.children.splice(c,1,...f.children):p.children.splice(c,1),c}}}function ru(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Zs.test(e.slice(0,t))?e:""}function dr(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function iu(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function lu(e,t,n){const i=vt((n||{}).ignore||[]),o=ou(t);let l=-1;for(;++l<o.length;)ni(e,"text",a);function a(u,f){let c=-1,p;for(;++c<f.length;){const h=f[c],g=p?p.children:void 0;if(i(h,g?g.indexOf(h):void 0,p))return;p=h}if(p)return s(u,f)}function s(u,f){const c=f[f.length-1],p=o[l][0],h=o[l][1];let g=0;const S=c.children.indexOf(u);let x=!1,E=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const R=v.index,D={index:v.index,input:v.input,stack:[...f,u]};let w=h(...v,D);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?p.lastIndex=R+1:(g!==R&&E.push({type:"text",value:u.value.slice(g,R)}),Array.isArray(w)?E.push(...w):w&&E.push(w),g=R+v[0].length,x=!0),!p.global)break;v=p.exec(u.value)}return x?(g<u.value.length&&E.push({type:"text",value:u.value.slice(g)}),c.children.splice(S,1,...E)):E=[u],S+E.length}}function ou(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([au(i[0]),su(i[1])])}return t}function au(e){return typeof e=="string"?new RegExp(iu(e),"g"):e}function su(e){return typeof e=="function"?e:function(){return e}}const qt="phrasing",Yt=["autolink","link","image","label"];function uu(){return{transforms:[gu],enter:{literalAutolink:fu,literalAutolinkEmail:Xt,literalAutolinkHttp:Xt,literalAutolinkWww:Xt},exit:{literalAutolink:mu,literalAutolinkEmail:du,literalAutolinkHttp:hu,literalAutolinkWww:pu}}}function cu(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qt,notInConstruct:Yt},{character:":",before:"[ps]",after:"\\/",inConstruct:qt,notInConstruct:Yt}]}}function fu(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xt(e){this.config.enter.autolinkProtocol.call(this,e)}function hu(e){this.config.exit.autolinkProtocol.call(this,e)}function pu(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function du(e){this.config.exit.autolinkEmail.call(this,e)}function mu(e){this.exit(e)}function gu(e){lu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xu],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ku]],{ignore:["link","linkReference"]})}function xu(e,t,n,r,i){let o="";if(!ii(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!yu(n)))return!1;const l=wu(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function ku(e,t,n,r){return!ii(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yu(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wu(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=dr(e,"(");let o=dr(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ii(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||De(n)||wt(n))&&(!t||n!==47)}li.peek=Pu;function bu(){this.buffer()}function Su(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vu(){this.buffer()}function Cu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Eu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Iu(e){this.exit(e)}function Lu(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ge(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tu(e){this.exit(e)}function Pu(){return"["}function li(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function Au(){return{enter:{gfmFootnoteCallString:bu,gfmFootnoteCall:Su,gfmFootnoteDefinitionLabelString:vu,gfmFootnoteDefinition:Cu},exit:{gfmFootnoteCallString:Eu,gfmFootnoteCall:Iu,gfmFootnoteDefinitionLabelString:Lu,gfmFootnoteDefinition:Tu}}}function zu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:li},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const a=o.createTracker(l);let s=a.move("[^");const u=o.enter("footnoteDefinition"),f=o.enter("label");return s+=a.move(o.safe(o.associationId(r),{before:s,after:"]"})),f(),s+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),s+=a.move((t?`
15
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?oi:Mu))),u(),s}}function Mu(e,t,n){return t===0?e:oi(e,t,n)}function oi(e,t,n){return(n?"":" ")+e}const Du=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ai.peek=Ou;function Fu(){return{canContainEols:["delete"],enter:{strikethrough:Nu},exit:{strikethrough:_u}}}function Ru(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Du}],handlers:{delete:ai}}}function Nu(e){this.enter({type:"delete",children:[]},e)}function _u(e){this.exit(e)}function ai(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Ou(){return"~"}function ju(e){return e.length}function Bu(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ju,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const b=[],S=[];let x=-1;for(e[f].length>u&&(u=e[f].length);++x<e[f].length;){const E=Vu(e[f][x]);if(n.alignDelimiters!==!1){const v=i(E);S[x]=v,(s[x]===void 0||v>s[x])&&(s[x]=v)}b.push(E)}l[f]=b,a[f]=S}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=mr(r[c]);else{const b=mr(r);for(;++c<u;)o[c]=b}c=-1;const p=[],h=[];for(;++c<u;){const b=o[c];let S="",x="";b===99?(S=":",x=":"):b===108?S=":":b===114&&(x=":");let E=n.alignDelimiters===!1?1:Math.max(1,s[c]-S.length-x.length);const v=S+"-".repeat(E)+x;n.alignDelimiters!==!1&&(E=S.length+E+x.length,E>s[c]&&(s[c]=E),h[c]=E),p[c]=v}l.splice(1,0,p),a.splice(1,0,h),f=-1;const g=[];for(;++f<l.length;){const b=l[f],S=a[f];c=-1;const x=[];for(;++c<u;){const E=b[c]||"";let v="",R="";if(n.alignDelimiters!==!1){const D=s[c]-(S[c]||0),w=o[c];w===114?v=" ".repeat(D):w===99?D%2?(v=" ".repeat(D/2+.5),R=" ".repeat(D/2-.5)):(v=" ".repeat(D/2),R=v):R=" ".repeat(D)}n.delimiterStart!==!1&&!c&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||c)&&x.push(" "),n.alignDelimiters!==!1&&x.push(v),x.push(E),n.alignDelimiters!==!1&&x.push(R),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&x.push("|")}g.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return g.join(`
16
16
  `)}function Vu(e){return e==null?"":String(e)}function mr(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Uu(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),Hu);return i(),l}function Hu(e,t,n){return">"+(n?"":" ")+e}function Wu(e,t){return gr(e,t.inConstruct,!0)&&!gr(e,t.notInConstruct,!1)}function gr(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function xr(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
17
17
  `&&Wu(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
18
18
  `}function $u(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function qu(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Yu(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Xu(e,t,n,r){const i=Yu(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(qu(e,n)){const c=n.enter("codeIndented"),p=n.indentLines(o,Gu);return c(),p}const a=n.createTracker(r),s=i.repeat(Math.max($u(o,i)+1,3)),u=n.enter("codeFenced");let f=a.move(s);if(e.lang){const c=n.enter(`codeFencedLang${l}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
@@ -26,6 +26,6 @@ import{g as Sr,j as T,b as q,t as j,H as Ri,G as Fi,Y as Ni,A as _i}from"./index
26
26
  `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),s=n.enter("phrasing");o.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
27
27
  `,...o.current()});return/^[\t ]/.test(u)&&(u=nt(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),s(),a(),u}ui.peek=tc;function ui(e){return e.value||""}function tc(){return"<"}ci.peek=nc;function ci(e,t,n,r){const i=Ln(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let u=s.move("![");return u+=s.move(n.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=n.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(n.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function nc(){return"!"}fi.peek=rc;function fi(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const u=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function rc(){return"!"}hi.peek=ic;function hi(e,t,n){let r=e.value||"",i="`",o=-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+" ");++o<n.unsafe.length;){const l=n.unsafe[o],a=n.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function ic(){return"`"}function pi(e,t){const n=kn(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}di.peek=lc;function di(e,t,n,r){const i=Ln(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(pi(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let c=l.move("<");return c+=l.move(n.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),n.stack=f,c}a=n.enter("link"),s=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function lc(e,t,n){return pi(e,n)?"<":"["}mi.peek=oc;function mi(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const u=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=n.stack;n.stack=[],l=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function oc(){return"["}function Tn(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ac(e){const t=Tn(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sc(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function gi(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function uc(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?sc(n):Tn(n);const a=e.ordered?l==="."?")":".":ac(n);let s=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),gi(n)===l&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),u}function cc(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function fc(e,t,n,r){const i=cc(n);let o=n.bulletCurrent||Tn(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),f);return s(),u;function f(c,p,h){return p?(h?"":" ".repeat(l))+c:(h?o:o+" ".repeat(l-o.length))+c}}function hc(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const pc=vt(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function dc(e,t,n,r){return(e.children.some(function(l){return pc(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function mc(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xi.peek=gc;function xi(e,t,n,r){const i=mc(n),o=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let s=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=yt(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=nt(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=yt(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+nt(c));const h=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function gc(e,t,n){return n.options.strong||"*"}function xc(e,t,n,r){return n.safe(e.value,r)}function kc(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yc(e,t,n){const r=(gi(n)+(n.options.ruleSpaces?" ":"")).repeat(kc(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ki={blockquote:Uu,break:xr,code:Xu,definition:Qu,emphasis:si,hardBreak:xr,heading:ec,html:ui,image:ci,imageReference:fi,inlineCode:hi,link:di,linkReference:mi,list:uc,listItem:fc,paragraph:hc,root:dc,strong:xi,text:xc,thematicBreak:yc};function wc(){return{enter:{table:bc,tableData:kr,tableHeader:kr,tableRow:vc},exit:{codeText:Cc,table:Sc,tableData:Gt,tableHeader:Gt,tableRow:Gt}}}function bc(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Sc(e){this.exit(e),this.data.inTable=void 0}function vc(e){this.enter({type:"tableRow",children:[]},e)}function Gt(e){this.exit(e)}function kr(e){this.enter({type:"tableCell",children:[]},e)}function Cc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ec));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ec(e,t){return t==="|"?t:e}function Ic(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
28
28
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,g,b,S){return u(f(h,b,S),h.align)}function a(h,g,b,S){const x=c(h,b,S),E=u([x]);return E.slice(0,E.indexOf(`
29
- `))}function s(h,g,b,S){const x=b.enter("tableCell"),E=b.enter("phrasing"),v=b.containerPhrasing(h,{...S,before:o,after:o});return E(),x(),v}function u(h,g){return Bu(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,b){const S=h.children;let x=-1;const E=[],v=g.enter("table");for(;++x<S.length;)E[x]=c(S[x],g,b);return v(),E}function c(h,g,b){const S=h.children;let x=-1;const E=[],v=g.enter("tableRow");for(;++x<S.length;)E[x]=s(S[x],h,g,b);return v(),E}function p(h,g,b){let S=ki.inlineCode(h,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Lc(){return{exit:{taskListCheckValueChecked:yr,taskListCheckValueUnchecked:yr,paragraph:Pc}}}function Tc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ac}}}function yr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Pc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ac(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=ki.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function zc(){return[uu(),Au(),Ru(),wc(),Lc()]}function Mc(e){return{extensions:[cu(),zu(e),Fu(),Ic(e),Tc()]}}const Dc={tokenize:jc,partial:!0},yi={tokenize:Bc,partial:!0},wi={tokenize:Vc,partial:!0},bi={tokenize:Uc,partial:!0},Rc={tokenize:Hc,partial:!0},Si={name:"wwwAutolink",tokenize:_c,previous:Ci},vi={name:"protocolAutolink",tokenize:Oc,previous:Ei},ve={name:"emailAutolink",tokenize:Nc,previous:Ii},ye={};function Fc(){return{text:ye}}let Me=48;for(;Me<123;)ye[Me]=ve,Me++,Me===58?Me=65:Me===91&&(Me=97);ye[43]=ve;ye[45]=ve;ye[46]=ve;ye[95]=ve;ye[72]=[ve,vi];ye[104]=[ve,vi];ye[87]=[ve,Si];ye[119]=[ve,Si];function Nc(e,t,n){const r=this;let i,o;return l;function l(c){return!un(c)||!Ii.call(r,r.previous)||Pn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return un(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(Rc,f,u)(c):c===45||c===95||re(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&le(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function _c(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ci.call(r,r.previous)||Pn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Dc,e.attempt(yi,e.attempt(wi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Oc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ei.call(r,r.previous)&&!Pn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(le(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||gt(c)||X(c)||De(c)||wt(c)?n(c):e.attempt(yi,e.attempt(wi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function jc(e,t,n){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),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Bc(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(bi,s,a)(u):u===null||X(u)||De(u)||u!==45&&wt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Vc(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(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(bi,t,o)(l):l===null||X(l)||De(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Uc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||X(a)||De(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||X(a)||De(a)?t(a):r(a)}function o(a){return le(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):le(a)?(e.consume(a),l):n(a)}}function Hc(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return re(o)?n(o):t(o)}}function Ci(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function Ei(e){return!le(e)}function Ii(e){return!(e===47||un(e))}function un(e){return e===43||e===45||e===46||e===95||re(e)}function Pn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Wc={tokenize:Jc,partial:!0};function $c(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gc,continuation:{tokenize:Qc},exit:Zc}},text:{91:{name:"gfmFootnoteCall",tokenize:Xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qc,resolveTo:Yc}}}}function qc(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=ge(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Yc(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Xc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||X(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return X(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Gc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||X(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=ge(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return X(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),W(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function Qc(e,t,n){return e.check(it,t,e.attempt(Wc,t,n))}function Zc(e){e.exit("gfmFootnoteDefinition")}function Jc(e,t,n){const r=this;return W(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Kc(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ce(p,p.length,0,bt(h,l.slice(u+1,s),a)),ce(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ce(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const b=Ue(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=Ue(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class ef{constructor(){this.map=[]}add(t,n,r){tf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function tf(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function nf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function rf(){return{flow:{null:{name:"table",tokenize:lf,resolveAll:of}}}}function lf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(k){let P=r.events.length-1;for(;P>-1;){const z=r.events[P][1].type;if(z==="lineEnding"||z==="linePrefix")P--;else break}const A=P>-1?r.events[P][1].type:null,U=A==="tableHead"||A==="tableRow"?w:s;return U===w&&r.parser.lazy[r.now().line]?n(k):U(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):M(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):B(k)?W(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||X(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,B(k)?W(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?S(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):D(k)}function b(k){return B(k)?W(e,S,"whitespace")(k):S(k)}function S(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||M(k)?F(k):D(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),E(k)):D(k)}function E(k){return k===45?(e.consume(k),E):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(k))}function v(k){return B(k)?W(e,F,"whitespace")(k):F(k)}function F(k){return k===124?g(k):k===null||M(k)?!l||i!==o?D(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):D(k)}function D(k){return n(k)}function w(k){return e.enter("tableRow"),N(k)}function N(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),N):k===null||M(k)?(e.exit("tableRow"),t(k)):B(k)?W(e,N,"whitespace")(k):(e.enter("data"),V(k))}function V(k){return k===null||k===124||X(k)?(e.exit("data"),N(k)):(e.consume(k),k===92?O:V)}function O(k){return k===92||k===124?(e.consume(k),V):V(k)}}function of(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new ef;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(wr(p,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=pt(p,t,o,i,n,c)):l[1]!==0&&(c=pt(p,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&wr(p,t,s,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=nf(t.events,n))}return e}function pt(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function wr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const af={name:"tasklistCheck",tokenize:uf};function sf(){return{text:{91:af}}}function uf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return X(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return M(s)?t(s):B(s)?e.check({tokenize:cf},t,n)(s):n(s)}}function cf(e,t,n){return W(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ff(e){return _r([Fc(),$c(),Kc(e),rf(),sf()])}const hf={};function pf(e){const t=this,n=e||hf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ff(n)),o.push(zc()),l.push(Mc(n))}const mt="allow-forms allow-modals allow-scripts",df=`${mt} allow-same-origin`,mf=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","readonly","return","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),gf=new Set(["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"]),xf=new Set(["case","do","done","elif","else","esac","export","fi","for","function","if","in","local","readonly","return","then","until","while"]),kf=new Set(["add","alter","and","as","asc","between","by","create","delete","desc","drop","from","group","having","insert","into","join","left","like","limit","not","null","offset","on","or","order","right","select","set","table","union","update","values","where"]),yf=new Set(["add","arg","cmd","copy","entrypoint","env","expose","from","healthcheck","label","maintainer","onbuild","run","shell","stopsignal","user","volume","workdir","as"]),wf=new Set(["trace","debug","info","warn","warning","error","fatal"]);function uh({workspaceId:e,filePath:t,open:n,onClose:r,onSaved:i,diffContent:o}){var st,ut;const[l,a]=q.useState(null),[s,u]=q.useState(""),[f,c]=q.useState(!1),[p,h]=q.useState(!1),[g,b]=q.useState("preview"),[S,x]=q.useState("regular"),[E,v]=q.useState(0),[F,D]=q.useState("fit"),[w,N]=q.useState(1),[V,O]=q.useState(1),[k,P]=q.useState(110),[A,U]=q.useState(!0),{showToast:z}=ji(),L=Bi(),$=q.useRef(r),Q=q.useRef(z),ne=q.useMemo(()=>zn(t),[t]),he=q.useMemo(()=>nh(o),[o]),d=(l==null?void 0:l.kind)??null,te=!!((st=l==null?void 0:l.capabilities)!=null&&st.canEdit),pe=!!((ut=l==null?void 0:l.capabilities)!=null&&ut.canRefresh),m=Ef(d,ne),ee=q.useMemo(()=>If(l,L.isDesktop),[L.isDesktop,l]),de=q.useMemo(()=>Lf(l,L.isDesktop),[L.isDesktop,l]),K=q.useMemo(()=>fn(ee,E),[ee,E]),Ae=q.useMemo(()=>Pf(ee,E,V,k,A),[ee,E,V,k,A]),xe=q.useMemo(()=>fn(ee,E),[ee,E]),Ce=(l==null?void 0:l.content)??"",Ee=q.useDeferredValue(s),Ie=te&&s!==Ce,Lt=Pi(d),Tt=cn(d),Pt=Sf(d,ne);if(q.useEffect(()=>{$.current=r},[r]),q.useEffect(()=>{Q.current=z},[z]),q.useEffect(()=>{if(!n){a(null),u(""),c(!1),h(!1),b(Li(t,null)),Ti({setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),x("regular");return}if(!e||!t)return;const Z=e,Ne=t;let y=!1;async function I(){c(!0);try{const R=await Mt(Z,Ne);y||Qt(R,Ne,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U})}catch(R){y||(Q.current({title:Zt(R,j("conversation.filePanelOpenFailed")),tone:"error"}),$.current())}finally{y||c(!1)}}return I(),()=>{y=!0}},[t,n,e]),!n||!t)return null;const we=t,Le=e;async function ot(){if(!(!Le||!(l!=null&&l.version)||!te)){h(!0);try{await Vi(Le,we,s,l.version);const Z=await Mt(Le,we);Qt(Z,we,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),await i(we),z({title:j("conversation.filePanelSaveSuccess"),tone:"success"})}catch(Z){z({title:Zt(Z,j("conversation.filePanelSaveFailed")),tone:"error"})}finally{h(!1)}}}async function At(){if(!(!Le||!pe||Ie)){c(!0);try{const Z=await Mt(Le,we);Qt(Z,we,{preserveMode:!0,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),v(Ne=>Ne+1)}catch(Z){z({title:Zt(Z,j("conversation.fileViewerRefreshFailed")),tone:"error"})}finally{c(!1)}}}async function at(){if(!de)return;const Z=await L.bridge.openExternal(de);Z.ok||z({title:Z.detail??j("conversation.fileViewerOpenExternalFailed"),tone:"error"})}const Fe=vf({canShowPreviewTab:Lt,canShowCodeTab:Tt,canEdit:te}),zt=Cf({preview:l,canOpenExternal:!!de,isDirty:Ie,handleRefreshPreview:At,handleOpenExternal:at,imageScaleMode:F,imageScale:w,setImageScale:N,setImageScaleMode:D,pdfPage:V,setPdfPage:O,pdfScale:k,setPdfScale:P,pdfFitWidth:A,setPdfFitWidth:U});return T.jsxs(Oi,{open:n,title:t,description:j("conversation.fileViewerHint").replace("{language}",m),size:S,layout:"viewer",className:`file-viewer-modal${L.isDesktop&&S!=="full"?" is-resizable":""}`,bodyClassName:"file-viewer-modal-body",onClose:r,children:[T.jsxs("div",{className:"file-viewer-toolbar",children:[T.jsxs("div",{className:"file-viewer-toolbar-start",children:[T.jsxs("div",{className:"file-viewer-tabs",role:"tablist","aria-label":j("conversation.fileViewerModeLabel"),children:[Fe.includes("preview")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="preview",role:"tab","aria-selected":g==="preview",onClick:()=>b("preview"),children:j("conversation.fileViewerPreview")}):null,Fe.includes("code")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="code",role:"tab","aria-selected":g==="code",onClick:()=>b("code"),children:j("conversation.fileViewerCode")}):null,Fe.includes("edit")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="edit",role:"tab","aria-selected":g==="edit",onClick:()=>b("edit"),disabled:!te,children:j("conversation.fileViewerEdit")}):null]}),T.jsx("span",{className:"file-viewer-language",children:m})]}),T.jsxs("div",{className:"file-viewer-toolbar-end",children:[T.jsxs("div",{className:"file-viewer-size-group",role:"group","aria-label":j("conversation.fileViewerSizeLabel"),children:[T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="regular",onClick:()=>x("regular"),children:j("conversation.fileViewerSizeDefault")}),T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="full",onClick:()=>x("full"),children:j("conversation.fileViewerSizeFull")})]}),T.jsx("div",{className:"file-viewer-actions",children:zt.map(Z=>T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":Z.active?"true":void 0,onClick:()=>void Z.onClick(),disabled:Z.disabled,children:Z.label},Z.id))}),te?T.jsx("button",{type:"button",className:"primary-button",onClick:()=>void ot(),disabled:!Ie||p,children:p?j("conversation.filePanelSaving"):j("conversation.filePanelSave")}):null]})]}),T.jsx("div",{className:"file-viewer-body",children:f?T.jsx("p",{className:"status-text",children:j("common.loading")}):(l==null?void 0:l.supported)===!1?T.jsx("p",{className:"status-text",children:l.reason??j("conversation.filePanelUnsupported")}):g==="edit"?T.jsx(Mf,{content:s,deferredContent:Ee,language:ne,useInlineRenderedEditor:Pt,onContentChange:u}):g==="preview"&&d==="html"?T.jsx(zf,{src:xe,filePath:t}):g==="preview"&&d==="image"?T.jsx(Ff,{src:K,filePath:t,scale:w,scaleMode:F}):g==="preview"&&d==="pdf"?T.jsx(Nf,{src:Ae,filePath:t}):g==="preview"&&d==="markdown"?T.jsx(_f,{content:s}):T.jsx(Ai,{content:s,language:ne,overviewMarkers:he})})]})}function Li(e,t){return t==="markdown"||t==="html"||t==="image"||t==="pdf"||Kf(e??"")||eh(e??"")?"preview":"code"}function Qt(e,t,n){n.setPreview(e),n.setEditorContent(e.content??""),n.setMode(r=>n.preserveMode&&bf(r,e.kind)?r:Li(t,e.kind)),Ti(n)}function Ti(e){e.setResourceRefreshVersion(0),e.setImageScale(1),e.setImageScaleMode("fit"),e.setPdfPage(1),e.setPdfScale(110),e.setPdfFitWidth(!0)}function Pi(e){return e==="markdown"||e==="html"||e==="image"||e==="pdf"}function cn(e){return e==="text"||e==="markdown"||e==="html"}function bf(e,t){return e==="preview"?Pi(t):cn(t)}function Sf(e,t){return e==="text"&&Jf(t)}function vf(e){const t=[];return e.canShowPreviewTab&&t.push("preview"),e.canShowCodeTab?(t.push("code"),t.push("edit")):e.canEdit&&t.push("edit"),t}function Cf(e){var r,i;if(!((r=e.preview)!=null&&r.supported))return[];const t=[],n=!((i=e.preview.capabilities)!=null&&i.canRefresh)||e.isDirty;return e.preview.kind==="image"&&t.push({id:"image-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(o=>Math.max(.25,br(o-.25)))}},{id:"image-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(o=>Math.min(4,br(o+.25)))}},{id:"image-fit",label:j("conversation.fileViewerFit"),active:e.imageScaleMode==="fit",onClick:()=>{e.setImageScaleMode("fit"),e.setImageScale(1)}},{id:"image-actual",label:j("conversation.fileViewerActualSize"),active:e.imageScaleMode==="actual",onClick:()=>{e.setImageScaleMode("actual"),e.setImageScale(1)}},{id:"image-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.preview.kind==="pdf"&&t.push({id:"pdf-prev-page",label:j("conversation.fileViewerPreviousPage"),disabled:e.pdfPage<=1,onClick:()=>e.setPdfPage(o=>Math.max(1,o-1))},{id:"pdf-page-indicator",label:j("conversation.fileViewerPageIndicator").replace("{page}",String(e.pdfPage)),disabled:!0,onClick:()=>{}},{id:"pdf-next-page",label:j("conversation.fileViewerNextPage"),onClick:()=>e.setPdfPage(o=>o+1)},{id:"pdf-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(o=>Math.max(50,Math.round(o-10)))}},{id:"pdf-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(o=>Math.min(300,Math.round(o+10)))}},{id:"pdf-fit-width",label:j("conversation.fileViewerFitWidth"),active:e.pdfFitWidth,onClick:()=>e.setPdfFitWidth(!0)},{id:"pdf-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),(e.preview.kind==="html"||e.preview.kind==="markdown"||e.preview.kind==="text")&&t.push({id:"text-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.canOpenExternal&&t.push({id:"open-external",label:j("conversation.fileViewerOpenExternal"),onClick:e.handleOpenExternal}),t}function Ef(e,t){switch(e){case"image":return j("conversation.fileViewerImage");case"pdf":return j("conversation.fileViewerPdf");case"html":return"HTML";case"markdown":return"Markdown";default:return Di(t)}}function fn(e,t){if(!e)return null;const n=new URL(e,window.location.origin);return n.searchParams.set("_preview",String(t)),n.hash="",n.toString()}function If(e,t){var n;return e?!t&&e.previewPath&&typeof window<"u"&&((n=window.location)!=null&&n.origin)?new URL(e.previewPath,window.location.origin).toString():e.previewUrl??null:null}function Lf(e,t){var n;if(!e)return null;if(e.previewPath){if(!t&&typeof window<"u"&&((n=window.location)!=null&&n.origin))return new URL(e.previewPath,window.location.origin).toString();if(t){const r=Tf(e.previewPath);if(r)return r}}return e.previewUrl??null}function Tf(e){try{const t=Ri(Fi()).baseUrl;return Ni(e,t)}catch{return null}}function Pf(e,t,n,r,i){const o=fn(e,t);if(!o)return null;const l=new URL(o,window.location.origin),a=new URLSearchParams;return a.set("page",String(n)),a.set("zoom",i?"page-width":String(r)),l.hash=a.toString(),l.toString()}function Af(e){var t;if(typeof window>"u"||!((t=window.location)!=null&&t.origin))return mt;try{if(new URL(e,window.location.origin).origin!==window.location.origin)return df}catch{return mt}return mt}function br(e){return Math.round(e*100)/100}function zf({src:e,filePath:t}){if(!e)return T.jsx("p",{className:"status-text",children:j("conversation.fileViewerHtmlPreviewUnavailable")});const n=Af(e);return T.jsx("div",{className:"file-viewer-html-frame-shell",children:T.jsx("iframe",{className:"file-viewer-html-frame","data-testid":"file-viewer-html-preview",title:t,src:e,sandbox:n},e)})}function Mf(e){return e.useInlineRenderedEditor?T.jsx(Df,{content:e.content,deferredContent:e.deferredContent,language:e.language,onContentChange:e.onContentChange}):T.jsx("textarea",{className:"file-viewer-editor","data-testid":"file-viewer-editor",value:e.content,onChange:t=>e.onContentChange(t.target.value),spellCheck:!1})}function Df(e){const t=q.useRef(null);function n(r){const i=t.current;i&&(i.scrollTop=r.currentTarget.scrollTop,i.scrollLeft=r.currentTarget.scrollLeft)}return T.jsxs("div",{className:"file-viewer-inline-editor-shell",children:[T.jsx("div",{ref:t,className:"file-viewer-inline-editor-render","data-testid":"file-viewer-inline-render","aria-hidden":"true",children:T.jsx(Rf,{content:e.deferredContent,language:e.language})}),T.jsx("textarea",{className:"file-viewer-editor file-viewer-editor-input","data-testid":"file-viewer-editor",value:e.content,onChange:r=>e.onContentChange(r.target.value),onScroll:n,spellCheck:!1})]})}function Rf({content:e,language:t}){const n=e.split(/\r?\n/);return T.jsx("div",{className:"file-viewer-inline-editor-content",children:n.map((r,i)=>{const o=zi(r,t);return T.jsx("div",{className:"file-viewer-inline-editor-line",children:T.jsx("code",{className:"file-viewer-inline-editor-code",children:o.length?o.map((l,a)=>T.jsx("span",{className:`code-token ${l.kind}`,children:l.text},`${i}-${a}-${l.text}`)):T.jsx("span",{className:"code-token plain",children:" "})})},`${i}-${r}`)})})}function Ff({src:e,filePath:t,scale:n,scaleMode:r}){return e?T.jsx("div",{className:"file-viewer-media-shell","data-mode":r,children:T.jsx("div",{className:"file-viewer-image-stage",children:T.jsx("img",{className:"file-viewer-image","data-testid":"file-viewer-image-preview","data-mode":r,src:e,alt:t,style:r==="fit"?void 0:{transform:`scale(${n})`}})})}):T.jsx("p",{className:"status-text",children:j("conversation.fileViewerImageUnavailable")})}function Nf({src:e,filePath:t}){return e?T.jsx("div",{className:"file-viewer-pdf-shell",children:T.jsx("iframe",{className:"file-viewer-pdf-frame","data-testid":"file-viewer-pdf-preview",title:t,src:e},e)}):T.jsx("p",{className:"status-text",children:j("conversation.fileViewerPdfUnavailable")})}function _f({content:e}){return T.jsx("div",{className:"markdown-content file-viewer-markdown",children:T.jsx(Ks,{remarkPlugins:[pf],components:{code(t){const n=typeof t.className=="string"?t.className:"",r=/language-([\w-]+)/.exec(n);return r?T.jsx(Ai,{content:String(t.children).replace(/\n$/,""),language:It(r[1]??"plain")}):T.jsx("code",{className:n||void 0,children:t.children})}},children:e})})}function Ai({content:e,language:t,overviewMarkers:n=[]}){const r=e.split(/\r?\n/),i=q.useRef(null),o=q.useMemo(()=>{const l=new Map;for(const a of n)for(let s=0;s<a.span;s++)l.set(a.line+s,a.kind);return l},[n]);return T.jsxs("div",{className:"file-viewer-code-block",children:[T.jsx("div",{className:"file-viewer-code-header",children:Di(t)}),T.jsxs("div",{className:"file-viewer-scroll-shell",children:[T.jsx("div",{className:"file-viewer-code-body",ref:i,children:r.map((l,a)=>{const s=zi(l,t),u=a+1,f=o.get(u);return T.jsxs("div",{className:`file-viewer-code-line${f?` diff-line-${f}`:""}`,children:[T.jsx("span",{className:"file-viewer-code-gutter",children:u}),T.jsx("code",{className:"file-viewer-code-content",children:s.length?s.map((c,p)=>T.jsx("span",{className:`code-token ${c.kind}`,children:c.text},`${a}-${p}-${c.text}`)):T.jsx("span",{className:"code-token plain",children:" "})})]},`${a}-${l}`)})}),T.jsx(ih,{markers:n,totalLines:r.length,scrollContainerRef:i})]})]})}function zi(e,t){const n=It(t);return n==="json"?Of(e):n==="yaml"?Uf(e):n==="toml"?Hf(e):n==="ini"?Mi(e):n==="env"?Wf(e):n==="properties"?$f(e):n==="conf"?qf(e):n==="editorconfig"?Yf(e):n==="dockerfile"?Xf(e):n==="gitignore"?Gf(e):n==="log"?Qf(e):n==="python"?et(e,gf,"#"):n==="shell"?et(e,xf,"#"):n==="sql"?Vf(e):n==="html"||n==="xml"?jf(e):n==="css"?Bf(e):n==="markdown"?[{text:e,kind:"plain"}]:et(e,mf,"//")}function et(e,t,n){const r=[];let i=0;for(;i<e.length;){const o=e.slice(i);if(o.startsWith(n)){r.push({text:o,kind:"comment"});break}const l=/^(?:'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"|`[^`\\]*(?:\\.[^`\\]*)*`)/.exec(o);if(l){r.push({text:l[0],kind:"string"}),i+=l[0].length;continue}const a=/^(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/.exec(o);if(a){r.push({text:a[0],kind:"number"}),i+=a[0].length;continue}const s=/^[A-Za-z_][\w$-]*/.exec(o);if(s){const f=s[0],c=f.toLowerCase();f==="true"||f==="false"||c==="true"||c==="false"?r.push({text:f,kind:"boolean"}):f==="null"||f==="None"||c==="none"?r.push({text:f,kind:"null"}):t.has(f)||t.has(c)?r.push({text:f,kind:"keyword"}):r.push({text:f,kind:"plain"}),i+=f.length;continue}const u=/^(?:===|!==|==|!=|<=|>=|=>|&&|\|\||[+\-*/%=<>!?:|&^~]+)/.exec(o);if(u){r.push({text:u[0],kind:"operator"}),i+=u[0].length;continue}r.push({text:o[0]??"",kind:"plain"}),i+=1}return r}function Of(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=/^"(?:[^"\\]|\\.)*"/.exec(r);if(i){const s=e.slice(n+i[0].length).trimStart()[0];t.push({text:i[0],kind:s===":"?"attr":"string"}),n+=i[0].length;continue}const o=/^(?:-?\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i.exec(r);if(o){t.push({text:o[0],kind:"number"}),n+=o[0].length;continue}const l=/^(?:true|false|null)\b/.exec(r);if(l){const s=l[0]==="null"?"null":"boolean";t.push({text:l[0],kind:s}),n+=l[0].length;continue}const a=/^(?::|,|\{|\}|\[|\])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function jf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("<!--")){t.push({text:r,kind:"comment"});break}const i=/^(<\/?[\w:-]+)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([\w:-]+)(=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:'[^']*'|"[^"]*")/.exec(r);if(l){t.push({text:l[0],kind:"string"}),n+=l[0].length;continue}const a=/^(?:\/?>)/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Bf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("/*")){t.push({text:r,kind:"comment"});break}const i=/^(?:'[^']*'|"[^"]*")/.exec(r);if(i){t.push({text:i[0],kind:"string"}),n+=i[0].length;continue}const o=/^([A-Za-z-]+)(\s*:)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:#(?:[\da-fA-F]{3,8})|\d+(?:\.\d+)?(?:px|rem|em|vh|vw|%)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:@media|@supports|@import|@keyframes)\b/.exec(r);if(a){t.push({text:a[0],kind:"keyword"}),n+=a[0].length;continue}const s=/^(?:[{}:;(),.>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Vf(e){return et(e,kf,"--")}function Uf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^([A-Za-z0-9_.-]+)(\s*:)/.exec(r);if(i){t.push({text:i[1]??"",kind:"attr"}),t.push({text:i[2]??"",kind:"operator"}),n+=i[0].length;continue}const o=/^(?:'[^']*'|"[^"]*")/.exec(r);if(o){t.push({text:o[0],kind:"string"}),n+=o[0].length;continue}const l=/^(?:-?\d+(?:\.\d+)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:true|false|yes|no|null|~)\b/i.exec(r);if(a){const u=a[0].toLowerCase(),f=u==="null"||u==="~"?"null":"boolean";t.push({text:a[0],kind:f}),n+=a[0].length;continue}const s=/^(?:[-?:,[\]{}|>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Hf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(\[\[?[^\]]+\]?\])/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([A-Za-z0-9_.-]+)(\s*=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=Et(r,{trueValues:["true"],falseValues:["false"],nullValues:[]});if(l){t.push(...l.tokens),n+=l.length;continue}const a=/^(?:[,[\]{}])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Mi(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=r.trimStart();if(i.startsWith(";")||i.startsWith("#")){t.push({text:r,kind:"comment"});break}const o=/^(\[[^\]]+\])/.exec(r);if(o){t.push({text:o[0],kind:"tag"}),n+=o[0].length;continue}const l=/^([A-Za-z0-9_.-]+)(\s*[=:])/.exec(r);if(l){t.push({text:l[1]??"",kind:"attr"}),t.push({text:l[2]??"",kind:"operator"}),n+=l[0].length;continue}const a=Et(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(a){t.push(...a.tokens),n+=a.length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Wf(e){if(e.trimStart().startsWith("#"))return[{text:e,kind:"comment"}];const n=/^(\s*)(export)(\s+)/.exec(e),r=n?n[0].length:0,i=[];n&&(i.push({text:n[1]??"",kind:"plain"}),i.push({text:n[2]??"",kind:"keyword"}),i.push({text:n[3]??"",kind:"plain"}));const o=e.slice(r),l=/^([A-Za-z_][A-Za-z0-9_]*)(=)/.exec(o);if(!l)return Mi(e);i.push({text:l[1]??"",kind:"attr"}),i.push({text:l[2]??"",kind:"operator"});const a=o.slice(l[0].length),s=Et(a,{trueValues:["true"],falseValues:["false"],nullValues:["null"]});return s?(i.push(...s.tokens),i):(i.push({text:a,kind:"plain"}),i)}function $f(e){return An(e,{commentPrefixes:["#","!"],allowSection:!1,delimiters:["=",":"]})}function qf(e){return An(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["=",":"]})}function Yf(e){return An(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["="]})}function Xf(e){return et(e,yf,"#")}function Gf(e){const t=e.trimStart();if(!t)return[];if(t.startsWith("#"))return[{text:e,kind:"comment"}];if(t.startsWith("!")){const n=e.length-t.length,r=e.slice(0,n),i=t.slice(1);return[{text:r,kind:"plain"},{text:"!",kind:"operator"},{text:i,kind:"string"}]}return[{text:e,kind:"string"}]}function Qf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(?:\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:[.,]\d{3,6})?(?:Z|[+-]\d{2}:\d{2})?)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^(?:\[(TRACE|DEBUG|INFO|WARN|WARNING|ERROR|FATAL)\])/.exec(r);if(o){t.push({text:r.slice(0,o[0].length),kind:"keyword"}),n+=o[0].length;continue}const l=/^[A-Za-z_][\w-]*/.exec(r);if(l){const s=l[0];wf.has(s.toLowerCase())?t.push({text:s,kind:"keyword"}):t.push({text:s,kind:"plain"}),n+=s.length;continue}const a=/^(?:\d+(?:\.\d+)?)/.exec(r);if(a){t.push({text:a[0],kind:"number"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function An(e,t){const n=e.trimStart();if(t.commentPrefixes.some(s=>n.startsWith(s)))return[{text:e,kind:"comment"}];if(t.allowSection){const s=/^(\[[^\]]+\])/.exec(e);if(s)return[{text:s[0],kind:"tag"}]}const r=/^([A-Za-z0-9_.\-*?]+)(\s*(?:=|:))/.exec(e);if(!r)return[{text:e,kind:"plain"}];const i=(r[2]??"").trim();if(!t.delimiters.includes(i))return[{text:e,kind:"plain"}];const o=[{text:r[1]??"",kind:"attr"},{text:r[2]??"",kind:"operator"}],l=e.slice(r[0].length),a=Zf(l);return a.length&&o.push(...a),o}function Zf(e){if(!e)return[];const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=Et(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(i){t.push(...i.tokens),n+=i.length;continue}if(r.startsWith("#")||r.startsWith(";")){t.push({text:r,kind:"comment"});break}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Et(e,t){const n=/^(?:'[^']*'|"[^"]*")/.exec(e);if(n)return{tokens:[{text:n[0],kind:"string"}],length:n[0].length};const r=/^(?:-?\d+(?:\.\d+)?)/.exec(e);if(r)return{tokens:[{text:r[0],kind:"number"}],length:r[0].length};const i=/^[A-Za-z0-9_.:+/-]+/.exec(e);if(!i)return null;const o=i[0],l=o.toLowerCase();return t.trueValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.falseValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.nullValues.includes(l)?{tokens:[{text:o,kind:"null"}],length:o.length}:{tokens:[{text:o,kind:"plain"}],length:o.length}}function zn(e){var r,i;if(!e)return"plain";const t=((r=e.split(/[\\/]/).pop())==null?void 0:r.toLowerCase())??"";if(t===".env"||t.startsWith(".env."))return"env";if(t===".editorconfig")return"editorconfig";if(t==="dockerfile"||t.endsWith(".dockerfile"))return"dockerfile";if(t===".gitignore")return"gitignore";switch(((i=e.split(".").pop())==null?void 0:i.toLowerCase())??""){case"md":case"markdown":return"markdown";case"ts":case"tsx":return"typescript";case"js":case"jsx":case"mjs":case"cjs":return"javascript";case"json":return"json";case"log":return"log";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"conf":return"conf";case"dockerfile":return"dockerfile";case"css":case"scss":case"less":return"css";case"html":case"htm":return"html";case"xml":case"svg":return"xml";case"py":return"python";case"sh":case"bash":case"zsh":return"shell";case"sql":return"sql";case"yml":case"yaml":return"yaml";case"rs":return"rust";case"go":return"go";case"java":return"java";case"c":case"h":case"cpp":case"cc":case"hpp":return"cpp";default:return"plain"}}function It(e){const t=e.toLowerCase();switch(t){case"ts":case"tsx":case"typescript":return"typescript";case"js":case"jsx":case"javascript":return"javascript";case"bash":case"shell":case"sh":case"zsh":return"shell";case"md":case"markdown":return"markdown";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"env":return"env";case"conf":return"conf";case"editorconfig":return"editorconfig";case"dockerfile":return"dockerfile";case"gitignore":return"gitignore";case"log":return"log";default:return t}}function Jf(e){const t=It(e);return t==="json"||t==="yaml"||t==="toml"||t==="ini"||t==="env"||t==="properties"||t==="conf"||t==="editorconfig"||t==="dockerfile"||t==="gitignore"}function Di(e){switch(It(e)){case"typescript":return"TypeScript";case"javascript":return"JavaScript";case"markdown":return"Markdown";case"json":return"JSON";case"properties":return"Properties";case"toml":return"TOML";case"ini":return"INI";case"env":return"ENV";case"conf":return"CONF";case"editorconfig":return"EditorConfig";case"dockerfile":return"Dockerfile";case"gitignore":return"GitIgnore";case"log":return"Log";case"css":return"CSS";case"html":return"HTML";case"xml":return"XML";case"python":return"Python";case"shell":return"Shell";case"sql":return"SQL";case"yaml":return"YAML";case"rust":return"Rust";case"go":return"Go";case"java":return"Java";case"cpp":return"C/C++";default:return j("conversation.fileViewerPlainText")}}function Kf(e){return zn(e)==="markdown"}function eh(e){return zn(e)==="html"}function Zt(e,t){return e instanceof _i?e.message:t}function th(e){const t=[],n=e.replace(/\r\n/g,`
29
+ `))}function s(h,g,b,S){const x=b.enter("tableCell"),E=b.enter("phrasing"),v=b.containerPhrasing(h,{...S,before:o,after:o});return E(),x(),v}function u(h,g){return Bu(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,b){const S=h.children;let x=-1;const E=[],v=g.enter("table");for(;++x<S.length;)E[x]=c(S[x],g,b);return v(),E}function c(h,g,b){const S=h.children;let x=-1;const E=[],v=g.enter("tableRow");for(;++x<S.length;)E[x]=s(S[x],h,g,b);return v(),E}function p(h,g,b){let S=ki.inlineCode(h,g,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Lc(){return{exit:{taskListCheckValueChecked:yr,taskListCheckValueUnchecked:yr,paragraph:Pc}}}function Tc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ac}}}function yr(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Pc(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ac(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(l);let s=ki.listItem(e,t,n,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function zc(){return[uu(),Au(),Fu(),wc(),Lc()]}function Mc(e){return{extensions:[cu(),zu(e),Ru(),Ic(e),Tc()]}}const Dc={tokenize:jc,partial:!0},yi={tokenize:Bc,partial:!0},wi={tokenize:Vc,partial:!0},bi={tokenize:Uc,partial:!0},Fc={tokenize:Hc,partial:!0},Si={name:"wwwAutolink",tokenize:_c,previous:Ci},vi={name:"protocolAutolink",tokenize:Oc,previous:Ei},ve={name:"emailAutolink",tokenize:Nc,previous:Ii},ye={};function Rc(){return{text:ye}}let Me=48;for(;Me<123;)ye[Me]=ve,Me++,Me===58?Me=65:Me===91&&(Me=97);ye[43]=ve;ye[45]=ve;ye[46]=ve;ye[95]=ve;ye[72]=[ve,vi];ye[104]=[ve,vi];ye[87]=[ve,Si];ye[119]=[ve,Si];function Nc(e,t,n){const r=this;let i,o;return l;function l(c){return!un(c)||!Ii.call(r,r.previous)||Pn(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return un(c)?(e.consume(c),a):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(Fc,f,u)(c):c===45||c===95||re(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&le(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function _c(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Ci.call(r,r.previous)||Pn(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Dc,e.attempt(yi,e.attempt(wi,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Oc(e,t,n){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ei.call(r,r.previous)&&!Pn(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if(le(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):n(c)}function u(c){return c===null||gt(c)||X(c)||De(c)||wt(c)?n(c):e.attempt(yi,e.attempt(wi,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function jc(e,t,n){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),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Bc(e,t,n){let r,i,o;return l;function l(u){return u===46||u===95?e.check(bi,s,a)(u):u===null||X(u)||De(u)||u!==45&&wt(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?n(u):t(u)}}function Vc(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(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(bi,t,o)(l):l===null||X(l)||De(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Uc(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||X(a)||De(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||X(a)||De(a)?t(a):r(a)}function o(a){return le(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):le(a)?(e.consume(a),l):n(a)}}function Hc(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return re(o)?n(o):t(o)}}function Ci(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function Ei(e){return!le(e)}function Ii(e){return!(e===47||un(e))}function un(e){return e===43||e===45||e===46||e===95||re(e)}function Pn(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Wc={tokenize:Jc,partial:!0};function $c(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gc,continuation:{tokenize:Qc},exit:Zc}},text:{91:{name:"gfmFootnoteCall",tokenize:Xc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qc,resolveTo:Yc}}}}function qc(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=ge(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Yc(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Xc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(c){if(o>999||c===93&&!l||c===null||c===91||X(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(ge(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return X(c)||(l=!0),o++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),o++,u):u(c)}}function Gc(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(l>999||g===93&&!a||g===null||g===91||X(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return o=ge(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return X(g)||(a=!0),l++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),W(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function Qc(e,t,n){return e.check(it,t,e.attempt(Wc,t,n))}function Zc(e){e.exit("gfmFootnoteDefinition")}function Jc(e,t,n){const r=this;return W(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function Kc(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let s=-1;for(;++s<l.length;)if(l[s][0]==="enter"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._close){let u=s;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[s][1].end.offset-l[s][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[s][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[s][1].end)},c={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[s][1].start)},p=[["enter",f,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",c,a]],h=a.parser.constructs.insideSpan.null;h&&ce(p,p.length,0,bt(h,l.slice(u+1,s),a)),ce(p,p.length,0,[["exit",c,a],["enter",l[s][1],a],["exit",l[s][1],a],["exit",f,a]]),ce(l,u-1,s-u+3,p),s=u+p.length-2;break}}for(s=-1;++s<l.length;)l[s][1].type==="strikethroughSequenceTemporary"&&(l[s][1].type="data");return l}function o(l,a,s){const u=this.previous,f=this.events;let c=0;return p;function p(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(l.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const b=Ue(u);if(g===126)return c>1?s(g):(l.consume(g),c++,h);if(c<2&&!n)return s(g);const S=l.exit("strikethroughSequenceTemporary"),x=Ue(g);return S._open=!x||x===2&&!!b,S._close=!b||b===2&&!!x,a(g)}}}class ef{constructor(){this.map=[]}add(t,n,r){tf(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function tf(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function nf(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function rf(){return{flow:{null:{name:"table",tokenize:lf,resolveAll:of}}}}function lf(e,t,n){const r=this;let i=0,o=0,l;return a;function a(k){let P=r.events.length-1;for(;P>-1;){const z=r.events[P][1].type;if(z==="lineEnding"||z==="linePrefix")P--;else break}const A=P>-1?r.events[P][1].type:null,U=A==="tableHead"||A==="tableRow"?w:s;return U===w&&r.parser.lazy[r.now().line]?n(k):U(k)}function s(k){return e.enter("tableHead"),e.enter("tableRow"),u(k)}function u(k){return k===124||(l=!0,o+=1),f(k)}function f(k){return k===null?n(k):M(k)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),h):n(k):B(k)?W(e,f,"whitespace")(k):(o+=1,l&&(l=!1,i+=1),k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),c(k)))}function c(k){return k===null||k===124||X(k)?(e.exit("data"),f(k)):(e.consume(k),k===92?p:c)}function p(k){return k===92||k===124?(e.consume(k),c):c(k)}function h(k){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(k):(e.enter("tableDelimiterRow"),l=!1,B(k)?W(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):g(k))}function g(k){return k===45||k===58?S(k):k===124?(l=!0,e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),b):D(k)}function b(k){return B(k)?W(e,S,"whitespace")(k):S(k)}function S(k){return k===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),x):k===45?(o+=1,x(k)):k===null||M(k)?R(k):D(k)}function x(k){return k===45?(e.enter("tableDelimiterFiller"),E(k)):D(k)}function E(k){return k===45?(e.consume(k),E):k===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(k),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(k))}function v(k){return B(k)?W(e,R,"whitespace")(k):R(k)}function R(k){return k===124?g(k):k===null||M(k)?!l||i!==o?D(k):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(k)):D(k)}function D(k){return n(k)}function w(k){return e.enter("tableRow"),N(k)}function N(k){return k===124?(e.enter("tableCellDivider"),e.consume(k),e.exit("tableCellDivider"),N):k===null||M(k)?(e.exit("tableRow"),t(k)):B(k)?W(e,N,"whitespace")(k):(e.enter("data"),V(k))}function V(k){return k===null||k===124||X(k)?(e.exit("data"),N(k)):(e.consume(k),k===92?O:V)}function O(k){return k===92||k===124?(e.consume(k),V):V(k)}}function of(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,f,c;const p=new ef;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(a=!1,s!==0&&(wr(p,t,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,o=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c),o=[0,0,0,0]),l[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],c=pt(p,t,o,i,void 0,c)),o=l,l=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,o[1]!==0?(l[0]=l[1],c=pt(p,t,o,i,n,c)):l[1]!==0&&(c=pt(p,t,l,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(l[3]=n)}for(s!==0&&wr(p,t,s,u,f),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=nf(t.events,n))}return e}function pt(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Be(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Be(t.events,n[1]);if(o={type:l,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=Be(t.events,n[2]),f=Be(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(o.end=Object.assign({},Be(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function wr(e,t,n,r,i){const o=[],l=Be(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Be(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const af={name:"tasklistCheck",tokenize:uf};function sf(){return{text:{91:af}}}function uf(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),o)}function o(s){return X(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return M(s)?t(s):B(s)?e.check({tokenize:cf},t,n)(s):n(s)}}function cf(e,t,n){return W(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ff(e){return _r([Rc(),$c(),Kc(e),rf(),sf()])}const hf={};function pf(e){const t=this,n=e||hf,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ff(n)),o.push(zc()),l.push(Mc(n))}const mt="allow-forms allow-modals allow-scripts",df=`${mt} allow-same-origin`,mf=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","false","finally","for","from","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","readonly","return","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),gf=new Set(["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"]),xf=new Set(["case","do","done","elif","else","esac","export","fi","for","function","if","in","local","readonly","return","then","until","while"]),kf=new Set(["add","alter","and","as","asc","between","by","create","delete","desc","drop","from","group","having","insert","into","join","left","like","limit","not","null","offset","on","or","order","right","select","set","table","union","update","values","where"]),yf=new Set(["add","arg","cmd","copy","entrypoint","env","expose","from","healthcheck","label","maintainer","onbuild","run","shell","stopsignal","user","volume","workdir","as"]),wf=new Set(["trace","debug","info","warn","warning","error","fatal"]);function uh({workspaceId:e,filePath:t,open:n,onClose:r,onSaved:i,diffContent:o}){var st,ut;const[l,a]=q.useState(null),[s,u]=q.useState(""),[f,c]=q.useState(!1),[p,h]=q.useState(!1),[g,b]=q.useState("preview"),[S,x]=q.useState("regular"),[E,v]=q.useState(0),[R,D]=q.useState("fit"),[w,N]=q.useState(1),[V,O]=q.useState(1),[k,P]=q.useState(110),[A,U]=q.useState(!0),{showToast:z}=ji(),L=Bi(),$=q.useRef(r),Q=q.useRef(z),ne=q.useMemo(()=>zn(t),[t]),he=q.useMemo(()=>nh(o),[o]),d=(l==null?void 0:l.kind)??null,te=!!((st=l==null?void 0:l.capabilities)!=null&&st.canEdit),pe=!!((ut=l==null?void 0:l.capabilities)!=null&&ut.canRefresh),m=Ef(d,ne),ee=q.useMemo(()=>If(l,L.isDesktop),[L.isDesktop,l]),de=q.useMemo(()=>Lf(l,L.isDesktop),[L.isDesktop,l]),K=q.useMemo(()=>fn(ee,E),[ee,E]),Ae=q.useMemo(()=>Pf(ee,E,V,k,A),[ee,E,V,k,A]),xe=q.useMemo(()=>fn(ee,E),[ee,E]),Ce=(l==null?void 0:l.content)??"",Ee=q.useDeferredValue(s),Ie=te&&s!==Ce,Lt=Pi(d),Tt=cn(d),Pt=Sf(d,ne);if(q.useEffect(()=>{$.current=r},[r]),q.useEffect(()=>{Q.current=z},[z]),q.useEffect(()=>{if(!n){a(null),u(""),c(!1),h(!1),b(Li(t,null)),Ti({setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),x("regular");return}if(!e||!t)return;const Z=e,Ne=t;let y=!1;async function I(){c(!0);try{const F=await Mt(Z,Ne);y||Qt(F,Ne,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U})}catch(F){y||(Q.current({title:Zt(F,j("conversation.filePanelOpenFailed")),tone:"error"}),$.current())}finally{y||c(!1)}}return I(),()=>{y=!0}},[t,n,e]),!n||!t)return null;const we=t,Le=e;async function ot(){if(!(!Le||!(l!=null&&l.version)||!te)){h(!0);try{await Vi(Le,we,s,l.version);const Z=await Mt(Le,we);Qt(Z,we,{preserveMode:!1,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),await i(we),z({title:j("conversation.filePanelSaveSuccess"),tone:"success"})}catch(Z){z({title:Zt(Z,j("conversation.filePanelSaveFailed")),tone:"error"})}finally{h(!1)}}}async function At(){if(!(!Le||!pe||Ie)){c(!0);try{const Z=await Mt(Le,we);Qt(Z,we,{preserveMode:!0,setPreview:a,setEditorContent:u,setMode:b,setResourceRefreshVersion:v,setImageScale:N,setImageScaleMode:D,setPdfPage:O,setPdfScale:P,setPdfFitWidth:U}),v(Ne=>Ne+1)}catch(Z){z({title:Zt(Z,j("conversation.fileViewerRefreshFailed")),tone:"error"})}finally{c(!1)}}}async function at(){if(!de)return;const Z=await L.bridge.openExternal(de);Z.ok||z({title:Z.detail??j("conversation.fileViewerOpenExternalFailed"),tone:"error"})}const Re=vf({canShowPreviewTab:Lt,canShowCodeTab:Tt,canEdit:te}),zt=Cf({preview:l,canOpenExternal:!!de,isDirty:Ie,handleRefreshPreview:At,handleOpenExternal:at,imageScaleMode:R,imageScale:w,setImageScale:N,setImageScaleMode:D,pdfPage:V,setPdfPage:O,pdfScale:k,setPdfScale:P,pdfFitWidth:A,setPdfFitWidth:U});return T.jsxs(Oi,{open:n,title:t,description:j("conversation.fileViewerHint").replace("{language}",m),size:S,layout:"viewer",className:`file-viewer-modal${L.isDesktop&&S!=="full"?" is-resizable":""}`,bodyClassName:"file-viewer-modal-body",onClose:r,children:[T.jsxs("div",{className:"file-viewer-toolbar",children:[T.jsxs("div",{className:"file-viewer-toolbar-start",children:[T.jsxs("div",{className:"file-viewer-tabs",role:"tablist","aria-label":j("conversation.fileViewerModeLabel"),children:[Re.includes("preview")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="preview",role:"tab","aria-selected":g==="preview",onClick:()=>b("preview"),children:j("conversation.fileViewerPreview")}):null,Re.includes("code")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="code",role:"tab","aria-selected":g==="code",onClick:()=>b("code"),children:j("conversation.fileViewerCode")}):null,Re.includes("edit")?T.jsx("button",{type:"button",className:"file-viewer-tab","data-active":g==="edit",role:"tab","aria-selected":g==="edit",onClick:()=>b("edit"),disabled:!te,children:j("conversation.fileViewerEdit")}):null]}),T.jsx("span",{className:"file-viewer-language",children:m})]}),T.jsxs("div",{className:"file-viewer-toolbar-end",children:[T.jsxs("div",{className:"file-viewer-size-group",role:"group","aria-label":j("conversation.fileViewerSizeLabel"),children:[T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="regular",onClick:()=>x("regular"),children:j("conversation.fileViewerSizeDefault")}),T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":S==="full",onClick:()=>x("full"),children:j("conversation.fileViewerSizeFull")})]}),T.jsx("div",{className:"file-viewer-actions",children:zt.map(Z=>T.jsx("button",{type:"button",className:"secondary-button file-viewer-action-button","data-active":Z.active?"true":void 0,onClick:()=>void Z.onClick(),disabled:Z.disabled,children:Z.label},Z.id))}),te?T.jsx("button",{type:"button",className:"primary-button",onClick:()=>void ot(),disabled:!Ie||p,children:p?j("conversation.filePanelSaving"):j("conversation.filePanelSave")}):null]})]}),T.jsx("div",{className:"file-viewer-body",children:f?T.jsx("p",{className:"status-text",children:j("common.loading")}):(l==null?void 0:l.supported)===!1?T.jsx("p",{className:"status-text",children:l.reason??j("conversation.filePanelUnsupported")}):g==="edit"?T.jsx(Mf,{content:s,deferredContent:Ee,language:ne,useInlineRenderedEditor:Pt,onContentChange:u}):g==="preview"&&d==="html"?T.jsx(zf,{src:xe,filePath:t}):g==="preview"&&d==="image"?T.jsx(Rf,{src:K,filePath:t,scale:w,scaleMode:R}):g==="preview"&&d==="pdf"?T.jsx(Nf,{src:Ae,filePath:t}):g==="preview"&&d==="markdown"?T.jsx(_f,{content:s}):T.jsx(Ai,{content:s,language:ne,overviewMarkers:he})})]})}function Li(e,t){return t==="markdown"||t==="html"||t==="image"||t==="pdf"||Kf(e??"")||eh(e??"")?"preview":"code"}function Qt(e,t,n){n.setPreview(e),n.setEditorContent(e.content??""),n.setMode(r=>n.preserveMode&&bf(r,e.kind)?r:Li(t,e.kind)),Ti(n)}function Ti(e){e.setResourceRefreshVersion(0),e.setImageScale(1),e.setImageScaleMode("fit"),e.setPdfPage(1),e.setPdfScale(110),e.setPdfFitWidth(!0)}function Pi(e){return e==="markdown"||e==="html"||e==="image"||e==="pdf"}function cn(e){return e==="text"||e==="markdown"||e==="html"}function bf(e,t){return e==="preview"?Pi(t):cn(t)}function Sf(e,t){return e==="text"&&Jf(t)}function vf(e){const t=[];return e.canShowPreviewTab&&t.push("preview"),e.canShowCodeTab?(t.push("code"),t.push("edit")):e.canEdit&&t.push("edit"),t}function Cf(e){var r,i;if(!((r=e.preview)!=null&&r.supported))return[];const t=[],n=!((i=e.preview.capabilities)!=null&&i.canRefresh)||e.isDirty;return e.preview.kind==="image"&&t.push({id:"image-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(o=>Math.max(.25,br(o-.25)))}},{id:"image-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setImageScaleMode("custom"),e.setImageScale(o=>Math.min(4,br(o+.25)))}},{id:"image-fit",label:j("conversation.fileViewerFit"),active:e.imageScaleMode==="fit",onClick:()=>{e.setImageScaleMode("fit"),e.setImageScale(1)}},{id:"image-actual",label:j("conversation.fileViewerActualSize"),active:e.imageScaleMode==="actual",onClick:()=>{e.setImageScaleMode("actual"),e.setImageScale(1)}},{id:"image-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.preview.kind==="pdf"&&t.push({id:"pdf-prev-page",label:j("conversation.fileViewerPreviousPage"),disabled:e.pdfPage<=1,onClick:()=>e.setPdfPage(o=>Math.max(1,o-1))},{id:"pdf-page-indicator",label:j("conversation.fileViewerPageIndicator").replace("{page}",String(e.pdfPage)),disabled:!0,onClick:()=>{}},{id:"pdf-next-page",label:j("conversation.fileViewerNextPage"),onClick:()=>e.setPdfPage(o=>o+1)},{id:"pdf-zoom-out",label:j("conversation.fileViewerZoomOut"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(o=>Math.max(50,Math.round(o-10)))}},{id:"pdf-zoom-in",label:j("conversation.fileViewerZoomIn"),onClick:()=>{e.setPdfFitWidth(!1),e.setPdfScale(o=>Math.min(300,Math.round(o+10)))}},{id:"pdf-fit-width",label:j("conversation.fileViewerFitWidth"),active:e.pdfFitWidth,onClick:()=>e.setPdfFitWidth(!0)},{id:"pdf-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),(e.preview.kind==="html"||e.preview.kind==="markdown"||e.preview.kind==="text")&&t.push({id:"text-refresh",label:j("conversation.fileViewerRefreshPreview"),disabled:n,onClick:e.handleRefreshPreview}),e.canOpenExternal&&t.push({id:"open-external",label:j("conversation.fileViewerOpenExternal"),onClick:e.handleOpenExternal}),t}function Ef(e,t){switch(e){case"image":return j("conversation.fileViewerImage");case"pdf":return j("conversation.fileViewerPdf");case"html":return"HTML";case"markdown":return"Markdown";default:return Di(t)}}function fn(e,t){if(!e)return null;const n=new URL(e,window.location.origin);return n.searchParams.set("_preview",String(t)),n.hash="",n.toString()}function If(e,t){var n;return e?!t&&e.previewPath&&typeof window<"u"&&((n=window.location)!=null&&n.origin)?new URL(e.previewPath,window.location.origin).toString():e.previewUrl??null:null}function Lf(e,t){var n;if(!e)return null;if(e.previewPath){if(!t&&typeof window<"u"&&((n=window.location)!=null&&n.origin))return new URL(e.previewPath,window.location.origin).toString();if(t){const r=Tf(e.previewPath);if(r)return r}}return e.previewUrl??null}function Tf(e){try{const t=Fi(Ri()).baseUrl;return Ni(e,t)}catch{return null}}function Pf(e,t,n,r,i){const o=fn(e,t);if(!o)return null;const l=new URL(o,window.location.origin),a=new URLSearchParams;return a.set("page",String(n)),a.set("zoom",i?"page-width":String(r)),l.hash=a.toString(),l.toString()}function Af(e){var t;if(typeof window>"u"||!((t=window.location)!=null&&t.origin))return mt;try{if(new URL(e,window.location.origin).origin!==window.location.origin)return df}catch{return mt}return mt}function br(e){return Math.round(e*100)/100}function zf({src:e,filePath:t}){if(!e)return T.jsx("p",{className:"status-text",children:j("conversation.fileViewerHtmlPreviewUnavailable")});const n=Af(e);return T.jsx("div",{className:"file-viewer-html-frame-shell",children:T.jsx("iframe",{className:"file-viewer-html-frame","data-testid":"file-viewer-html-preview",title:t,src:e,sandbox:n},e)})}function Mf(e){return e.useInlineRenderedEditor?T.jsx(Df,{content:e.content,deferredContent:e.deferredContent,language:e.language,onContentChange:e.onContentChange}):T.jsx("textarea",{className:"file-viewer-editor","data-testid":"file-viewer-editor",value:e.content,onChange:t=>e.onContentChange(t.target.value),spellCheck:!1})}function Df(e){const t=q.useRef(null);function n(r){const i=t.current;i&&(i.scrollTop=r.currentTarget.scrollTop,i.scrollLeft=r.currentTarget.scrollLeft)}return T.jsxs("div",{className:"file-viewer-inline-editor-shell",children:[T.jsx("div",{ref:t,className:"file-viewer-inline-editor-render","data-testid":"file-viewer-inline-render","aria-hidden":"true",children:T.jsx(Ff,{content:e.deferredContent,language:e.language})}),T.jsx("textarea",{className:"file-viewer-editor file-viewer-editor-input","data-testid":"file-viewer-editor",value:e.content,onChange:r=>e.onContentChange(r.target.value),onScroll:n,spellCheck:!1})]})}function Ff({content:e,language:t}){const n=e.split(/\r?\n/);return T.jsx("div",{className:"file-viewer-inline-editor-content",children:n.map((r,i)=>{const o=zi(r,t);return T.jsx("div",{className:"file-viewer-inline-editor-line",children:T.jsx("code",{className:"file-viewer-inline-editor-code",children:o.length?o.map((l,a)=>T.jsx("span",{className:`code-token ${l.kind}`,children:l.text},`${i}-${a}-${l.text}`)):T.jsx("span",{className:"code-token plain",children:" "})})},`${i}-${r}`)})})}function Rf({src:e,filePath:t,scale:n,scaleMode:r}){return e?T.jsx("div",{className:"file-viewer-media-shell","data-mode":r,children:T.jsx("div",{className:"file-viewer-image-stage",children:T.jsx("img",{className:"file-viewer-image","data-testid":"file-viewer-image-preview","data-mode":r,src:e,alt:t,style:r==="fit"?void 0:{transform:`scale(${n})`}})})}):T.jsx("p",{className:"status-text",children:j("conversation.fileViewerImageUnavailable")})}function Nf({src:e,filePath:t}){return e?T.jsx("div",{className:"file-viewer-pdf-shell",children:T.jsx("iframe",{className:"file-viewer-pdf-frame","data-testid":"file-viewer-pdf-preview",title:t,src:e},e)}):T.jsx("p",{className:"status-text",children:j("conversation.fileViewerPdfUnavailable")})}function _f({content:e}){return T.jsx("div",{className:"markdown-content file-viewer-markdown",children:T.jsx(Ks,{remarkPlugins:[pf],components:{code(t){const n=typeof t.className=="string"?t.className:"",r=/language-([\w-]+)/.exec(n);return r?T.jsx(Ai,{content:String(t.children).replace(/\n$/,""),language:It(r[1]??"plain")}):T.jsx("code",{className:n||void 0,children:t.children})}},children:e})})}function Ai({content:e,language:t,overviewMarkers:n=[]}){const r=e.split(/\r?\n/),i=q.useRef(null),o=q.useMemo(()=>{const l=new Map;for(const a of n)for(let s=0;s<a.span;s++)l.set(a.line+s,a.kind);return l},[n]);return T.jsxs("div",{className:"file-viewer-code-block",children:[T.jsx("div",{className:"file-viewer-code-header",children:Di(t)}),T.jsxs("div",{className:"file-viewer-scroll-shell",children:[T.jsx("div",{className:"file-viewer-code-body",ref:i,children:r.map((l,a)=>{const s=zi(l,t),u=a+1,f=o.get(u);return T.jsxs("div",{className:`file-viewer-code-line${f?` diff-line-${f}`:""}`,children:[T.jsx("span",{className:"file-viewer-code-gutter",children:u}),T.jsx("code",{className:"file-viewer-code-content",children:s.length?s.map((c,p)=>T.jsx("span",{className:`code-token ${c.kind}`,children:c.text},`${a}-${p}-${c.text}`)):T.jsx("span",{className:"code-token plain",children:" "})})]},`${a}-${l}`)})}),T.jsx(ih,{markers:n,totalLines:r.length,scrollContainerRef:i})]})]})}function zi(e,t){const n=It(t);return n==="json"?Of(e):n==="yaml"?Uf(e):n==="toml"?Hf(e):n==="ini"?Mi(e):n==="env"?Wf(e):n==="properties"?$f(e):n==="conf"?qf(e):n==="editorconfig"?Yf(e):n==="dockerfile"?Xf(e):n==="gitignore"?Gf(e):n==="log"?Qf(e):n==="python"?et(e,gf,"#"):n==="shell"?et(e,xf,"#"):n==="sql"?Vf(e):n==="html"||n==="xml"?jf(e):n==="css"?Bf(e):n==="markdown"?[{text:e,kind:"plain"}]:et(e,mf,"//")}function et(e,t,n){const r=[];let i=0;for(;i<e.length;){const o=e.slice(i);if(o.startsWith(n)){r.push({text:o,kind:"comment"});break}const l=/^(?:'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"|`[^`\\]*(?:\\.[^`\\]*)*`)/.exec(o);if(l){r.push({text:l[0],kind:"string"}),i+=l[0].length;continue}const a=/^(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/.exec(o);if(a){r.push({text:a[0],kind:"number"}),i+=a[0].length;continue}const s=/^[A-Za-z_][\w$-]*/.exec(o);if(s){const f=s[0],c=f.toLowerCase();f==="true"||f==="false"||c==="true"||c==="false"?r.push({text:f,kind:"boolean"}):f==="null"||f==="None"||c==="none"?r.push({text:f,kind:"null"}):t.has(f)||t.has(c)?r.push({text:f,kind:"keyword"}):r.push({text:f,kind:"plain"}),i+=f.length;continue}const u=/^(?:===|!==|==|!=|<=|>=|=>|&&|\|\||[+\-*/%=<>!?:|&^~]+)/.exec(o);if(u){r.push({text:u[0],kind:"operator"}),i+=u[0].length;continue}r.push({text:o[0]??"",kind:"plain"}),i+=1}return r}function Of(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=/^"(?:[^"\\]|\\.)*"/.exec(r);if(i){const s=e.slice(n+i[0].length).trimStart()[0];t.push({text:i[0],kind:s===":"?"attr":"string"}),n+=i[0].length;continue}const o=/^(?:-?\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i.exec(r);if(o){t.push({text:o[0],kind:"number"}),n+=o[0].length;continue}const l=/^(?:true|false|null)\b/.exec(r);if(l){const s=l[0]==="null"?"null":"boolean";t.push({text:l[0],kind:s}),n+=l[0].length;continue}const a=/^(?::|,|\{|\}|\[|\])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function jf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("<!--")){t.push({text:r,kind:"comment"});break}const i=/^(<\/?[\w:-]+)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([\w:-]+)(=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:'[^']*'|"[^"]*")/.exec(r);if(l){t.push({text:l[0],kind:"string"}),n+=l[0].length;continue}const a=/^(?:\/?>)/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Bf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("/*")){t.push({text:r,kind:"comment"});break}const i=/^(?:'[^']*'|"[^"]*")/.exec(r);if(i){t.push({text:i[0],kind:"string"}),n+=i[0].length;continue}const o=/^([A-Za-z-]+)(\s*:)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=/^(?:#(?:[\da-fA-F]{3,8})|\d+(?:\.\d+)?(?:px|rem|em|vh|vw|%)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:@media|@supports|@import|@keyframes)\b/.exec(r);if(a){t.push({text:a[0],kind:"keyword"}),n+=a[0].length;continue}const s=/^(?:[{}:;(),.>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Vf(e){return et(e,kf,"--")}function Uf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^([A-Za-z0-9_.-]+)(\s*:)/.exec(r);if(i){t.push({text:i[1]??"",kind:"attr"}),t.push({text:i[2]??"",kind:"operator"}),n+=i[0].length;continue}const o=/^(?:'[^']*'|"[^"]*")/.exec(r);if(o){t.push({text:o[0],kind:"string"}),n+=o[0].length;continue}const l=/^(?:-?\d+(?:\.\d+)?)/.exec(r);if(l){t.push({text:l[0],kind:"number"}),n+=l[0].length;continue}const a=/^(?:true|false|yes|no|null|~)\b/i.exec(r);if(a){const u=a[0].toLowerCase(),f=u==="null"||u==="~"?"null":"boolean";t.push({text:a[0],kind:f}),n+=a[0].length;continue}const s=/^(?:[-?:,[\]{}|>])/.exec(r);if(s){t.push({text:s[0],kind:"operator"}),n+=s[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Hf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(\[\[?[^\]]+\]?\])/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^([A-Za-z0-9_.-]+)(\s*=)/.exec(r);if(o){t.push({text:o[1]??"",kind:"attr"}),t.push({text:o[2]??"",kind:"operator"}),n+=o[0].length;continue}const l=Et(r,{trueValues:["true"],falseValues:["false"],nullValues:[]});if(l){t.push(...l.tokens),n+=l.length;continue}const a=/^(?:[,[\]{}])/.exec(r);if(a){t.push({text:a[0],kind:"operator"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Mi(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=r.trimStart();if(i.startsWith(";")||i.startsWith("#")){t.push({text:r,kind:"comment"});break}const o=/^(\[[^\]]+\])/.exec(r);if(o){t.push({text:o[0],kind:"tag"}),n+=o[0].length;continue}const l=/^([A-Za-z0-9_.-]+)(\s*[=:])/.exec(r);if(l){t.push({text:l[1]??"",kind:"attr"}),t.push({text:l[2]??"",kind:"operator"}),n+=l[0].length;continue}const a=Et(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(a){t.push(...a.tokens),n+=a.length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Wf(e){if(e.trimStart().startsWith("#"))return[{text:e,kind:"comment"}];const n=/^(\s*)(export)(\s+)/.exec(e),r=n?n[0].length:0,i=[];n&&(i.push({text:n[1]??"",kind:"plain"}),i.push({text:n[2]??"",kind:"keyword"}),i.push({text:n[3]??"",kind:"plain"}));const o=e.slice(r),l=/^([A-Za-z_][A-Za-z0-9_]*)(=)/.exec(o);if(!l)return Mi(e);i.push({text:l[1]??"",kind:"attr"}),i.push({text:l[2]??"",kind:"operator"});const a=o.slice(l[0].length),s=Et(a,{trueValues:["true"],falseValues:["false"],nullValues:["null"]});return s?(i.push(...s.tokens),i):(i.push({text:a,kind:"plain"}),i)}function $f(e){return An(e,{commentPrefixes:["#","!"],allowSection:!1,delimiters:["=",":"]})}function qf(e){return An(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["=",":"]})}function Yf(e){return An(e,{commentPrefixes:["#",";"],allowSection:!0,delimiters:["="]})}function Xf(e){return et(e,yf,"#")}function Gf(e){const t=e.trimStart();if(!t)return[];if(t.startsWith("#"))return[{text:e,kind:"comment"}];if(t.startsWith("!")){const n=e.length-t.length,r=e.slice(0,n),i=t.slice(1);return[{text:r,kind:"plain"},{text:"!",kind:"operator"},{text:i,kind:"string"}]}return[{text:e,kind:"string"}]}function Qf(e){const t=[];let n=0;for(;n<e.length;){const r=e.slice(n);if(r.startsWith("#")){t.push({text:r,kind:"comment"});break}const i=/^(?:\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:[.,]\d{3,6})?(?:Z|[+-]\d{2}:\d{2})?)/.exec(r);if(i){t.push({text:i[0],kind:"tag"}),n+=i[0].length;continue}const o=/^(?:\[(TRACE|DEBUG|INFO|WARN|WARNING|ERROR|FATAL)\])/.exec(r);if(o){t.push({text:r.slice(0,o[0].length),kind:"keyword"}),n+=o[0].length;continue}const l=/^[A-Za-z_][\w-]*/.exec(r);if(l){const s=l[0];wf.has(s.toLowerCase())?t.push({text:s,kind:"keyword"}):t.push({text:s,kind:"plain"}),n+=s.length;continue}const a=/^(?:\d+(?:\.\d+)?)/.exec(r);if(a){t.push({text:a[0],kind:"number"}),n+=a[0].length;continue}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function An(e,t){const n=e.trimStart();if(t.commentPrefixes.some(s=>n.startsWith(s)))return[{text:e,kind:"comment"}];if(t.allowSection){const s=/^(\[[^\]]+\])/.exec(e);if(s)return[{text:s[0],kind:"tag"}]}const r=/^([A-Za-z0-9_.\-*?]+)(\s*(?:=|:))/.exec(e);if(!r)return[{text:e,kind:"plain"}];const i=(r[2]??"").trim();if(!t.delimiters.includes(i))return[{text:e,kind:"plain"}];const o=[{text:r[1]??"",kind:"attr"},{text:r[2]??"",kind:"operator"}],l=e.slice(r[0].length),a=Zf(l);return a.length&&o.push(...a),o}function Zf(e){if(!e)return[];const t=[];let n=0;for(;n<e.length;){const r=e.slice(n),i=Et(r,{trueValues:["true","yes","on"],falseValues:["false","no","off"],nullValues:["null"]});if(i){t.push(...i.tokens),n+=i.length;continue}if(r.startsWith("#")||r.startsWith(";")){t.push({text:r,kind:"comment"});break}t.push({text:r[0]??"",kind:"plain"}),n+=1}return t}function Et(e,t){const n=/^(?:'[^']*'|"[^"]*")/.exec(e);if(n)return{tokens:[{text:n[0],kind:"string"}],length:n[0].length};const r=/^(?:-?\d+(?:\.\d+)?)/.exec(e);if(r)return{tokens:[{text:r[0],kind:"number"}],length:r[0].length};const i=/^[A-Za-z0-9_.:+/-]+/.exec(e);if(!i)return null;const o=i[0],l=o.toLowerCase();return t.trueValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.falseValues.includes(l)?{tokens:[{text:o,kind:"boolean"}],length:o.length}:t.nullValues.includes(l)?{tokens:[{text:o,kind:"null"}],length:o.length}:{tokens:[{text:o,kind:"plain"}],length:o.length}}function zn(e){var r,i;if(!e)return"plain";const t=((r=e.split(/[\\/]/).pop())==null?void 0:r.toLowerCase())??"";if(t===".env"||t.startsWith(".env."))return"env";if(t===".editorconfig")return"editorconfig";if(t==="dockerfile"||t.endsWith(".dockerfile"))return"dockerfile";if(t===".gitignore")return"gitignore";switch(((i=e.split(".").pop())==null?void 0:i.toLowerCase())??""){case"md":case"markdown":return"markdown";case"ts":case"tsx":return"typescript";case"js":case"jsx":case"mjs":case"cjs":return"javascript";case"json":return"json";case"log":return"log";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"conf":return"conf";case"dockerfile":return"dockerfile";case"css":case"scss":case"less":return"css";case"html":case"htm":return"html";case"xml":case"svg":return"xml";case"py":return"python";case"sh":case"bash":case"zsh":return"shell";case"sql":return"sql";case"yml":case"yaml":return"yaml";case"rs":return"rust";case"go":return"go";case"java":return"java";case"c":case"h":case"cpp":case"cc":case"hpp":return"cpp";default:return"plain"}}function It(e){const t=e.toLowerCase();switch(t){case"ts":case"tsx":case"typescript":return"typescript";case"js":case"jsx":case"javascript":return"javascript";case"bash":case"shell":case"sh":case"zsh":return"shell";case"md":case"markdown":return"markdown";case"properties":return"properties";case"toml":return"toml";case"ini":return"ini";case"env":return"env";case"conf":return"conf";case"editorconfig":return"editorconfig";case"dockerfile":return"dockerfile";case"gitignore":return"gitignore";case"log":return"log";default:return t}}function Jf(e){const t=It(e);return t==="json"||t==="yaml"||t==="toml"||t==="ini"||t==="env"||t==="properties"||t==="conf"||t==="editorconfig"||t==="dockerfile"||t==="gitignore"}function Di(e){switch(It(e)){case"typescript":return"TypeScript";case"javascript":return"JavaScript";case"markdown":return"Markdown";case"json":return"JSON";case"properties":return"Properties";case"toml":return"TOML";case"ini":return"INI";case"env":return"ENV";case"conf":return"CONF";case"editorconfig":return"EditorConfig";case"dockerfile":return"Dockerfile";case"gitignore":return"GitIgnore";case"log":return"Log";case"css":return"CSS";case"html":return"HTML";case"xml":return"XML";case"python":return"Python";case"shell":return"Shell";case"sql":return"SQL";case"yaml":return"YAML";case"rust":return"Rust";case"go":return"Go";case"java":return"Java";case"cpp":return"C/C++";default:return j("conversation.fileViewerPlainText")}}function Kf(e){return zn(e)==="markdown"}function eh(e){return zn(e)==="html"}function Zt(e,t){return e instanceof _i?e.message:t}function th(e){const t=[],n=e.replace(/\r\n/g,`
30
30
  `).split(`
31
31
  `);let r=0,i=0;for(const o of n){if(o.startsWith("diff --git")||o.startsWith("index ")||o.startsWith("--- ")||o.startsWith("+++ ")){t.push({kind:"meta",text:o,oldLineNo:null,newLineNo:null});continue}const l=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);if(l){r=parseInt(l[1],10),i=parseInt(l[2],10),t.push({kind:"hunk",text:o,oldLineNo:null,newLineNo:null});continue}if(o.startsWith(" ")||o===""){t.push({kind:"context",text:o.slice(1),oldLineNo:r,newLineNo:i}),r++,i++;continue}if(o.startsWith("+")){t.push({kind:"add",text:o.slice(1),oldLineNo:null,newLineNo:i}),i++;continue}if(o.startsWith("-")){t.push({kind:"remove",text:o.slice(1),oldLineNo:r,newLineNo:null}),r++;continue}t.push({kind:"meta",text:o,oldLineNo:null,newLineNo:null})}return t}function nh(e){if(!(e!=null&&e.trim()))return[];const t=th(e),n=[];let r=0,i=[];function o(){if(i.length===0){r=0;return}const l=r>0?"modify":"add";rh(n,i,l),r=0,i=[]}for(const l of t){if(l.kind==="remove"){r+=1;continue}if(l.kind==="add"){l.newLineNo!==null&&i.push(l.newLineNo);continue}o()}return o(),n}function rh(e,t,n){const r=t.filter(l=>l>0);if(r.length===0)return;let i=r[0]??1,o=i;for(let l=1;l<r.length;l+=1){const a=r[l]??o;if(a===o+1){o=a;continue}e.push({line:i,span:o-i+1,kind:n}),i=a,o=a}e.push({line:i,span:o-i+1,kind:n})}function ih({markers:e,totalLines:t,scrollContainerRef:n}){const[r,i]=q.useState({top:0,height:0});if(q.useEffect(()=>{const l=n.current;if(!l){i({top:0,height:0});return}const a=l;function s(){const{clientHeight:u,scrollHeight:f,scrollTop:c}=a;if(f<=0||u<=0||f<=u){i({top:0,height:0});return}const p=u/f,h=Math.min(100,Math.max(12,p*100)),g=f-u,b=Math.max(0,100-h),S=g<=0?0:c/g*b;i({top:S,height:h})}return s(),a.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",s),()=>{a.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[n]),e.length===0&&r.height===0)return null;const o=Math.max(t,1);return T.jsxs("div",{className:"file-overview-ruler","data-testid":"file-overview-ruler","aria-hidden":"true",children:[e.map(l=>{const a=(l.line-1)/o*100,s=Math.max(2,l.span/o*100);return T.jsx("div",{className:`file-overview-marker is-${l.kind}`,"data-kind":l.kind,style:{top:`${a}%`,height:`${s}%`}},`${l.kind}-${l.line}-${l.span}`)}),r.height>0?T.jsx("div",{className:"file-overview-viewport",style:{top:`${r.top}%`,height:`${r.height}%`}}):null]})}function ch(e){const t=e.toLowerCase();if(t===".env"||t.startsWith(".env."))return"ENV";if(t.endsWith(".d.ts"))return"DTS";switch(t.includes(".")?t.slice(t.lastIndexOf(".")+1):""){case"ts":return"TS";case"tsx":return"TSX";case"js":return"JS";case"jsx":return"JSX";case"json":return"{}";case"md":return"MD";case"css":return"CSS";case"scss":return"SASS";case"html":return"HTML";case"yml":case"yaml":return"YAML";case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return"IMG";case"txt":return"TXT";default:return"FILE"}}function fh(e){const t=e.toLowerCase();return t===".env"||t.startsWith(".env.")?"env":t.endsWith(".md")?"md":t.endsWith(".css")||t.endsWith(".scss")?"style":t.endsWith(".png")||t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".gif")||t.endsWith(".svg")||t.endsWith(".webp")?"image":t.endsWith(".ts")||t.endsWith(".tsx")||t.endsWith(".js")||t.endsWith(".jsx")?"code":t.endsWith(".json")||t.endsWith(".yml")||t.endsWith(".yaml")?"data":"default"}export{uh as F,Ks as M,ch as a,fh as b,pf as r};