@inkeep/open-knowledge 0.0.0-dev-20260424235440 → 0.0.0-dev-20260425193248

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 (92) hide show
  1. package/dist/{banner-CI3--er0.mjs → banner-B9XXjTZc.mjs} +2 -2
  2. package/dist/{chokidar-Z9-8o-jG.mjs → chokidar-DhL3M6Oj.mjs} +1 -1
  3. package/dist/cli.mjs +14 -14
  4. package/dist/colors-CMt7h9Vn.mjs +1 -0
  5. package/dist/{colors-Cmha5EZJ.mjs → colors-Jf5QUiX2.mjs} +1 -1
  6. package/dist/constants-BQaeExTr.mjs +2 -0
  7. package/dist/dist-Bx295PM_.mjs +1 -0
  8. package/dist/{src-CB-sXsMW.mjs → dist-h83E8Lop.mjs} +75 -75
  9. package/dist/{src-H34RCSr9.mjs → dist-wAieHPG9.mjs} +23 -23
  10. package/dist/{esm-BbkJd7ro.mjs → esm-DcyORBXm.mjs} +1 -1
  11. package/dist/{execAsync-CUbOIvpN.mjs → execAsync-CUVyYd50.mjs} +1 -1
  12. package/dist/{execAsync-CjzNx_Wg.mjs → execAsync-DXwNXlSG.mjs} +1 -1
  13. package/dist/{execAsync-xymjJFLm.mjs → execAsync-r1zz6x3t.mjs} +1 -1
  14. package/dist/{getMachineId-bsd-B_JlAoG9.mjs → getMachineId-bsd-BrpAo1fJ.mjs} +2 -2
  15. package/dist/{getMachineId-bsd-CMAUw13R.mjs → getMachineId-bsd-DZHdCHYD.mjs} +2 -2
  16. package/dist/{getMachineId-bsd-DrOrzTD2.mjs → getMachineId-bsd-o7HphUWK.mjs} +2 -2
  17. package/dist/{getMachineId-darwin-BQcf5peQ.mjs → getMachineId-darwin-3D3eRDVl.mjs} +2 -2
  18. package/dist/{getMachineId-darwin-DC2qb-xd.mjs → getMachineId-darwin-CsteOFjK.mjs} +2 -2
  19. package/dist/{getMachineId-darwin-DTGIdpu7.mjs → getMachineId-darwin-D-BjJUXV.mjs} +2 -2
  20. package/dist/{getMachineId-linux-CMta7vmz.mjs → getMachineId-linux-BELE5feP.mjs} +2 -2
  21. package/dist/{getMachineId-linux-nez-pYOw.mjs → getMachineId-linux-C-EpqTRh.mjs} +2 -2
  22. package/dist/{getMachineId-linux-C3A6DqVu.mjs → getMachineId-linux-CceeieLZ.mjs} +2 -2
  23. package/dist/{getMachineId-unsupported-gFGrtRr7.mjs → getMachineId-unsupported-C9qPEPHy.mjs} +2 -2
  24. package/dist/{getMachineId-unsupported-j-7WDfTT.mjs → getMachineId-unsupported-CUPNvbj5.mjs} +2 -2
  25. package/dist/{getMachineId-unsupported-BrxgPAkN.mjs → getMachineId-unsupported-CrmDv6SC.mjs} +2 -2
  26. package/dist/{getMachineId-win-CfF1zVez.mjs → getMachineId-win-AH3HxM3-.mjs} +2 -2
  27. package/dist/{getMachineId-win-D8Js6D_D.mjs → getMachineId-win-BHtOEO59.mjs} +2 -2
  28. package/dist/{getMachineId-win-DsIEIIis.mjs → getMachineId-win-CFHq48vo.mjs} +2 -2
  29. package/dist/git-handle-BhGnmvTB-BLKTZ5Yk.mjs +1 -0
  30. package/dist/git-handle-BhGnmvTB-DnqwJBAv.mjs +2 -0
  31. package/dist/index.mjs +1 -1
  32. package/dist/init-B8Nr-WHf.mjs +1 -0
  33. package/dist/init-DaTddrbM.mjs +1 -0
  34. package/dist/{init-0LxWJ-6l.mjs → init-Itm712r0.mjs} +2 -2
  35. package/dist/{init-CUmfZczR.mjs → init-NMjOmrTP.mjs} +5 -5
  36. package/dist/{is-object-7k010cEq.mjs → is-object-CEU0BgQ5.mjs} +1 -1
  37. package/dist/{keepalive-CfaIYv9f.mjs → keepalive-DCcA7pmC.mjs} +1 -1
  38. package/dist/loader-DW8bVj-Z.mjs +1 -0
  39. package/dist/loader-DkbY6ZLN.mjs +3 -0
  40. package/dist/{open-browser-T-bOz6ZQ.mjs → open-browser-ryHU9Kmc.mjs} +1 -1
  41. package/dist/paths-B8oV95O5.mjs +1 -0
  42. package/dist/paths-SX6F7bew.mjs +2 -0
  43. package/dist/preview-QqXnlaPm.mjs +1 -0
  44. package/dist/preview-RWJaR_PK.mjs +3 -0
  45. package/dist/public/assets/ActivityModeContent-DgzyXqn2.js +2 -0
  46. package/dist/public/assets/DocumentContext-sx4y_fGB.js +5 -0
  47. package/dist/public/assets/GraphPanel-D8k5I70O.js +46 -0
  48. package/dist/public/assets/McpConsentDialogBody-DnEgm77n.js +1 -0
  49. package/dist/public/assets/{PageListContext-DdGQSVEJ.js → PageListContext-BMPOeSCn.js} +72 -72
  50. package/dist/public/assets/{SourceEditor-C2oyeI25.js → SourceEditor-Buo7XU1f.js} +3 -3
  51. package/dist/public/assets/{clipboard-DRhtxu43.js → clipboard-Cww2W4TE.js} +7 -7
  52. package/dist/public/assets/{index-D_7iKKj-.js → index-CSqyIoHN.js} +13 -13
  53. package/dist/public/assets/index-DLJBF2zC.css +1 -0
  54. package/dist/public/assets/propagation-api-Bugyj7xy.js +1 -0
  55. package/dist/public/assets/telemetry-impl-D8K_lJGH.js +2 -0
  56. package/dist/public/assets/{toggle-group-B86VAmbm.js → toggle-group-DHcz1Spj.js} +1 -1
  57. package/dist/public/assets/tooltip-Be1xrEel.js +1 -0
  58. package/dist/public/index.html +19 -19
  59. package/dist/rolldown-runtime-wcPFST8Q-DriDJLQM.mjs +2 -0
  60. package/dist/server-lock-CH0GCP_4-DCYOtKMW.mjs +2 -0
  61. package/dist/server-lock-CH0GCP_4-DHiJeSSV.mjs +1 -0
  62. package/dist/src-D7CWqlQk.mjs +1 -0
  63. package/dist/start-CJe8n54q.mjs +1 -0
  64. package/dist/start-D5z6-Rq6.mjs +2 -0
  65. package/dist/{wrapper-BlhyhsXg.mjs → wrapper-DDHUdYtj.mjs} +1 -1
  66. package/package.json +2 -2
  67. package/dist/colors-CxLEz90E.mjs +0 -1
  68. package/dist/constants-Bp2eH26E.mjs +0 -2
  69. package/dist/git-handle-C7se1dk0.mjs +0 -2
  70. package/dist/git-handle-DmfLnwyi.mjs +0 -1
  71. package/dist/init-CQtHg31y.mjs +0 -1
  72. package/dist/init-EmyViDSm.mjs +0 -1
  73. package/dist/loader-5fUYhvT7.mjs +0 -3
  74. package/dist/loader-CLKYIpRM.mjs +0 -1
  75. package/dist/paths-Bmv6OTgc.mjs +0 -1
  76. package/dist/paths-D7eyE9c-.mjs +0 -2
  77. package/dist/preview-Bwvil0xG.mjs +0 -1
  78. package/dist/preview-DW48ZUVb.mjs +0 -3
  79. package/dist/public/assets/ActivityModeContent-DER5Nogg.js +0 -2
  80. package/dist/public/assets/DocumentContext--jj-O3yz.js +0 -5
  81. package/dist/public/assets/GraphPanel-CBqnoz3m.js +0 -46
  82. package/dist/public/assets/McpConsentDialogBody-D_7y-PBs.js +0 -1
  83. package/dist/public/assets/index-CIIADYsi.css +0 -1
  84. package/dist/public/assets/propagation-api-CQodqriD.js +0 -1
  85. package/dist/public/assets/telemetry-impl-BTqkcpTj.js +0 -2
  86. package/dist/public/assets/tooltip-C2q723j6.js +0 -1
  87. package/dist/server-lock-4vgF5yho.mjs +0 -2
  88. package/dist/server-lock-CJkiM3qX.mjs +0 -1
  89. package/dist/src-CO-0JWV1.mjs +0 -1
  90. package/dist/src-DNH9XQcP.mjs +0 -1
  91. package/dist/start-D22sG9zf.mjs +0 -1
  92. package/dist/start-DbI7KgzR.mjs +0 -2
@@ -99,14 +99,14 @@ ${t.renderChildren(e.content||[],`
99
99
  `);s+=e.type===`paragraph`?`
100
100
 
101
101
  ${n}`:`
102
- ${n}`}}),s}var Yp=new WeakMap;function Xp(e,t){let n=Yp.get(e);if(!n){let t={callbacks:new Set,rafId:null,handler:()=>{t.rafId!==null&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(()=>{t.rafId=null,t.callbacks.forEach(e=>e())})}};Yp.set(e,t),e.on(`update`,t.handler),n=t}n.callbacks.add(t)}function Zp(e,t){let n=Yp.get(e);n&&(n.callbacks.delete(t),n.callbacks.size===0&&(n.rafId!==null&&cancelAnimationFrame(n.rafId),e.off(`update`,n.handler),Yp.delete(e)))}function Qp(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var $p=class e extends ap{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},em=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t;let{view:n}=this.editor,r=e.target,i=r.nodeType===3?r.parentElement?.closest(`[data-drag-handle]`):r.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(r)||!i)return;let a=0,o=0;if(this.dom!==i){let t=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;a=n.x-t.x+r,o=n.y-t.y+s}let s=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();s.style.width=`${Math.round(e.width)}px`,s.style.height=`${Math.round(e.height)}px`,s.style.boxSizing=`border-box`,s.style.pointerEvents=`none`}catch{}let c=null;try{c=document.createElement(`div`),c.style.position=`absolute`,c.style.top=`-9999px`,c.style.left=`-9999px`,c.style.pointerEvents=`none`,c.appendChild(s),document.body.appendChild(c),(t=e.dataTransfer)==null||t.setDragImage(s,a,o)}finally{c&&setTimeout(()=>{try{c?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=P.create(n.state.doc,l),d=n.state.tr.setSelection(u);n.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!(this.dom.contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type.startsWith(`drag`),r=e.type===`dragover`||e.type===`dragenter`,i=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!i&&!n)return!0;let{isEditable:a}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,c=P.isSelectable(this.node),l=e.type===`copy`,u=e.type===`paste`,d=e.type===`cut`,f=e.type===`mousedown`;if(!s&&c&&n&&e.target===this.dom&&e.preventDefault(),s&&n&&!o&&e.target===this.dom)return e.preventDefault(),!1;if(s&&a&&!o&&f){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(o||r||i||l||u||d||f&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.dom.contains(e.target)&&e.type===`childList`&&(Uu()||Hu())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`?(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0):!1})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function tm(e){return new cp({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=Ld(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(lf(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var nm=t(r(),1),rm=a();function im(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function am(e){let t=im(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function om(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function sm(e){let t=new Set;function n(e){for(let r of e)r.kind===`folder`&&(t.add(r.path),n(r.children))}return n(e),t}function cm(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function lm(e,t){let n=t.trim(),r=n.endsWith(`.md`)?n:`${n}.md`;return e?`${e}/${r}`:r}function um(e,t){let n=t.trim();if(n.includes(`/`)){let t=n.endsWith(`.md`)?n:`${n}.md`;return e?`${e}/${t}`:t}return e?`${e}/${n}/index.md`:`${n}/index.md`}function dm(e){let t=[];for(let n of e){let e=n.docName.split(`/`).filter(Boolean),r=t;for(let[t,i]of e.entries()){let a=e.slice(0,t+1).join(`/`),o=t===e.length-1,s=r.find(e=>e.path===a);s||(s={name:i,path:a,kind:o?`file`:`folder`,children:[],...o&&{isSymlink:n.isSymlink,canonicalDocName:n.canonicalDocName,targetPath:n.targetPath}},r.push(s)),r=s.children}}function n(e){e.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`folder`?-1:1);for(let t of e)n(t.children)}return n(t),t}function fm(e){return im(e).replace(/\/+$/g,``)}function pm(e){let t=new Set;for(let n of e)for(let e of om(n))t.add(e);return t}function mm(e,t){let n=fm(e);if(!n)return{kind:`missing`,target:n};if(t.pages.has(n))return{kind:`doc`,target:n,docName:n};let r=`${n}/index`;if(t.pages.has(r))return{kind:`folder-index`,target:n,folderPath:n,docName:r,noteKind:`canonical-index`};let i=n.split(`/`).pop(),a=i?`${n}/${i}`:null;return a&&t.pages.has(a)?{kind:`folder-index`,target:n,folderPath:n,docName:a,noteKind:`legacy-folder-note`}:(t.folderPaths??pm(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function hm(e){switch(e.kind){case`doc`:case`folder-index`:return e.docName;case`missing`:return e.target;case`folder`:return null}}function gm(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?vm(e.position):`start`in e||`end`in e?vm(e):`line`in e||`column`in e?_m(e):``}function _m(e){return ym(e&&e.line)+`:`+ym(e&&e.column)}function vm(e){return _m(e&&e.start)+`-`+_m(e&&e.end)}function ym(e){return e&&typeof e==`number`?e:1}var bm=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=gm(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};bm.prototype.file=``,bm.prototype.name=``,bm.prototype.reason=``,bm.prototype.message=``,bm.prototype.stack=``,bm.prototype.column=void 0,bm.prototype.line=void 0,bm.prototype.ancestors=void 0,bm.prototype.cause=void 0,bm.prototype.fatal=void 0,bm.prototype.place=void 0,bm.prototype.ruleId=void 0,bm.prototype.source=void 0;var xm=2e3;function Sm(e){let t=Date.now();for(let[n,r]of e.entries()){let i=r;i.timestamp&&t-i.timestamp>3e4&&e.delete(n)}}function Cm(e,t){for(let[,n]of e.entries()){let e=n;if(e.timestamp&&e.timestamp>t)return!0}return!1}var wm=`__system__`,Tm=[`incoming`,`outgoing`,`both`];function Em(e){return Tm.includes(e)}var Dm=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],Om=4,km=/^```([a-z]+)?[\s\n]$/,Am=/^~~~([a-z]+)?[\s\n]$/,jm=$p.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Om,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,Ud(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
102
+ ${n}`}}),s}var Yp=new WeakMap;function Xp(e,t){let n=Yp.get(e);if(!n){let t={callbacks:new Set,rafId:null,handler:()=>{t.rafId!==null&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(()=>{t.rafId=null,t.callbacks.forEach(e=>e())})}};Yp.set(e,t),e.on(`update`,t.handler),n=t}n.callbacks.add(t)}function Zp(e,t){let n=Yp.get(e);n&&(n.callbacks.delete(t),n.callbacks.size===0&&(n.rafId!==null&&cancelAnimationFrame(n.rafId),e.off(`update`,n.handler),Yp.delete(e)))}function Qp(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var $p=class e extends ap{constructor(){super(...arguments),this.type=`node`}static create(t={}){return new e(typeof t==`function`?t():t)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},em=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t;let{view:n}=this.editor,r=e.target,i=r.nodeType===3?r.parentElement?.closest(`[data-drag-handle]`):r.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(r)||!i)return;let a=0,o=0;if(this.dom!==i){let t=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;a=n.x-t.x+r,o=n.y-t.y+s}let s=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();s.style.width=`${Math.round(e.width)}px`,s.style.height=`${Math.round(e.height)}px`,s.style.boxSizing=`border-box`,s.style.pointerEvents=`none`}catch{}let c=null;try{c=document.createElement(`div`),c.style.position=`absolute`,c.style.top=`-9999px`,c.style.left=`-9999px`,c.style.pointerEvents=`none`,c.appendChild(s),document.body.appendChild(c),(t=e.dataTransfer)==null||t.setDragImage(s,a,o)}finally{c&&setTimeout(()=>{try{c?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=P.create(n.state.doc,l),d=n.state.tr.setSelection(u);n.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!(this.dom.contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type.startsWith(`drag`),r=e.type===`dragover`||e.type===`dragenter`,i=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!i&&!n)return!0;let{isEditable:a}=this.editor,{isDragging:o}=this,s=!!this.node.type.spec.draggable,c=P.isSelectable(this.node),l=e.type===`copy`,u=e.type===`paste`,d=e.type===`cut`,f=e.type===`mousedown`;if(!s&&c&&n&&e.target===this.dom&&e.preventDefault(),s&&n&&!o&&e.target===this.dom)return e.preventDefault(),!1;if(s&&a&&!o&&f){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(o||r||i||l||u||d||f&&c)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.dom.contains(e.target)&&e.type===`childList`&&(Uu()||Hu())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`?(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0):!1})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function tm(e){return new cp({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=Ld(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(lf(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var nm=t(r(),1),rm=a();function im(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function am(e){let t=im(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function om(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function sm(e){let t=new Set;function n(e){for(let r of e)r.kind===`folder`&&(t.add(r.path),n(r.children))}return n(e),t}function cm(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function lm(e,t){let n=t.trim(),r=n.endsWith(`.md`)?n:`${n}.md`;return e?`${e}/${r}`:r}function um(e,t){let n=t.trim();if(n.includes(`/`)){let t=n.endsWith(`.md`)?n:`${n}.md`;return e?`${e}/${t}`:t}return e?`${e}/${n}/index.md`:`${n}/index.md`}function dm(e){let t=[];for(let n of e){let e=n.docName.split(`/`).filter(Boolean),r=t;for(let[t,i]of e.entries()){let a=e.slice(0,t+1).join(`/`),o=t===e.length-1,s=r.find(e=>e.path===a);s||(s={name:i,path:a,kind:o?`file`:`folder`,children:[],...o&&{isSymlink:n.isSymlink,canonicalDocName:n.canonicalDocName,targetPath:n.targetPath}},r.push(s)),r=s.children}}function n(e){e.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`folder`?-1:1);for(let t of e)n(t.children)}return n(t),t}function fm(e){return im(e).replace(/\/+$/g,``)}function pm(e){let t=new Set;for(let n of e)for(let e of om(n))t.add(e);return t}function mm(e,t){let n=fm(e);if(!n)return{kind:`missing`,target:n};if(t.pages.has(n))return{kind:`doc`,target:n,docName:n};let r=`${n}/index`;if(t.pages.has(r))return{kind:`folder-index`,target:n,folderPath:n,docName:r,noteKind:`canonical-index`};let i=n.split(`/`).pop(),a=i?`${n}/${i}`:null;return a&&t.pages.has(a)?{kind:`folder-index`,target:n,folderPath:n,docName:a,noteKind:`legacy-folder-note`}:(t.folderPaths??pm(t.pages)).has(n)?{kind:`folder`,target:n,folderPath:n}:{kind:`missing`,target:n}}function hm(e){switch(e.kind){case`doc`:case`folder-index`:return e.docName;case`missing`:return e.target;case`folder`:return null}}function gm(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?vm(e.position):`start`in e||`end`in e?vm(e):`line`in e||`column`in e?_m(e):``}function _m(e){return ym(e&&e.line)+`:`+ym(e&&e.column)}function vm(e){return _m(e&&e.start)+`-`+_m(e&&e.end)}function ym(e){return e&&typeof e==`number`?e:1}var bm=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=gm(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};bm.prototype.file=``,bm.prototype.name=``,bm.prototype.reason=``,bm.prototype.message=``,bm.prototype.stack=``,bm.prototype.column=void 0,bm.prototype.line=void 0,bm.prototype.ancestors=void 0,bm.prototype.cause=void 0,bm.prototype.fatal=void 0,bm.prototype.place=void 0,bm.prototype.ruleId=void 0,bm.prototype.source=void 0;var xm=4,Sm=/^```([a-z]+)?[\s\n]$/,Cm=/^~~~([a-z]+)?[\s\n]$/,wm=$p.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:xm,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,Ud(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
103
103
  `):`\`\`\`${r}
104
104
 
105
- \`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Om,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
105
+ \`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??xm,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
106
106
  `,`
107
107
  `).split(`
108
108
  `).map(e=>o+e).join(`
109
- `);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??Om,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
109
+ `);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??xm,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
110
110
  `,`
111
111
  `).split(`
112
112
  `),c=0,l=0,u=r-a;for(let e=0;e<s.length;e+=1){if(l+s[e].length>=u){c=e;break}l+=s[e].length+1}let d=s[c].match(/^ */)?.[0]||``,f=Math.min(d.length,t);if(f===0)return!0;let p=a;for(let e=0;e<c;e+=1)p+=s[e].length+1;return e.delete(p,p+f),r-p<=f&&e.setSelection(N.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:i,to:a}=r,o=n.doc.textBetween(i,a,`
@@ -115,107 +115,88 @@ ${n}`}}),s}var Yp=new WeakMap;function Xp(e,t){let n=Yp.get(e);if(!n){let t={cal
115
115
  `).map(e=>{let n=e.match(/^ */)?.[0]||``,r=Math.min(n.length,t);return e.slice(r)}).join(`
116
116
  `);return e.replaceWith(i,a,n.schema.text(o)),!0}):!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
117
117
 
118
- `);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(M.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[Np({find:km,type:this.type,getAttributes:e=>({language:e[1]})}),Np({find:Am,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Vi({key:new Wi(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
119
- `));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(N.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),Mm=jm.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3}}}}),Nm=(e,t)=>{if(e===`slot`)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);return[e,r,n]},Pm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Fm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Im=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Lm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Rm=op.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Nm(`strong`,{...Ud(this.options.HTMLAttributes,e),children:Nm(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[jp({find:Pm,type:this.type}),jp({find:Im,type:this.type})]},addPasteRules(){return[tm({find:Fm,type:this.type}),tm({find:Lm,type:this.type})]}}),zm=Rm,Bm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Vm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Hm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Um=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Wm=op.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,Ud(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[jp({find:Bm,type:this.type}),jp({find:Hm,type:this.type})]},addPasteRules(){return[tm({find:Vm,type:this.type}),tm({find:Um,type:this.type})]}}),Gm=Wm.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}}}),Km=zm.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}}}),qm=op.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),Jm=/^---\r?\n([\s\S]*?\r?\n)?---(\r?\n|$)/;function Ym(e){let t=e.match(Jm);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}var Xm=$p.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,Ud(this.options.HTMLAttributes,e)]},renderText(){return`
118
+ `);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(M.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[Np({find:Sm,type:this.type,getAttributes:e=>({language:e[1]})}),Np({find:Cm,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Vi({key:new Wi(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
119
+ `));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(N.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),Tm=wm,Em=(e,t)=>{if(e===`slot`)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);return[e,r,n]},Dm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Om=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,km=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Am=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,jm=op.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Em(`strong`,{...Ud(this.options.HTMLAttributes,e),children:Em(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[jp({find:Dm,type:this.type}),jp({find:km,type:this.type})]},addPasteRules(){return[tm({find:Om,type:this.type}),tm({find:Am,type:this.type})]}}),Mm=jm,Nm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Pm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Fm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Im=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Lm=op.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,Ud(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[jp({find:Nm,type:this.type}),jp({find:Fm,type:this.type})]},addPasteRules(){return[tm({find:Pm,type:this.type}),tm({find:Im,type:this.type})]}}),Rm=Lm,zm=$p.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,Ud(this.options.HTMLAttributes,e)]},renderText(){return`
120
120
  `},renderMarkdown:()=>`
121
- `,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Zm=Xm.extend({priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`}}}}),Qm=$p.create({name:`heading`,addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:`inline*`,group:`block`,defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Ud(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Np({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),$m=Qm.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`}}}}),eh=$p.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}}),th=$p.create({name:`jsxComponent`,group:`block`,atom:!0,isolating:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e==`string`?!1:{content:e.getAttribute(`data-content`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-content":e.content}]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{content:e}})}}}),nh=$p.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`inline*`,isolating:!0,selectable:!0,priority:60,addAttributes(){return{attributes:{default:[]},sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-jsx-inline]`,getAttrs:e=>typeof e==`string`?!1:{sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-jsx-inline":``,"data-source-raw":e.sourceRaw,contenteditable:`false`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`span`);t.setAttribute(`data-jsx-inline`,``),t.setAttribute(`contenteditable`,`false`),t.classList.add(`jsx-inline`),e.sourceRaw&&t.setAttribute(`data-source-raw`,e.sourceRaw);let n=document.createElement(`span`);return n.classList.add(`jsx-inline-content`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),rh=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,ih=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,ah=`numeric`,oh=`ascii`,sh=`alpha`,ch=`asciinumeric`,lh=`alphanumeric`,uh=`domain`,dh=`emoji`,fh=`scheme`,ph=`slashscheme`,mh=`whitespace`;function hh(e,t){return e in t||(t[e]=[]),t[e]}function gh(e,t,n){t[ah]&&(t[ch]=!0,t[lh]=!0),t[oh]&&(t[ch]=!0,t[sh]=!0),t[ch]&&(t[lh]=!0),t[sh]&&(t[lh]=!0),t[lh]&&(t[uh]=!0),t[dh]&&(t[uh]=!0);for(let r in t){let t=hh(r,n);t.indexOf(e)<0&&t.push(e)}}function _h(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function vh(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}vh.groups={},vh.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=vh.groups;let i;return t&&t.j?i=t:(i=new vh(t),n&&r&&gh(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=vh.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new vh,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new vh,a&&(r&&(o.t&&typeof o.t==`string`?gh(a,Object.assign(_h(o.t,r),n),r):n&&gh(a,n,r)),o.t=a),i.j[e]=o,o}};var I=(e,t,n,r,i)=>e.ta(t,n,r,i),yh=(e,t,n,r,i)=>e.tr(t,n,r,i),bh=(e,t,n,r,i)=>e.ts(t,n,r,i),L=(e,t,n,r,i)=>e.tt(t,n,r,i),xh=`WORD`,Sh=`UWORD`,Ch=`ASCIINUMERICAL`,wh=`ALPHANUMERICAL`,Th=`LOCALHOST`,Eh=`TLD`,Dh=`UTLD`,Oh=`SCHEME`,kh=`SLASH_SCHEME`,Ah=`NUM`,jh=`WS`,Mh=`NL`,Nh=`OPENBRACE`,Ph=`CLOSEBRACE`,Fh=`OPENBRACKET`,Ih=`CLOSEBRACKET`,Lh=`OPENPAREN`,Rh=`CLOSEPAREN`,zh=`OPENANGLEBRACKET`,Bh=`CLOSEANGLEBRACKET`,Vh=`FULLWIDTHLEFTPAREN`,Hh=`FULLWIDTHRIGHTPAREN`,Uh=`LEFTCORNERBRACKET`,Wh=`RIGHTCORNERBRACKET`,Gh=`LEFTWHITECORNERBRACKET`,Kh=`RIGHTWHITECORNERBRACKET`,qh=`FULLWIDTHLESSTHAN`,Jh=`FULLWIDTHGREATERTHAN`,Yh=`AMPERSAND`,Xh=`APOSTROPHE`,Zh=`ASTERISK`,Qh=`AT`,$h=`BACKSLASH`,eg=`BACKTICK`,tg=`CARET`,ng=`COLON`,rg=`COMMA`,ig=`DOLLAR`,ag=`DOT`,og=`EQUALS`,sg=`EXCLAMATION`,cg=`HYPHEN`,lg=`PERCENT`,ug=`PIPE`,dg=`PLUS`,fg=`POUND`,pg=`QUERY`,mg=`QUOTE`,hg=`FULLWIDTHMIDDLEDOT`,gg=`SEMI`,_g=`SLASH`,vg=`TILDE`,yg=`UNDERSCORE`,bg=`EMOJI`,xg=`SYM`,Sg=Object.freeze({__proto__:null,ALPHANUMERICAL:wh,AMPERSAND:Yh,APOSTROPHE:Xh,ASCIINUMERICAL:Ch,ASTERISK:Zh,AT:Qh,BACKSLASH:$h,BACKTICK:eg,CARET:tg,CLOSEANGLEBRACKET:Bh,CLOSEBRACE:Ph,CLOSEBRACKET:Ih,CLOSEPAREN:Rh,COLON:ng,COMMA:rg,DOLLAR:ig,DOT:ag,EMOJI:bg,EQUALS:og,EXCLAMATION:sg,FULLWIDTHGREATERTHAN:Jh,FULLWIDTHLEFTPAREN:Vh,FULLWIDTHLESSTHAN:qh,FULLWIDTHMIDDLEDOT:hg,FULLWIDTHRIGHTPAREN:Hh,HYPHEN:cg,LEFTCORNERBRACKET:Uh,LEFTWHITECORNERBRACKET:Gh,LOCALHOST:Th,NL:Mh,NUM:Ah,OPENANGLEBRACKET:zh,OPENBRACE:Nh,OPENBRACKET:Fh,OPENPAREN:Lh,PERCENT:lg,PIPE:ug,PLUS:dg,POUND:fg,QUERY:pg,QUOTE:mg,RIGHTCORNERBRACKET:Wh,RIGHTWHITECORNERBRACKET:Kh,SCHEME:Oh,SEMI:gg,SLASH:_g,SLASH_SCHEME:kh,SYM:xg,TILDE:vg,TLD:Eh,UNDERSCORE:yg,UTLD:Dh,UWORD:Sh,WORD:xh,WS:jh}),Cg=/[a-z]/,wg=/\p{L}/u,Tg=/\p{Emoji}/u,Eg=/\d/,Dg=/\s/,Og=`\r`,kg=`
122
- `,Ag=`️`,jg=`‍`,Mg=``,Ng=null,Pg=null;function Fg(e=[]){let t={};vh.groups=t;let n=new vh;Ng??=zg(rh),Pg??=zg(ih),L(n,`'`,Xh),L(n,`{`,Nh),L(n,`}`,Ph),L(n,`[`,Fh),L(n,`]`,Ih),L(n,`(`,Lh),L(n,`)`,Rh),L(n,`<`,zh),L(n,`>`,Bh),L(n,`(`,Vh),L(n,`)`,Hh),L(n,`「`,Uh),L(n,`」`,Wh),L(n,`『`,Gh),L(n,`』`,Kh),L(n,`<`,qh),L(n,`>`,Jh),L(n,`&`,Yh),L(n,`*`,Zh),L(n,`@`,Qh),L(n,"`",eg),L(n,`^`,tg),L(n,`:`,ng),L(n,`,`,rg),L(n,`$`,ig),L(n,`.`,ag),L(n,`=`,og),L(n,`!`,sg),L(n,`-`,cg),L(n,`%`,lg),L(n,`|`,ug),L(n,`+`,dg),L(n,`#`,fg),L(n,`?`,pg),L(n,`"`,mg),L(n,`/`,_g),L(n,`;`,gg),L(n,`~`,vg),L(n,`_`,yg),L(n,`\\`,$h),L(n,`・`,hg);let r=yh(n,Eg,Ah,{[ah]:!0});yh(r,Eg,r);let i=yh(r,Cg,Ch,{[ch]:!0}),a=yh(r,wg,wh,{[lh]:!0}),o=yh(n,Cg,xh,{[oh]:!0});yh(o,Eg,i),yh(o,Cg,o),yh(i,Eg,i),yh(i,Cg,i);let s=yh(n,wg,Sh,{[sh]:!0});yh(s,Cg),yh(s,Eg,a),yh(s,wg,s),yh(a,Eg,a),yh(a,Cg),yh(a,wg,a);let c=L(n,kg,Mh,{[mh]:!0}),l=L(n,Og,jh,{[mh]:!0}),u=yh(n,Dg,jh,{[mh]:!0});L(n,Mg,u),L(l,kg,c),L(l,Mg,u),yh(l,Dg,u),L(u,Og),L(u,kg),yh(u,Dg,u),L(u,Mg,u);let d=yh(n,Tg,bg,{[dh]:!0});L(d,`#`),yh(d,Tg,d),L(d,Ag,d);let f=L(d,jg);L(f,`#`),yh(f,Tg,d);let p=[[Cg,o],[Eg,i]],m=[[Cg,null],[wg,s],[Eg,a]];for(let e=0;e<Ng.length;e++)Rg(n,Ng[e],Eh,xh,p);for(let e=0;e<Pg.length;e++)Rg(n,Pg[e],Dh,Sh,m);gh(Eh,{tld:!0,ascii:!0},t),gh(Dh,{utld:!0,alpha:!0},t),Rg(n,`file`,Oh,xh,p),Rg(n,`mailto`,Oh,xh,p),Rg(n,`http`,kh,xh,p),Rg(n,`https`,kh,xh,p),Rg(n,`ftp`,kh,xh,p),Rg(n,`ftps`,kh,xh,p),gh(Oh,{scheme:!0,ascii:!0},t),gh(kh,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[fh]:!0}:{[ph]:!0};r.indexOf(`-`)>=0?i[uh]=!0:Cg.test(r)?Eg.test(r)?i[ch]=!0:i[oh]=!0:i[ah]=!0,bh(n,r,r,i)}return bh(n,`localhost`,Th,{ascii:!0}),n.jd=new vh(xg),{start:n,tokens:Object.assign({groups:t},Sg)}}function Ig(e,t){let n=Lg(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function Lg(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function Rg(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new vh(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new vh(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function zg(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Bg={defaultProtocol:`http`,events:null,format:Hg,formatHref:Hg,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Vg(e,t=null){let n=Object.assign({},Bg);e&&(n=Object.assign(n,e instanceof Vg?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Vg.prototype={o:Bg,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:Bg[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function Hg(e){return e}function Ug(e,t){this.t=`token`,this.v=e,this.tk=t}Ug.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Bg.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function Wg(e,t){class n extends Ug{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var Gg=Wg(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),Kg=Wg(`text`),qg=Wg(`nl`),Jg=Wg(`url`,{isLink:!0,toHref(e=Bg.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Th&&e[1].t===ng}}),Yg=e=>new vh(e);function Xg({groups:e}){let t=e.domain.concat([Yh,Zh,Qh,$h,eg,tg,ig,og,cg,Ah,lg,ug,dg,fg,_g,xg,vg,yg]),n=[Xh,ng,rg,ag,sg,lg,pg,mg,gg,zh,Bh,Nh,Ph,Ih,Fh,Lh,Rh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh],r=[Yh,Xh,Zh,$h,eg,tg,ig,og,cg,Nh,Ph,lg,ug,dg,fg,pg,_g,xg,vg,yg],i=Yg(),a=L(i,vg);I(a,r,a),I(a,e.domain,a);let o=Yg(),s=Yg(),c=Yg();I(i,e.domain,o),I(i,e.scheme,s),I(i,e.slashscheme,c),I(o,r,a),I(o,e.domain,o);let l=L(o,Qh);L(a,Qh,l),L(s,Qh,l),L(c,Qh,l);let u=L(a,ag);I(u,r,a),I(u,e.domain,a);let d=Yg();I(l,e.domain,d),I(d,e.domain,d);let f=L(d,ag);I(f,e.domain,d);let p=Yg(Gg);I(f,e.tld,p),I(f,e.utld,p),L(l,Th,p);let m=L(d,cg);L(m,cg,m),I(m,e.domain,d),I(p,e.domain,d),L(p,ag,f),L(p,cg,m),I(L(p,ng),e.numeric,Gg);let h=L(o,cg),g=L(o,ag);L(h,cg,h),I(h,e.domain,o),I(g,r,a),I(g,e.domain,o);let _=Yg(Jg);I(g,e.tld,_),I(g,e.utld,_),I(_,e.domain,o),I(_,r,a),L(_,ag,g),L(_,cg,h),L(_,Qh,l);let v=L(_,ng),y=Yg(Jg);I(v,e.numeric,y);let b=Yg(Jg),x=Yg();I(b,t,b),I(b,n,x),I(x,t,b),I(x,n,x),L(_,_g,b),L(y,_g,b);let S=L(s,ng),C=L(L(L(c,ng),_g),_g);I(s,e.domain,o),L(s,ag,g),L(s,cg,h),I(c,e.domain,o),L(c,ag,g),L(c,cg,h),I(S,e.domain,b),L(S,_g,b),L(S,pg,b),I(C,e.domain,b),I(C,t,b),L(C,_g,b);let w=[[Nh,Ph],[Fh,Ih],[Lh,Rh],[zh,Bh],[Vh,Hh],[Uh,Wh],[Gh,Kh],[qh,Jh]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=L(b,r);L(x,r,a),L(a,i,b);let o=Yg(Jg);I(a,t,o);let s=Yg();I(a,n),I(o,t,o),I(o,n,s),I(s,t,o),I(s,n,s),L(o,i,b),L(s,i,b)}return L(i,Th,_),L(i,Mh,qg),{start:i,tokens:Sg}}function Zg(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(Qg(Kg,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push(Qg(e,t,r))}}return o.length>0&&a.push(Qg(Kg,t,o)),a}function Qg(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var $g=typeof console<`u`&&console&&console.warn||(()=>{}),e_=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,t_={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function n_(){return vh.groups={},t_.scanner=null,t_.parser=null,t_.tokenQueue=[],t_.pluginQueue=[],t_.customSchemes=[],t_.initialized=!1,t_}function r_(e,t=!1){if(t_.initialized&&$g(`linkifyjs: already initialized - will not register custom scheme "${e}" ${e_}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
121
+ `,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Bm=zm,Vm=$p.create({name:`heading`,addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:`inline*`,group:`block`,defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Ud(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode(`heading`,{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Np({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),Hm=Vm,Um=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,Wm=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,Gm=`numeric`,Km=`ascii`,qm=`alpha`,Jm=`asciinumeric`,Ym=`alphanumeric`,Xm=`domain`,Zm=`emoji`,Qm=`scheme`,$m=`slashscheme`,eh=`whitespace`;function th(e,t){return e in t||(t[e]=[]),t[e]}function nh(e,t,n){t[Gm]&&(t[Jm]=!0,t[Ym]=!0),t[Km]&&(t[Jm]=!0,t[qm]=!0),t[Jm]&&(t[Ym]=!0),t[qm]&&(t[Ym]=!0),t[Ym]&&(t[Xm]=!0),t[Zm]&&(t[Xm]=!0);for(let r in t){let t=th(r,n);t.indexOf(e)<0&&t.push(e)}}function rh(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function ih(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}ih.groups={},ih.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=ih.groups;let i;return t&&t.j?i=t:(i=new ih(t),n&&r&&nh(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=ih.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new ih,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new ih,a&&(r&&(o.t&&typeof o.t==`string`?nh(a,Object.assign(rh(o.t,r),n),r):n&&nh(a,n,r)),o.t=a),i.j[e]=o,o}};var I=(e,t,n,r,i)=>e.ta(t,n,r,i),ah=(e,t,n,r,i)=>e.tr(t,n,r,i),oh=(e,t,n,r,i)=>e.ts(t,n,r,i),L=(e,t,n,r,i)=>e.tt(t,n,r,i),sh=`WORD`,ch=`UWORD`,lh=`ASCIINUMERICAL`,uh=`ALPHANUMERICAL`,dh=`LOCALHOST`,fh=`TLD`,ph=`UTLD`,mh=`SCHEME`,hh=`SLASH_SCHEME`,gh=`NUM`,_h=`WS`,vh=`NL`,yh=`OPENBRACE`,bh=`CLOSEBRACE`,xh=`OPENBRACKET`,Sh=`CLOSEBRACKET`,Ch=`OPENPAREN`,wh=`CLOSEPAREN`,Th=`OPENANGLEBRACKET`,Eh=`CLOSEANGLEBRACKET`,Dh=`FULLWIDTHLEFTPAREN`,Oh=`FULLWIDTHRIGHTPAREN`,kh=`LEFTCORNERBRACKET`,Ah=`RIGHTCORNERBRACKET`,jh=`LEFTWHITECORNERBRACKET`,Mh=`RIGHTWHITECORNERBRACKET`,Nh=`FULLWIDTHLESSTHAN`,Ph=`FULLWIDTHGREATERTHAN`,Fh=`AMPERSAND`,Ih=`APOSTROPHE`,Lh=`ASTERISK`,Rh=`AT`,zh=`BACKSLASH`,Bh=`BACKTICK`,Vh=`CARET`,Hh=`COLON`,Uh=`COMMA`,Wh=`DOLLAR`,Gh=`DOT`,Kh=`EQUALS`,qh=`EXCLAMATION`,Jh=`HYPHEN`,Yh=`PERCENT`,Xh=`PIPE`,Zh=`PLUS`,Qh=`POUND`,$h=`QUERY`,eg=`QUOTE`,tg=`FULLWIDTHMIDDLEDOT`,ng=`SEMI`,rg=`SLASH`,ig=`TILDE`,ag=`UNDERSCORE`,og=`EMOJI`,sg=`SYM`,cg=Object.freeze({__proto__:null,ALPHANUMERICAL:uh,AMPERSAND:Fh,APOSTROPHE:Ih,ASCIINUMERICAL:lh,ASTERISK:Lh,AT:Rh,BACKSLASH:zh,BACKTICK:Bh,CARET:Vh,CLOSEANGLEBRACKET:Eh,CLOSEBRACE:bh,CLOSEBRACKET:Sh,CLOSEPAREN:wh,COLON:Hh,COMMA:Uh,DOLLAR:Wh,DOT:Gh,EMOJI:og,EQUALS:Kh,EXCLAMATION:qh,FULLWIDTHGREATERTHAN:Ph,FULLWIDTHLEFTPAREN:Dh,FULLWIDTHLESSTHAN:Nh,FULLWIDTHMIDDLEDOT:tg,FULLWIDTHRIGHTPAREN:Oh,HYPHEN:Jh,LEFTCORNERBRACKET:kh,LEFTWHITECORNERBRACKET:jh,LOCALHOST:dh,NL:vh,NUM:gh,OPENANGLEBRACKET:Th,OPENBRACE:yh,OPENBRACKET:xh,OPENPAREN:Ch,PERCENT:Yh,PIPE:Xh,PLUS:Zh,POUND:Qh,QUERY:$h,QUOTE:eg,RIGHTCORNERBRACKET:Ah,RIGHTWHITECORNERBRACKET:Mh,SCHEME:mh,SEMI:ng,SLASH:rg,SLASH_SCHEME:hh,SYM:sg,TILDE:ig,TLD:fh,UNDERSCORE:ag,UTLD:ph,UWORD:ch,WORD:sh,WS:_h}),lg=/[a-z]/,ug=/\p{L}/u,dg=/\p{Emoji}/u,fg=/\d/,pg=/\s/,mg=`\r`,hg=`
122
+ `,gg=`️`,_g=`‍`,vg=``,yg=null,bg=null;function xg(e=[]){let t={};ih.groups=t;let n=new ih;yg??=Tg(Um),bg??=Tg(Wm),L(n,`'`,Ih),L(n,`{`,yh),L(n,`}`,bh),L(n,`[`,xh),L(n,`]`,Sh),L(n,`(`,Ch),L(n,`)`,wh),L(n,`<`,Th),L(n,`>`,Eh),L(n,`(`,Dh),L(n,`)`,Oh),L(n,`「`,kh),L(n,`」`,Ah),L(n,`『`,jh),L(n,`』`,Mh),L(n,`<`,Nh),L(n,`>`,Ph),L(n,`&`,Fh),L(n,`*`,Lh),L(n,`@`,Rh),L(n,"`",Bh),L(n,`^`,Vh),L(n,`:`,Hh),L(n,`,`,Uh),L(n,`$`,Wh),L(n,`.`,Gh),L(n,`=`,Kh),L(n,`!`,qh),L(n,`-`,Jh),L(n,`%`,Yh),L(n,`|`,Xh),L(n,`+`,Zh),L(n,`#`,Qh),L(n,`?`,$h),L(n,`"`,eg),L(n,`/`,rg),L(n,`;`,ng),L(n,`~`,ig),L(n,`_`,ag),L(n,`\\`,zh),L(n,`・`,tg);let r=ah(n,fg,gh,{[Gm]:!0});ah(r,fg,r);let i=ah(r,lg,lh,{[Jm]:!0}),a=ah(r,ug,uh,{[Ym]:!0}),o=ah(n,lg,sh,{[Km]:!0});ah(o,fg,i),ah(o,lg,o),ah(i,fg,i),ah(i,lg,i);let s=ah(n,ug,ch,{[qm]:!0});ah(s,lg),ah(s,fg,a),ah(s,ug,s),ah(a,fg,a),ah(a,lg),ah(a,ug,a);let c=L(n,hg,vh,{[eh]:!0}),l=L(n,mg,_h,{[eh]:!0}),u=ah(n,pg,_h,{[eh]:!0});L(n,vg,u),L(l,hg,c),L(l,vg,u),ah(l,pg,u),L(u,mg),L(u,hg),ah(u,pg,u),L(u,vg,u);let d=ah(n,dg,og,{[Zm]:!0});L(d,`#`),ah(d,dg,d),L(d,gg,d);let f=L(d,_g);L(f,`#`),ah(f,dg,d);let p=[[lg,o],[fg,i]],m=[[lg,null],[ug,s],[fg,a]];for(let e=0;e<yg.length;e++)wg(n,yg[e],fh,sh,p);for(let e=0;e<bg.length;e++)wg(n,bg[e],ph,ch,m);nh(fh,{tld:!0,ascii:!0},t),nh(ph,{utld:!0,alpha:!0},t),wg(n,`file`,mh,sh,p),wg(n,`mailto`,mh,sh,p),wg(n,`http`,hh,sh,p),wg(n,`https`,hh,sh,p),wg(n,`ftp`,hh,sh,p),wg(n,`ftps`,hh,sh,p),nh(mh,{scheme:!0,ascii:!0},t),nh(hh,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[Qm]:!0}:{[$m]:!0};r.indexOf(`-`)>=0?i[Xm]=!0:lg.test(r)?fg.test(r)?i[Jm]=!0:i[Km]=!0:i[Gm]=!0,oh(n,r,r,i)}return oh(n,`localhost`,dh,{ascii:!0}),n.jd=new ih(sg),{start:n,tokens:Object.assign({groups:t},cg)}}function Sg(e,t){let n=Cg(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function Cg(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function wg(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new ih(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new ih(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function Tg(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var Eg={defaultProtocol:`http`,events:null,format:Og,formatHref:Og,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Dg(e,t=null){let n=Object.assign({},Eg);e&&(n=Object.assign(n,e instanceof Dg?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Dg.prototype={o:Eg,ignoreTags:[],defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:Eg[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function Og(e){return e}function kg(e,t){this.t=`token`,this.v=e,this.tk=t}kg.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Eg.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function Ag(e,t){class n extends kg{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var jg=Ag(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),Mg=Ag(`text`),Ng=Ag(`nl`),Pg=Ag(`url`,{isLink:!0,toHref(e=Eg.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==dh&&e[1].t===Hh}}),Fg=e=>new ih(e);function Ig({groups:e}){let t=e.domain.concat([Fh,Lh,Rh,zh,Bh,Vh,Wh,Kh,Jh,gh,Yh,Xh,Zh,Qh,rg,sg,ig,ag]),n=[Ih,Hh,Uh,Gh,qh,Yh,$h,eg,ng,Th,Eh,yh,bh,Sh,xh,Ch,wh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph],r=[Fh,Ih,Lh,zh,Bh,Vh,Wh,Kh,Jh,yh,bh,Yh,Xh,Zh,Qh,$h,rg,sg,ig,ag],i=Fg(),a=L(i,ig);I(a,r,a),I(a,e.domain,a);let o=Fg(),s=Fg(),c=Fg();I(i,e.domain,o),I(i,e.scheme,s),I(i,e.slashscheme,c),I(o,r,a),I(o,e.domain,o);let l=L(o,Rh);L(a,Rh,l),L(s,Rh,l),L(c,Rh,l);let u=L(a,Gh);I(u,r,a),I(u,e.domain,a);let d=Fg();I(l,e.domain,d),I(d,e.domain,d);let f=L(d,Gh);I(f,e.domain,d);let p=Fg(jg);I(f,e.tld,p),I(f,e.utld,p),L(l,dh,p);let m=L(d,Jh);L(m,Jh,m),I(m,e.domain,d),I(p,e.domain,d),L(p,Gh,f),L(p,Jh,m),I(L(p,Hh),e.numeric,jg);let h=L(o,Jh),g=L(o,Gh);L(h,Jh,h),I(h,e.domain,o),I(g,r,a),I(g,e.domain,o);let _=Fg(Pg);I(g,e.tld,_),I(g,e.utld,_),I(_,e.domain,o),I(_,r,a),L(_,Gh,g),L(_,Jh,h),L(_,Rh,l);let v=L(_,Hh),y=Fg(Pg);I(v,e.numeric,y);let b=Fg(Pg),x=Fg();I(b,t,b),I(b,n,x),I(x,t,b),I(x,n,x),L(_,rg,b),L(y,rg,b);let S=L(s,Hh),C=L(L(L(c,Hh),rg),rg);I(s,e.domain,o),L(s,Gh,g),L(s,Jh,h),I(c,e.domain,o),L(c,Gh,g),L(c,Jh,h),I(S,e.domain,b),L(S,rg,b),L(S,$h,b),I(C,e.domain,b),I(C,t,b),L(C,rg,b);let w=[[yh,bh],[xh,Sh],[Ch,wh],[Th,Eh],[Dh,Oh],[kh,Ah],[jh,Mh],[Nh,Ph]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=L(b,r);L(x,r,a),L(a,i,b);let o=Fg(Pg);I(a,t,o);let s=Fg();I(a,n),I(o,t,o),I(o,n,s),I(s,t,o),I(s,n,s),L(o,i,b),L(s,i,b)}return L(i,dh,_),L(i,vh,Ng),{start:i,tokens:cg}}function Lg(e,t,n){let r=n.length,i=0,a=[],o=[];for(;i<r;){let s=e,c=null,l=null,u=0,d=null,f=-1;for(;i<r&&!(c=s.go(n[i].t));)o.push(n[i++]);for(;i<r&&(l=c||s.go(n[i].t));)c=null,s=l,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(Rg(Mg,t,o)),o=[]),i-=f,u-=f;let e=d.t,r=n.slice(i-u,i);a.push(Rg(e,t,r))}}return o.length>0&&a.push(Rg(Mg,t,o)),a}function Rg(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var zg=typeof console<`u`&&console&&console.warn||(()=>{}),Bg=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,Vg={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Hg(){return ih.groups={},Vg.scanner=null,Vg.parser=null,Vg.tokenQueue=[],Vg.pluginQueue=[],Vg.customSchemes=[],Vg.initialized=!1,Vg}function Ug(e,t=!1){if(Vg.initialized&&zg(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Bg}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
123
123
  1. Must only contain digits, lowercase ASCII letters or "-"
124
124
  2. Cannot start or end with "-"
125
- 3. "-" cannot repeat`);t_.customSchemes.push([e,t])}function i_(){t_.scanner=Fg(t_.customSchemes);for(let e=0;e<t_.tokenQueue.length;e++)t_.tokenQueue[e][1]({scanner:t_.scanner});t_.parser=Xg(t_.scanner.tokens);for(let e=0;e<t_.pluginQueue.length;e++)t_.pluginQueue[e][1]({scanner:t_.scanner,parser:t_.parser});return t_.initialized=!0,t_}function a_(e){return t_.initialized||i_(),Zg(t_.parser.start,e,Ig(t_.scanner.start,e))}a_.scan=Ig;function o_(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new Vg(n),i=a_(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var s_=`[\0- \xA0 ᠎ -\u2029  ]`,c_=new RegExp(s_),l_=RegExp(`${s_}$`),u_=new RegExp(s_,`g`);function d_(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function f_(e){return new Vi({key:new Wi(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(cf(kd(n.doc,[...t])).forEach(({newRange:t})=>{let n=jd(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!l_.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(c_).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=a_(n).map(t=>t.toObject(e.defaultProtocol));if(!d_(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>r.schema.marks.code?!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code):!0).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{lf(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function p_(e){return new Vi({key:new Wi(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=af(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}function m_(e){return new Vi({key:new Wi(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=o_(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function h_(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(u_,``).match(RegExp(`^(?:(?:${n.join(`|`)}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,`i`))}var g_=op.create({name:`link`,priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e==`string`){r_(e);return}r_(e.scheme,e.optionalSlashes)})},onDestroy(){n_()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!h_(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!h_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!h_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,Ud(this.options.HTMLAttributes,e),0]:[`a`,Ud(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!h_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!h_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addPasteRules(){return[tm({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=o_(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!h_(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(f_({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!h_(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(p_({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(m_({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),__=g_.extend({priority:60,addOptions(){return{openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:e=>{try{let t=new URL(e,`https://placeholder.invalid`).protocol.toLowerCase();return![`javascript:`,`data:`,`vbscript:`].includes(t)}catch{return!1}},validate:()=>!0,shouldAutoLink:()=>!0}},addAttributes(){return{...this.parent?.(),linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1}}}}),v_=$p.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function y_(e){return e.type.name===`list`&&!e.attrs.ordered}function b_(e){return e.type.name===`list`&&!!e.attrs.ordered}function x_(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function S_(e,t,n,r,i,a,o){let s=Nd(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?ja(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o??{}})}}),t(n),!0}return Oa(n,a)(e,void 0)?t?Oa(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!0:!1}var C_=$p.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,Ud(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:S_(e,t,n,r,e=>y_(e)&&!x_(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:S_(e,t,n,r,e=>b_(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:S_(e,t,n,r,e=>y_(e)&&x_(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[Pp({find:/^\s*([-+*])(?!\s*\[[ xX]\])\s$/,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]})}),Pp({find:/^\s*(\d+)([.)])\s$/,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]})}),new Qf({find:/^\s*[-*+]\s\[([ xX])\]\s$/,handler:({state:e,range:t,match:n})=>{let r=e.schema.nodes.list;if(!r)return null;let i=n[1]!==` `,a=e.tr.delete(t.from,t.to),o=a.doc.resolve(t.from).blockRange();if(!o)return null;let s=Lr(o,r,{ordered:!1});if(!s)return null;a.wrap(o,s);let c=a.doc.resolve(a.mapping.map(t.from));for(let e=c.depth;e>0;e--){let t=c.node(e);if(t.type.name===`listItem`){a.setNodeMarkup(c.before(e),void 0,{...t.attrs,checked:i});break}}}})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),w_=$p.create({name:`listItem`,content:`paragraph block*`,defining:!0,priority:60,addAttributes(){return{checked:{default:null},spread:{default:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,Ud(t),0]:[`li`,Ud(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(Ud(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`);return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,n.isEditable||(o.disabled=!0),o.addEventListener(`change`,()=>{let r=t();r===void 0||typeof r!=`number`||n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),T_=C_,E_=w_,D_=$p.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e=>typeof e==`string`?!1:{reason:e.getAttribute(`data-reason`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),O_=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,k_=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,A_=op.create({name:`highlight`,addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute(`data-color`)||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:`mark`}]},renderHTML({HTMLAttributes:e}){return[`mark`,Ud(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark(`highlight`,t.parseInline(e.tokens||[])),markdownTokenizer:{name:`highlight`,level:`inline`,start:e=>e.indexOf(`==`),tokenize(e,t,n){let r=/^(==)([^=]+)(==)/.exec(e);if(r){let e=r[2].trim(),t=n.inlineTokens(e);return{type:`highlight`,raw:r[0],text:e,tokens:t}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[jp({find:O_,type:this.type})]},addPasteRules(){return[tm({find:k_,type:this.type})]}}),j_=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,M_=$p.create({name:`image`,addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?`inline`:`block`},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?`img[src]`:`img[src]:not([src^="data:"])`}]},renderHTML({HTMLAttributes:e}){return[`img`,Ud(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode(`image`,{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{let t=e.attrs?.src??``,n=e.attrs?.alt??``,r=e.attrs?.title??``;return r?`![${n}](${t} "${r}")`:`![${n}](${t})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>`u`)return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:a,HTMLAttributes:o,editor:s})=>{let c=document.createElement(`img`);Object.entries(o).forEach(([e,t])=>{if(t!=null)switch(e){case`width`:case`height`:break;default:c.setAttribute(e,t);break}}),c.src=o.src;let l=new Ip({element:c,editor:s,node:i,getPos:a,onResize:(e,t)=>{c.style.width=`${e}px`,c.style.height=`${t}px`},onCommit:(e,t)=>{let n=a();n!==void 0&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:e,height:t}).run()},onUpdate:(e,t,n)=>e.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),u=l.dom;return u.style.visibility=`hidden`,u.style.pointerEvents=`none`,c.onload=()=>{u.style.visibility=``,u.style.pointerEvents=``},l}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Mp({find:j_,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),N_,P_;if(typeof WeakMap<`u`){let e=new WeakMap;N_=t=>e.get(t),P_=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;N_=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},P_=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var F_=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return N_(e)||P_(e,I_(e))}};function I_(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=L_(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new F_(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&R_(s,o,e),s}function L_(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function R_(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r!=null&&(!c.colwidth||c.colwidth[n]!=r)&&((s||=z_(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function z_(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function B_(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var V_=new Wi(`selectingCells`);function H_(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function U_(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n===`cell`||n===`header_cell`)return e.node(t)}return null}function W_(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function G_(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=H_(t.$head)||K_(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function K_(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function q_(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function J_(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Y_(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function X_(e,t,n){let r=e.node(-1),i=F_.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function Z_(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function Q_(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function $_(e,t,n){let r=B_(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var ev=class e extends M{constructor(e,t=e){let n=e.node(-1),r=F_.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new Si(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(q_(r)&&q_(i)&&Y_(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return N.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=F_.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=Z_(e,0,l)),u>0&&(e=Z_(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(A.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new j(A.from(o),1,1)}replace(e,t=j.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?j.empty:t)}let i=M.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new j(A.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=F_.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=F_.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=F_.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=F_.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new tv(this.$anchorCell.pos,this.$headCell.pos)}};ev.prototype.visible=!1,M.jsonID(`cell`,ev);var tv=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Y_(t,n)?new ev(t,n):M.near(n,1)}};function nv(e){if(!(e.selection instanceof ev))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(hl.node(n,n+e.nodeSize,{class:`selectedCell`}))}),vl.create(e.doc,t)}function rv({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function iv({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.spec.tableRole===`cell`||r.type.spec.tableRole===`header_cell`){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if(n.type.spec.tableRole===`cell`||n.type.spec.tableRole===`header_cell`){r=n;break}}return n!==r&&t.parentOffset===0}function av(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof P&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=ev.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=ev.rowSelection(e,e)}else if(!n){let e=F_.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=ev.create(i,t+1,n)}}else r instanceof N&&rv(r)?a=N.create(i,r.from):r instanceof N&&iv(r)&&(a=N.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var ov=new Wi(`fix-tables`);function sv(e,t,n,r){let i=e.childCount,a=t.childCount;outer:for(let o=0,s=0;o<a;o++){let a=t.child(o);for(let t=s,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==a){s=t+1,n+=a.nodeSize;continue outer}r(a,n),s<i&&e.child(s).sameMarkup(a)?sv(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function cv(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=lv(e,t,r,n))};return t?t.doc!=e.doc&&sv(t.doc,e.doc,0,r):e.doc.descendants(r),n}function lv(e,t,n,r){let i=F_.get(t);if(!i.problems)return r;r||=e.tr;let a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if(o.type==`collision`){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,Z_(i,i.colspan-o.n,o.n))}else if(o.type==`missing`)a[o.row]+=o.n;else if(o.type==`overlong_rowspan`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if(o.type==`colwidth mismatch`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if(o.type==`zero_sized`){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}let o,s;for(let e=0;e<a.length;e++)a[e]&&(o??=e,s=e);for(let c=0,l=n+1;c<i.height;c++){let n=t.child(c),i=l+n.nodeSize,u=a[c];if(u>0){let t=`cell`;n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<u;n++){let n=B_(e.schema)[t].createAndFill();n&&a.push(n)}let d=(c==0||o==c-1)&&s==c?l+1:i-1;r.insert(r.mapping.map(d),a)}l=i}return r.setMeta(ov,{fixTables:!0})}function uv(e){let t=e.selection,n=G_(e),r=n.node(-1),i=n.start(-1),a=F_.get(r);return{...t instanceof ev?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function dv(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;$_(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o<t.height;o++){let s=o*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let a=t.map[s],c=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,Q_(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?B_(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,l=t.positionAt(o,i,r);e.insert(e.mapping.map(n+l),c.createAndFill())}}return e}function fv(e,t){if(!W_(e))return!1;if(t){let n=uv(e);t(dv(e.tr,n,n.left))}return!0}function pv(e,t){if(!W_(e))return!1;if(t){let n=uv(e);t(dv(e.tr,n,n.right))}return!0}function mv(e,{map:t,table:n,tableStart:r},i){let a=e.mapping.maps.length;for(let o=0;o<t.height;){let s=o*t.width+i,c=t.map[s],l=n.nodeAt(c),u=l.attrs;if(i>0&&t.map[s-1]==c||i<t.width-1&&t.map[s+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(r+c),null,Z_(u,i-t.colCount(c)));else{let t=e.mapping.slice(a).map(r+c);e.delete(t,t+l.nodeSize)}o+=u.rowspan}}function hv(e,t){if(!W_(e))return!1;if(t){let n=uv(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;mv(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=F_.get(e)}t(r)}return!0}function gv(e,t,n){let r=B_(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width])?.type!=r)return!1;return!0}function _v(e,{map:t,tableStart:n,table:r},i){let a=n;for(let e=0;e<i;e++)a+=r.child(e).nodeSize;let o=[],s=i>0?-1:0;gv(t,r,i+s)&&(s=i==0||i==t.height?null:0);for(let a=0,c=t.width*i;a<t.width;a++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),a+=o.colspan-1}else{let e=(s==null?B_(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,B_(r.type.schema).row.create(null,o)),e}function vv(e,t){if(!W_(e))return!1;if(t){let n=uv(e);t(_v(e.tr,n,n.top))}return!0}function yv(e,t){if(!W_(e))return!1;if(t){let n=uv(e);t(_v(e.tr,n,n.bottom))}return!0}function bv(e,{map:t,table:n,tableStart:r},i){let a=0;for(let e=0;e<i;e++)a+=n.child(e).nodeSize;let o=a+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(a+r,o+r);let c=new Set;for(let a=0,o=i*t.width;a<t.width;a++,o++){let l=t.map[o];if(!c.has(l)){if(c.add(l),i>0&&l==t.map[o-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,{...t,rowspan:t.rowspan-1}),a+=t.colspan-1}else if(i<t.height&&l==t.map[o+t.width]){let o=n.nodeAt(l),c=o.attrs,u=o.type.create({...c,rowspan:o.attrs.rowspan-1},o.content),d=t.positionAt(i+1,a,n);e.insert(e.mapping.slice(s).map(r+d),u),a+=c.colspan-1}}}}function xv(e,t){if(!W_(e))return!1;if(t){let n=uv(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;bv(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=F_.get(n.table)}t(r)}return!0}function Sv(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Cv({width:e,height:t,map:n},r){let i=r.top*e+r.left,a=i,o=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function wv(e,t){let n=e.selection;if(!(n instanceof ev)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=uv(e),{map:i}=r;if(Cv(i,r))return!1;if(t){let n=e.tr,a={},o=A.empty,s,c;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=i.map[e*i.width+t],u=r.table.nodeAt(l);if(!(a[l]||!u))if(a[l]=!0,s==null)s=l,c=u;else{Sv(u)||(o=o.append(u.content));let e=n.mapping.map(l+r.tableStart);n.delete(e,e+u.nodeSize)}}if(s==null||c==null)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...Q_(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),o.size>0){let e=s+1+c.content.size,t=Sv(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new ev(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function Tv(e,t){let n=B_(e.schema);return Ev(({node:e})=>n[e.type.spec.tableRole])(e,t)}function Ev(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof ev){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=U_(r.$from),!i)return!1;a=H_(r.$from)?.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let o=i.attrs,s=[],c=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});let l=uv(t),u=t.tr;for(let e=0;e<l.right-l.left;e++)s.push(c?{...o,colwidth:c&&c[e]?[c[e]]:null}:o);let d;for(let t=l.top;t<l.bottom;t++){let n=l.map.positionAt(t,l.left,l.table);t==l.top&&(n+=i.nodeSize);for(let r=l.left,a=0;r<l.right;r++,a++)r==l.left&&t==l.top||u.insert(d=u.mapping.map(n+l.tableStart,1),e({node:i,row:t,col:r}).createAndFill(s[a]))}u.setNodeMarkup(a,e({node:i,row:l.top,col:l.left}),s[0]),r instanceof ev&&u.setSelection(new ev(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function Dv(e,t){return function(n,r){if(!W_(n))return!1;let i=G_(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let a=n.tr;n.selection instanceof ev?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function Ov(e){return function(t,n){if(!W_(t))return!1;if(n){let r=B_(t.schema),i=uv(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function kv(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function Av(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?Ov(e):function(t,n){if(!W_(t))return!1;if(n){let r=B_(t.schema),i=uv(t),a=t.tr,o=kv(`row`,i,r),s=kv(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}Av(`row`,{useDeprecatedLogic:!0}),Av(`column`,{useDeprecatedLogic:!0});var jv=Av(`cell`,{useDeprecatedLogic:!0});function Mv(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function Nv(e){return function(t,n){if(!W_(t))return!1;let r=Mv(G_(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(N.between(e,J_(e))).scrollIntoView())}return!0}}function Pv(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole==`table`)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Fv(e,t){let n=e.selection;if(!(n instanceof ev))return!1;if(t){let r=e.tr,i=B_(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new j(i,0,0))}),r.docChanged&&t(r)}return!0}function Iv(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole==`table`);)n--,r--,t=t.child(0).content;let i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a==`row`)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,a=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(a||c)&&(i=Rv(B_(o).row,new j(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?Rv(B_(o).row,new j(t,n,r)).content:t);else return null;return Lv(o,s)}function Lv(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:a}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+a}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(A.empty),n[i]<r){let a=B_(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(A.from(o))}return{height:t.length,width:r,rows:t}}function Rv(e,t){let n=e.createAndFill();return new bi(n).replace(0,n.content.size,t).doc}function zv({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let a=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let s=a.child(i%a.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(Z_(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),o.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(A.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,a=0;r<i;r++,a++){let o=[],s=n[a%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(A.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function Bv(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=B_(s),l,u;if(i>t.width)for(let a=0,s=0;a<t.height;a++){let d=n.child(a);s+=d.nodeSize;let f=[],p;p=d.lastChild==null||d.lastChild.type==c.cell?l||=c.cell.createAndFill():u||=c.header_cell.createAndFill();for(let e=t.width;e<i;e++)f.push(p);e.insert(e.mapping.slice(o).map(s-1+r),f)}if(a>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=e>=t.width?!1:n.nodeAt(t.map[r+e]).type==c.header_cell;s.push(i?u||=c.header_cell.createAndFill():l||=c.cell.createAndFill())}let d=c.row.create(null,A.from(s)),f=[];for(let e=t.height;e<a;e++)f.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),f)}return!!(l||u)}function Vv(e,t,n,r,i,a,o,s){if(o==0||o==t.height)return!1;let c=!1;for(let l=i;l<a;l++){let i=o*t.width+l,a=t.map[i];if(t.map[i-t.width]==a){c=!0;let i=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(s).map(a+r),null,{...i.attrs,rowspan:o-u}),e.insert(e.mapping.slice(s).map(t.positionAt(o,d,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-o})),l+=i.attrs.colspan-1}}return c}function Hv(e,t,n,r,i,a,o,s){if(o==0||o==t.width)return!1;let c=!1;for(let l=i;l<a;l++){let i=l*t.width+o,a=t.map[i];if(t.map[i-1]==a){c=!0;let i=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(s).map(a+r);e.setNodeMarkup(d,null,Z_(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(Z_(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function Uv(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=F_.get(a),{top:s,left:c}=r,l=c+i.width,u=s+i.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw Error(`No table found`);o=F_.get(a),f=d.mapping.maps.length}Bv(d,o,a,n,l,u,f)&&p(),Vv(d,o,a,n,c,l,s,f)&&p(),Vv(d,o,a,n,c,l,u,f)&&p(),Hv(d,o,a,n,s,u,c,f)&&p(),Hv(d,o,a,n,s,u,l,f)&&p();for(let e=s;e<u;e++){let t=o.positionAt(e,c,a),r=o.positionAt(e,l,a);d.replace(d.mapping.slice(f).map(t+n),d.mapping.slice(f).map(r+n),new j(i.rows[e-s],0,0))}p(),d.setSelection(new ev(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var Wv=fu({ArrowLeft:Kv(`horiz`,-1),ArrowRight:Kv(`horiz`,1),ArrowUp:Kv(`vert`,-1),ArrowDown:Kv(`vert`,1),"Shift-ArrowLeft":qv(`horiz`,-1),"Shift-ArrowRight":qv(`horiz`,1),"Shift-ArrowUp":qv(`vert`,-1),"Shift-ArrowDown":qv(`vert`,1),Backspace:Fv,"Mod-Backspace":Fv,Delete:Fv,"Mod-Delete":Fv});function Gv(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Kv(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof ev)return Gv(n,r,M.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=Zv(i,e,t);if(o==null)return!1;if(e==`horiz`)return Gv(n,r,M.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=X_(i,e,t),s;return s=a?M.near(a,1):t<0?M.near(n.doc.resolve(i.before(-1)),-1):M.near(n.doc.resolve(i.after(-1)),1),Gv(n,r,s)}}}function qv(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof ev)o=a;else{let r=Zv(i,e,t);if(r==null)return!1;o=new ev(n.doc.resolve(r))}let s=X_(o.$headCell,e,t);return s?Gv(n,r,new ev(o.$anchorCell,s)):!1}}function Jv(e,t){let n=e.state.doc,r=H_(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new ev(r))),!0):!1}function Yv(e,t,n){if(!W_(e.state))return!1;let r=Iv(n),i=e.state.selection;if(i instanceof ev){r||={width:1,height:1,rows:[A.from(Rv(B_(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=F_.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=zv(r,o.right-o.left,o.bottom-o.top),Uv(e.state,e.dispatch,a,o,r),!0}else if(r){let t=G_(e.state),n=t.start(-1);return Uv(e.state,e.dispatch,n,F_.get(t.node(-1)).findCell(t.pos-n),r),!0}else return!1}function Xv(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=Qv(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof ev)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=H_(e.state.selection.$anchor))!=null&&$v(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=$v(e,n),i=V_.getState(e.state)==null;if(!r||!Y_(t,r))if(i)r=t;else return;let a=new ev(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(V_,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),V_.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(V_,-1))}function o(r){let o=r,s=V_.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(Qv(e,o.target)!=n&&(c=$v(e,t),!c))return a();c&&i(c,o)}e.root.addEventListener(`mouseup`,a),e.root.addEventListener(`dragstart`,a),e.root.addEventListener(`mousemove`,o)}function Zv(e,t,n){if(!(e.state.selection instanceof N))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}function Qv(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function $v(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&H_(e.state.doc.resolve(r))||H_(e.state.doc.resolve(i))}var ey=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),this.table.style.setProperty(`--default-cell-min-width`,`${t}px`),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),ty(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type==this.node.type?(this.node=e,ty(e,this.colgroup,this.table,this.defaultCellMinWidth),!0):!1}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function ty(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l){for(let e=0,n=0;e<l.childCount;e++){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e++,n++){let l=i==n?a:d&&d[e],u=l?l+`px`:``;if(o+=l||r,l||(s=!1),c)c.style.width!=u&&(c.style.width=u),c=c.nextSibling;else{let e=document.createElement(`col`);e.style.width=u,t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}s?(n.style.width=o+`px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=o+`px`)}}var ny=new Wi(`tableColumnResizing`);function ry({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=ey,lastColumnResizable:i=!0}={}){let a=new Vi({key:ny,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=B_(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new iy(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=ny.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{ay(t,n,e,i)},mouseleave:e=>{oy(e)},mousedown:(e,r)=>{sy(e,r,t,n)}},decorations:e=>{let t=ny.getState(e);if(t&&t.activeHandle>-1)return gy(e,t.activeHandle)},nodeViews:{}}});return a}var iy=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(ny);if(r&&r.setHandle!=null)return new e(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return q_(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function ay(e,t,n,r){if(!e.editable)return;let i=ny.getState(e.state);if(i&&!i.dragging){let a=ly(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=uy(e,t,`left`,n):i-t.clientX<=n&&(o=uy(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=F_.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}fy(e,o)}}}function oy(e){if(!e.editable)return;let t=ny.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&fy(e,-1)}function sy(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=ny.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=cy(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(ny,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=ny.getState(e.state);r?.dragging&&(py(e,r.activeHandle,dy(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(ny,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=ny.getState(e.state);if(i&&i.dragging){let a=dy(i.dragging,t,n);my(e,i.activeHandle,a,r)}}return my(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function cy(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let a=e.domAtPos(t),o=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],s--);return o/s}function ly(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function uy(e,t,n,r){let i=n==`right`?-r:r,a=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!a)return-1;let{pos:o}=a,s=H_(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=F_.get(s.node(-1)),l=s.start(-1),u=c.map.indexOf(s.pos-l);return u%c.width==0?-1:l+c.map[u-1]}function dy(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function fy(e,t){e.dispatch(e.state.tr.setMeta(ny,{setHandle:t}))}function py(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=F_.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<a.height;e++){let t=e*a.width+s;if(e&&a.map[t]==a.map[t-a.width])continue;let r=a.map[t],l=i.nodeAt(r).attrs,u=l.colspan==1?0:s-a.colCount(r);if(l.colwidth&&l.colwidth[u]==n)continue;let d=l.colwidth?l.colwidth.slice():hy(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function my(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=F_.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,c=e.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!=`TABLE`;)c=c.parentNode;c&&ty(a,c.firstChild,c,r,s,n)}function hy(e){return Array(e).fill(0)}function gy(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return vl.empty;let a=F_.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let r=s+t*a.width;if((s==a.width-1||a.map[r]!=a.map[r+1])&&(t==0||a.map[r]!=a.map[r-a.width])){let t=a.map[r],s=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement(`div`);c.className=`column-resize-handle`,ny.getState(e)?.dragging&&n.push(hl.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(hl.widget(s,c))}}return vl.create(e.doc,n)}function _y({allowTableNodeSelection:e=!1}={}){return new Vi({key:V_,state:{init(){return null},apply(e,t){let n=e.getMeta(V_);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:nv,handleDOMEvents:{mousedown:Xv},createSelectionBetween(e){return V_.getState(e.state)==null?null:e.state.selection},handleTripleClick:Jv,handleKeyDown:Wv,handlePaste:Yv},appendTransaction(t,n,r){return av(r,cv(r,n),e)}})}function vy(e){return e===`left`||e===`right`||e===`center`?e:null}function yy(e){let t=(e.style.textAlign||``).trim().toLowerCase(),n=(e.getAttribute(`align`)||``).trim().toLowerCase();return vy(t||n)}function by(e){return vy(e?.align)}function xy(){return{default:null,parseHTML:e=>yy(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var Sy=$p.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`),n=t?t.split(`,`).map(e=>parseInt(e,10)):null;if(!n){let t=e.closest(`table`)?.querySelectorAll(`colgroup > col`),n=Array.from(e.parentElement?.children||[]).indexOf(e);if(n&&n>-1&&t&&t[n]){let e=t[n].getAttribute(`width`);return e?[parseInt(e,10)]:null}}return n}},align:xy()}},tableRole:`cell`,isolating:!0,parseHTML(){return[{tag:`td`}]},renderHTML({HTMLAttributes:e}){return[`td`,Ud(this.options.HTMLAttributes,e),0]}}),Cy=$p.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):null}},align:xy()}},tableRole:`header_cell`,isolating:!0,parseHTML(){return[{tag:`th`}]},renderHTML({HTMLAttributes:e}){return[`th`,Ud(this.options.HTMLAttributes,e),0]}}),wy=$p.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)*`,tableRole:`row`,parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,Ud(this.options.HTMLAttributes,e),0]}});function Ty(e,t){return t?[`width`,`${Math.max(t,e)}px`]:[`min-width`,`${e}px`]}function Ey(e,t,n,r,i,a){var o;let s=0,c=!0,l=t.firstChild,u=e.firstChild;if(u!==null)for(let e=0,n=0;e<u.childCount;e+=1){let{colspan:o,colwidth:d}=u.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?a:d&&d[e],u=o?`${o}px`:``;if(s+=o||r,o||(c=!1),l){if(l.style.width!==u){let[e,t]=Ty(r,o);l.style.setProperty(e,t)}l=l.nextSibling}else{let e=document.createElement(`col`),[n,i]=Ty(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;l;){let e=l.nextSibling;(o=l.parentNode)==null||o.removeChild(l),l=e}let d=e.attrs.style&&typeof e.attrs.style==`string`&&/\bwidth\s*:/i.test(e.attrs.style);c&&!d?(n.style.width=`${s}px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=`${s}px`)}var Dy=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),Ey(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type===this.node.type?(this.node=e,Ey(e,this.colgroup,this.table,this.cellMinWidth),!0):!1}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!(n&&!r&&(e.type===`attributes`||e.type===`childList`||e.type===`characterData`))}};function Oy(e,t,n,r){let i=0,a=!0,o=[],s=e.firstChild;if(!s)return{};for(let e=0,c=0;e<s.childCount;e+=1){let{colspan:l,colwidth:u}=s.child(e).attrs;for(let e=0;e<l;e+=1,c+=1){let s=n===c?r:u&&u[e];i+=s||t,s||(a=!1);let[l,d]=Ty(t,s);o.push([`col`,{style:`${l}: ${d}`}])}}let c=a?`${i}px`:``,l=a?``:`${i}px`;return{colgroup:[`colgroup`,{},...o],tableWidth:c,tableMinWidth:l}}function ky(e,t){return t?e.createChecked(null,t):e.createAndFill()}function Ay(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function jy(e,t,n,r,i){let a=Ay(e),o=[],s=[];for(let e=0;e<n;e+=1){let e=ky(a.cell,i);if(e&&s.push(e),r){let e=ky(a.header_cell,i);e&&o.push(e)}}let c=[];for(let e=0;e<t;e+=1)c.push(a.row.createChecked(null,r&&e===0?o:s));return a.table.createChecked(null,c)}function My(e){return e instanceof ev}var Ny=({editor:e})=>{let{selection:t}=e.state;if(!My(t))return!1;let n=0;return Md(t.ranges[0].$from,e=>e.type.name===`table`)?.node.descendants(e=>{if(e.type.name===`table`)return!1;[`tableCell`,`tableHeader`].includes(e.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1};function Py(e){return(e||``).replace(/\s+/g,` `).trim()}function Fy(e,t,n={}){let r=n.cellLineSeparator??``;if(!e||!e.content||e.content.length===0)return``;let i=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let i=``;i=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(r):e.content?t.renderChildren(e.content):``;let a=Py(i),o=e.type===`tableHeader`,s=by(e.attrs);n.push({text:a,isHeader:o,align:s})}),i.push(n)});let a=i.reduce((e,t)=>Math.max(e,t.length),0);if(a===0)return``;let o=Array(a).fill(0);i.forEach(e=>{for(let t=0;t<a;t+=1){let n=(e[t]?.text||``).length;n>o[t]&&(o[t]=n),o[t]<3&&(o[t]=3)}});let s=(e,t)=>e+` `.repeat(Math.max(0,t-e.length)),c=i[0],l=c.some(e=>e.isHeader),u=Array(a).fill(null);i.forEach(e=>{for(let t=0;t<a;t+=1)!u[t]&&e[t]?.align&&(u[t]=e[t].align)});let d=`
125
+ 3. "-" cannot repeat`);Vg.customSchemes.push([e,t])}function Wg(){Vg.scanner=xg(Vg.customSchemes);for(let e=0;e<Vg.tokenQueue.length;e++)Vg.tokenQueue[e][1]({scanner:Vg.scanner});Vg.parser=Ig(Vg.scanner.tokens);for(let e=0;e<Vg.pluginQueue.length;e++)Vg.pluginQueue[e][1]({scanner:Vg.scanner,parser:Vg.parser});return Vg.initialized=!0,Vg}function Gg(e){return Vg.initialized||Wg(),Lg(Vg.parser.start,e,Sg(Vg.scanner.start,e))}Gg.scan=Sg;function Kg(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new Dg(n),i=Gg(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var qg=`[\0- \xA0 ᠎ -\u2029  ]`,Jg=new RegExp(qg),Yg=RegExp(`${qg}$`),Xg=new RegExp(qg,`g`);function Zg(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function Qg(e){return new Vi({key:new Wi(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r;if(cf(kd(n.doc,[...t])).forEach(({newRange:t})=>{let n=jd(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!Yg.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(Jg).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=Gg(n).map(t=>t.toObject(e.defaultProtocol));if(!Zg(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>r.schema.marks.code?!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code):!0).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{lf(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function $g(e){return new Vi({key:new Wi(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=af(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}function e_(e){return new Vi({key:new Wi(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=Kg(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function t_(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(Xg,``).match(RegExp(`^(?:(?:${n.join(`|`)}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,`i`))}var n_=op.create({name:`link`,priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e==`string`){Ug(e);return}Ug(e.scheme,e.optionalSlashes)})},onDestroy(){Hg()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!t_(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!t_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!t_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,Ud(this.options.HTMLAttributes,e),0]:[`a`,Ud(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!t_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!t_(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addPasteRules(){return[tm({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=Kg(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!t_(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(Qg({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!t_(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push($g({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(e_({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),r_=n_,i_=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,a_=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,o_=op.create({name:`highlight`,addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute(`data-color`)||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:`mark`}]},renderHTML({HTMLAttributes:e}){return[`mark`,Ud(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark(`highlight`,t.parseInline(e.tokens||[])),markdownTokenizer:{name:`highlight`,level:`inline`,start:e=>e.indexOf(`==`),tokenize(e,t,n){let r=/^(==)([^=]+)(==)/.exec(e);if(r){let e=r[2].trim(),t=n.inlineTokens(e);return{type:`highlight`,raw:r[0],text:e,tokens:t}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[jp({find:i_,type:this.type})]},addPasteRules(){return[tm({find:a_,type:this.type})]}}),s_=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,c_=$p.create({name:`image`,addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?`inline`:`block`},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?`img[src]`:`img[src]:not([src^="data:"])`}]},renderHTML({HTMLAttributes:e}){return[`img`,Ud(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode(`image`,{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{let t=e.attrs?.src??``,n=e.attrs?.alt??``,r=e.attrs?.title??``;return r?`![${n}](${t} "${r}")`:`![${n}](${t})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>`u`)return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:a,HTMLAttributes:o,editor:s})=>{let c=document.createElement(`img`);Object.entries(o).forEach(([e,t])=>{if(t!=null)switch(e){case`width`:case`height`:break;default:c.setAttribute(e,t);break}}),c.src=o.src;let l=new Ip({element:c,editor:s,node:i,getPos:a,onResize:(e,t)=>{c.style.width=`${e}px`,c.style.height=`${t}px`},onCommit:(e,t)=>{let n=a();n!==void 0&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:e,height:t}).run()},onUpdate:(e,t,n)=>e.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),u=l.dom;return u.style.visibility=`hidden`,u.style.pointerEvents=`none`,c.onload=()=>{u.style.visibility=``,u.style.pointerEvents=``},l}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[Mp({find:s_,type:this.type,getAttributes:e=>{let[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),l_,u_;if(typeof WeakMap<`u`){let e=new WeakMap;l_=t=>e.get(t),u_=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;l_=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},u_=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var d_=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,!(i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o)&&t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return l_(e)||u_(e,f_(e))}};function f_(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=p_(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new d_(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&m_(s,o,e),s}function p_(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function m_(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r!=null&&(!c.colwidth||c.colwidth[n]!=r)&&((s||=h_(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function h_(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function g_(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var __=new Wi(`selectingCells`);function v_(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function y_(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n===`cell`||n===`header_cell`)return e.node(t)}return null}function b_(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function x_(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=v_(t.$head)||S_(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function S_(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function C_(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function w_(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function T_(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function E_(e,t,n){let r=e.node(-1),i=d_.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function D_(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function O_(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function k_(e,t,n){let r=g_(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var A_=class e extends M{constructor(e,t=e){let n=e.node(-1),r=d_.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new Si(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(C_(r)&&C_(i)&&T_(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return N.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=d_.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=D_(e,0,l)),u>0&&(e=D_(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(A.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new j(A.from(o),1,1)}replace(e,t=j.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?j.empty:t)}let i=M.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new j(A.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=d_.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=d_.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=d_.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=d_.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new j_(this.$anchorCell.pos,this.$headCell.pos)}};A_.prototype.visible=!1,M.jsonID(`cell`,A_);var j_=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&T_(t,n)?new A_(t,n):M.near(n,1)}};function M_(e){if(!(e.selection instanceof A_))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(hl.node(n,n+e.nodeSize,{class:`selectedCell`}))}),vl.create(e.doc,t)}function N_({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function P_({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.spec.tableRole===`cell`||r.type.spec.tableRole===`header_cell`){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if(n.type.spec.tableRole===`cell`||n.type.spec.tableRole===`header_cell`){r=n;break}}return n!==r&&t.parentOffset===0}function F_(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof P&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=A_.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=A_.rowSelection(e,e)}else if(!n){let e=d_.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=A_.create(i,t+1,n)}}else r instanceof N&&N_(r)?a=N.create(i,r.from):r instanceof N&&P_(r)&&(a=N.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var I_=new Wi(`fix-tables`);function L_(e,t,n,r){let i=e.childCount,a=t.childCount;outer:for(let o=0,s=0;o<a;o++){let a=t.child(o);for(let t=s,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==a){s=t+1,n+=a.nodeSize;continue outer}r(a,n),s<i&&e.child(s).sameMarkup(a)?L_(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function R_(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=z_(e,t,r,n))};return t?t.doc!=e.doc&&L_(t.doc,e.doc,0,r):e.doc.descendants(r),n}function z_(e,t,n,r){let i=d_.get(t);if(!i.problems)return r;r||=e.tr;let a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if(o.type==`collision`){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,D_(i,i.colspan-o.n,o.n))}else if(o.type==`missing`)a[o.row]+=o.n;else if(o.type==`overlong_rowspan`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if(o.type==`colwidth mismatch`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if(o.type==`zero_sized`){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}let o,s;for(let e=0;e<a.length;e++)a[e]&&(o??=e,s=e);for(let c=0,l=n+1;c<i.height;c++){let n=t.child(c),i=l+n.nodeSize,u=a[c];if(u>0){let t=`cell`;n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<u;n++){let n=g_(e.schema)[t].createAndFill();n&&a.push(n)}let d=(c==0||o==c-1)&&s==c?l+1:i-1;r.insert(r.mapping.map(d),a)}l=i}return r.setMeta(I_,{fixTables:!0})}function B_(e){let t=e.selection,n=x_(e),r=n.node(-1),i=n.start(-1),a=d_.get(r);return{...t instanceof A_?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function V_(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;k_(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o<t.height;o++){let s=o*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let a=t.map[s],c=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,O_(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?g_(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,l=t.positionAt(o,i,r);e.insert(e.mapping.map(n+l),c.createAndFill())}}return e}function H_(e,t){if(!b_(e))return!1;if(t){let n=B_(e);t(V_(e.tr,n,n.left))}return!0}function U_(e,t){if(!b_(e))return!1;if(t){let n=B_(e);t(V_(e.tr,n,n.right))}return!0}function W_(e,{map:t,table:n,tableStart:r},i){let a=e.mapping.maps.length;for(let o=0;o<t.height;){let s=o*t.width+i,c=t.map[s],l=n.nodeAt(c),u=l.attrs;if(i>0&&t.map[s-1]==c||i<t.width-1&&t.map[s+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(r+c),null,D_(u,i-t.colCount(c)));else{let t=e.mapping.slice(a).map(r+c);e.delete(t,t+l.nodeSize)}o+=u.rowspan}}function G_(e,t){if(!b_(e))return!1;if(t){let n=B_(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;W_(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=d_.get(e)}t(r)}return!0}function K_(e,t,n){let r=g_(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width])?.type!=r)return!1;return!0}function q_(e,{map:t,tableStart:n,table:r},i){let a=n;for(let e=0;e<i;e++)a+=r.child(e).nodeSize;let o=[],s=i>0?-1:0;K_(t,r,i+s)&&(s=i==0||i==t.height?null:0);for(let a=0,c=t.width*i;a<t.width;a++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),a+=o.colspan-1}else{let e=(s==null?g_(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,g_(r.type.schema).row.create(null,o)),e}function J_(e,t){if(!b_(e))return!1;if(t){let n=B_(e);t(q_(e.tr,n,n.top))}return!0}function Y_(e,t){if(!b_(e))return!1;if(t){let n=B_(e);t(q_(e.tr,n,n.bottom))}return!0}function X_(e,{map:t,table:n,tableStart:r},i){let a=0;for(let e=0;e<i;e++)a+=n.child(e).nodeSize;let o=a+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(a+r,o+r);let c=new Set;for(let a=0,o=i*t.width;a<t.width;a++,o++){let l=t.map[o];if(!c.has(l)){if(c.add(l),i>0&&l==t.map[o-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,{...t,rowspan:t.rowspan-1}),a+=t.colspan-1}else if(i<t.height&&l==t.map[o+t.width]){let o=n.nodeAt(l),c=o.attrs,u=o.type.create({...c,rowspan:o.attrs.rowspan-1},o.content),d=t.positionAt(i+1,a,n);e.insert(e.mapping.slice(s).map(r+d),u),a+=c.colspan-1}}}}function Z_(e,t){if(!b_(e))return!1;if(t){let n=B_(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;X_(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=d_.get(n.table)}t(r)}return!0}function Q_(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function $_({width:e,height:t,map:n},r){let i=r.top*e+r.left,a=i,o=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function ev(e,t){let n=e.selection;if(!(n instanceof A_)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=B_(e),{map:i}=r;if($_(i,r))return!1;if(t){let n=e.tr,a={},o=A.empty,s,c;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=i.map[e*i.width+t],u=r.table.nodeAt(l);if(!(a[l]||!u))if(a[l]=!0,s==null)s=l,c=u;else{Q_(u)||(o=o.append(u.content));let e=n.mapping.map(l+r.tableStart);n.delete(e,e+u.nodeSize)}}if(s==null||c==null)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...O_(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),o.size>0){let e=s+1+c.content.size,t=Q_(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new A_(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function tv(e,t){let n=g_(e.schema);return nv(({node:e})=>n[e.type.spec.tableRole])(e,t)}function nv(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof A_){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=y_(r.$from),!i)return!1;a=v_(r.$from)?.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let o=i.attrs,s=[],c=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});let l=B_(t),u=t.tr;for(let e=0;e<l.right-l.left;e++)s.push(c?{...o,colwidth:c&&c[e]?[c[e]]:null}:o);let d;for(let t=l.top;t<l.bottom;t++){let n=l.map.positionAt(t,l.left,l.table);t==l.top&&(n+=i.nodeSize);for(let r=l.left,a=0;r<l.right;r++,a++)r==l.left&&t==l.top||u.insert(d=u.mapping.map(n+l.tableStart,1),e({node:i,row:t,col:r}).createAndFill(s[a]))}u.setNodeMarkup(a,e({node:i,row:l.top,col:l.left}),s[0]),r instanceof A_&&u.setSelection(new A_(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function rv(e,t){return function(n,r){if(!b_(n))return!1;let i=x_(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let a=n.tr;n.selection instanceof A_?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function iv(e){return function(t,n){if(!b_(t))return!1;if(n){let r=g_(t.schema),i=B_(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function av(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function ov(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?iv(e):function(t,n){if(!b_(t))return!1;if(n){let r=g_(t.schema),i=B_(t),a=t.tr,o=av(`row`,i,r),s=av(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}ov(`row`,{useDeprecatedLogic:!0}),ov(`column`,{useDeprecatedLogic:!0});var sv=ov(`cell`,{useDeprecatedLogic:!0});function cv(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function lv(e){return function(t,n){if(!b_(t))return!1;let r=cv(x_(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(N.between(e,w_(e))).scrollIntoView())}return!0}}function uv(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole==`table`)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function dv(e,t){let n=e.selection;if(!(n instanceof A_))return!1;if(t){let r=e.tr,i=g_(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new j(i,0,0))}),r.docChanged&&t(r)}return!0}function fv(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole==`table`);)n--,r--,t=t.child(0).content;let i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a==`row`)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,a=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(a||c)&&(i=mv(g_(o).row,new j(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?mv(g_(o).row,new j(t,n,r)).content:t);else return null;return pv(o,s)}function pv(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:a}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+a}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(A.empty),n[i]<r){let a=g_(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(A.from(o))}return{height:t.length,width:r,rows:t}}function mv(e,t){let n=e.createAndFill();return new bi(n).replace(0,n.content.size,t).doc}function hv({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let a=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let s=a.child(i%a.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(D_(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),o.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(A.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,a=0;r<i;r++,a++){let o=[],s=n[a%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(A.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function gv(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=g_(s),l,u;if(i>t.width)for(let a=0,s=0;a<t.height;a++){let d=n.child(a);s+=d.nodeSize;let f=[],p;p=d.lastChild==null||d.lastChild.type==c.cell?l||=c.cell.createAndFill():u||=c.header_cell.createAndFill();for(let e=t.width;e<i;e++)f.push(p);e.insert(e.mapping.slice(o).map(s-1+r),f)}if(a>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=e>=t.width?!1:n.nodeAt(t.map[r+e]).type==c.header_cell;s.push(i?u||=c.header_cell.createAndFill():l||=c.cell.createAndFill())}let d=c.row.create(null,A.from(s)),f=[];for(let e=t.height;e<a;e++)f.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),f)}return!!(l||u)}function _v(e,t,n,r,i,a,o,s){if(o==0||o==t.height)return!1;let c=!1;for(let l=i;l<a;l++){let i=o*t.width+l,a=t.map[i];if(t.map[i-t.width]==a){c=!0;let i=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(s).map(a+r),null,{...i.attrs,rowspan:o-u}),e.insert(e.mapping.slice(s).map(t.positionAt(o,d,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-o})),l+=i.attrs.colspan-1}}return c}function vv(e,t,n,r,i,a,o,s){if(o==0||o==t.width)return!1;let c=!1;for(let l=i;l<a;l++){let i=l*t.width+o,a=t.map[i];if(t.map[i-1]==a){c=!0;let i=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(s).map(a+r);e.setNodeMarkup(d,null,D_(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(D_(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function yv(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=d_.get(a),{top:s,left:c}=r,l=c+i.width,u=s+i.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw Error(`No table found`);o=d_.get(a),f=d.mapping.maps.length}gv(d,o,a,n,l,u,f)&&p(),_v(d,o,a,n,c,l,s,f)&&p(),_v(d,o,a,n,c,l,u,f)&&p(),vv(d,o,a,n,s,u,c,f)&&p(),vv(d,o,a,n,s,u,l,f)&&p();for(let e=s;e<u;e++){let t=o.positionAt(e,c,a),r=o.positionAt(e,l,a);d.replace(d.mapping.slice(f).map(t+n),d.mapping.slice(f).map(r+n),new j(i.rows[e-s],0,0))}p(),d.setSelection(new A_(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var bv=fu({ArrowLeft:Sv(`horiz`,-1),ArrowRight:Sv(`horiz`,1),ArrowUp:Sv(`vert`,-1),ArrowDown:Sv(`vert`,1),"Shift-ArrowLeft":Cv(`horiz`,-1),"Shift-ArrowRight":Cv(`horiz`,1),"Shift-ArrowUp":Cv(`vert`,-1),"Shift-ArrowDown":Cv(`vert`,1),Backspace:dv,"Mod-Backspace":dv,Delete:dv,"Mod-Delete":dv});function xv(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Sv(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof A_)return xv(n,r,M.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=Dv(i,e,t);if(o==null)return!1;if(e==`horiz`)return xv(n,r,M.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=E_(i,e,t),s;return s=a?M.near(a,1):t<0?M.near(n.doc.resolve(i.before(-1)),-1):M.near(n.doc.resolve(i.after(-1)),1),xv(n,r,s)}}}function Cv(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof A_)o=a;else{let r=Dv(i,e,t);if(r==null)return!1;o=new A_(n.doc.resolve(r))}let s=E_(o.$headCell,e,t);return s?xv(n,r,new A_(o.$anchorCell,s)):!1}}function wv(e,t){let n=e.state.doc,r=v_(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new A_(r))),!0):!1}function Tv(e,t,n){if(!b_(e.state))return!1;let r=fv(n),i=e.state.selection;if(i instanceof A_){r||={width:1,height:1,rows:[A.from(mv(g_(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=d_.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=hv(r,o.right-o.left,o.bottom-o.top),yv(e.state,e.dispatch,a,o,r),!0}else if(r){let t=x_(e.state),n=t.start(-1);return yv(e.state,e.dispatch,n,d_.get(t.node(-1)).findCell(t.pos-n),r),!0}else return!1}function Ev(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=Ov(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof A_)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=v_(e.state.selection.$anchor))!=null&&kv(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=kv(e,n),i=__.getState(e.state)==null;if(!r||!T_(t,r))if(i)r=t;else return;let a=new A_(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(__,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),__.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(__,-1))}function o(r){let o=r,s=__.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(Ov(e,o.target)!=n&&(c=kv(e,t),!c))return a();c&&i(c,o)}e.root.addEventListener(`mouseup`,a),e.root.addEventListener(`dragstart`,a),e.root.addEventListener(`mousemove`,o)}function Dv(e,t,n){if(!(e.state.selection instanceof N))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}function Ov(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function kv(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&v_(e.state.doc.resolve(r))||v_(e.state.doc.resolve(i))}var Av=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),this.table.style.setProperty(`--default-cell-min-width`,`${t}px`),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),jv(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type==this.node.type?(this.node=e,jv(e,this.colgroup,this.table,this.defaultCellMinWidth),!0):!1}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function jv(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l){for(let e=0,n=0;e<l.childCount;e++){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e++,n++){let l=i==n?a:d&&d[e],u=l?l+`px`:``;if(o+=l||r,l||(s=!1),c)c.style.width!=u&&(c.style.width=u),c=c.nextSibling;else{let e=document.createElement(`col`);e.style.width=u,t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}s?(n.style.width=o+`px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=o+`px`)}}var Mv=new Wi(`tableColumnResizing`);function Nv({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=Av,lastColumnResizable:i=!0}={}){let a=new Vi({key:Mv,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=g_(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new Pv(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=Mv.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{Fv(t,n,e,i)},mouseleave:e=>{Iv(e)},mousedown:(e,r)=>{Lv(e,r,t,n)}},decorations:e=>{let t=Mv.getState(e);if(t&&t.activeHandle>-1)return Kv(e,t.activeHandle)},nodeViews:{}}});return a}var Pv=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(Mv);if(r&&r.setHandle!=null)return new e(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return C_(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function Fv(e,t,n,r){if(!e.editable)return;let i=Mv.getState(e.state);if(i&&!i.dragging){let a=zv(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=Bv(e,t,`left`,n):i-t.clientX<=n&&(o=Bv(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=d_.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Hv(e,o)}}}function Iv(e){if(!e.editable)return;let t=Mv.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Hv(e,-1)}function Lv(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=Mv.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=Rv(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(Mv,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=Mv.getState(e.state);r?.dragging&&(Uv(e,r.activeHandle,Vv(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Mv,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=Mv.getState(e.state);if(i&&i.dragging){let a=Vv(i.dragging,t,n);Wv(e,i.activeHandle,a,r)}}return Wv(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function Rv(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let a=e.domAtPos(t),o=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],s--);return o/s}function zv(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function Bv(e,t,n,r){let i=n==`right`?-r:r,a=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!a)return-1;let{pos:o}=a,s=v_(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=d_.get(s.node(-1)),l=s.start(-1),u=c.map.indexOf(s.pos-l);return u%c.width==0?-1:l+c.map[u-1]}function Vv(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Hv(e,t){e.dispatch(e.state.tr.setMeta(Mv,{setHandle:t}))}function Uv(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=d_.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<a.height;e++){let t=e*a.width+s;if(e&&a.map[t]==a.map[t-a.width])continue;let r=a.map[t],l=i.nodeAt(r).attrs,u=l.colspan==1?0:s-a.colCount(r);if(l.colwidth&&l.colwidth[u]==n)continue;let d=l.colwidth?l.colwidth.slice():Gv(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function Wv(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=d_.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,c=e.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!=`TABLE`;)c=c.parentNode;c&&jv(a,c.firstChild,c,r,s,n)}function Gv(e){return Array(e).fill(0)}function Kv(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return vl.empty;let a=d_.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let r=s+t*a.width;if((s==a.width-1||a.map[r]!=a.map[r+1])&&(t==0||a.map[r]!=a.map[r-a.width])){let t=a.map[r],s=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement(`div`);c.className=`column-resize-handle`,Mv.getState(e)?.dragging&&n.push(hl.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(hl.widget(s,c))}}return vl.create(e.doc,n)}function qv({allowTableNodeSelection:e=!1}={}){return new Vi({key:__,state:{init(){return null},apply(e,t){let n=e.getMeta(__);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:M_,handleDOMEvents:{mousedown:Ev},createSelectionBetween(e){return __.getState(e.state)==null?null:e.state.selection},handleTripleClick:wv,handleKeyDown:bv,handlePaste:Tv},appendTransaction(t,n,r){return F_(r,R_(r,n),e)}})}function Jv(e){return e===`left`||e===`right`||e===`center`?e:null}function Yv(e){let t=(e.style.textAlign||``).trim().toLowerCase(),n=(e.getAttribute(`align`)||``).trim().toLowerCase();return Jv(t||n)}function Xv(e){return Jv(e?.align)}function Zv(){return{default:null,parseHTML:e=>Yv(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var Qv=$p.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`),n=t?t.split(`,`).map(e=>parseInt(e,10)):null;if(!n){let t=e.closest(`table`)?.querySelectorAll(`colgroup > col`),n=Array.from(e.parentElement?.children||[]).indexOf(e);if(n&&n>-1&&t&&t[n]){let e=t[n].getAttribute(`width`);return e?[parseInt(e,10)]:null}}return n}},align:Zv()}},tableRole:`cell`,isolating:!0,parseHTML(){return[{tag:`td`}]},renderHTML({HTMLAttributes:e}){return[`td`,Ud(this.options.HTMLAttributes,e),0]}}),$v=$p.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):null}},align:Zv()}},tableRole:`header_cell`,isolating:!0,parseHTML(){return[{tag:`th`}]},renderHTML({HTMLAttributes:e}){return[`th`,Ud(this.options.HTMLAttributes,e),0]}}),ey=$p.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)*`,tableRole:`row`,parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,Ud(this.options.HTMLAttributes,e),0]}});function ty(e,t){return t?[`width`,`${Math.max(t,e)}px`]:[`min-width`,`${e}px`]}function ny(e,t,n,r,i,a){var o;let s=0,c=!0,l=t.firstChild,u=e.firstChild;if(u!==null)for(let e=0,n=0;e<u.childCount;e+=1){let{colspan:o,colwidth:d}=u.child(e).attrs;for(let e=0;e<o;e+=1,n+=1){let o=i===n?a:d&&d[e],u=o?`${o}px`:``;if(s+=o||r,o||(c=!1),l){if(l.style.width!==u){let[e,t]=ty(r,o);l.style.setProperty(e,t)}l=l.nextSibling}else{let e=document.createElement(`col`),[n,i]=ty(r,o);e.style.setProperty(n,i),t.appendChild(e)}}}for(;l;){let e=l.nextSibling;(o=l.parentNode)==null||o.removeChild(l),l=e}let d=e.attrs.style&&typeof e.attrs.style==`string`&&/\bwidth\s*:/i.test(e.attrs.style);c&&!d?(n.style.width=`${s}px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=`${s}px`)}var ry=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),ny(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type===this.node.type?(this.node=e,ny(e,this.colgroup,this.table,this.cellMinWidth),!0):!1}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!(n&&!r&&(e.type===`attributes`||e.type===`childList`||e.type===`characterData`))}};function iy(e,t,n,r){let i=0,a=!0,o=[],s=e.firstChild;if(!s)return{};for(let e=0,c=0;e<s.childCount;e+=1){let{colspan:l,colwidth:u}=s.child(e).attrs;for(let e=0;e<l;e+=1,c+=1){let s=n===c?r:u&&u[e];i+=s||t,s||(a=!1);let[l,d]=ty(t,s);o.push([`col`,{style:`${l}: ${d}`}])}}let c=a?`${i}px`:``,l=a?``:`${i}px`;return{colgroup:[`colgroup`,{},...o],tableWidth:c,tableMinWidth:l}}function ay(e,t){return t?e.createChecked(null,t):e.createAndFill()}function oy(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function sy(e,t,n,r,i){let a=oy(e),o=[],s=[];for(let e=0;e<n;e+=1){let e=ay(a.cell,i);if(e&&s.push(e),r){let e=ay(a.header_cell,i);e&&o.push(e)}}let c=[];for(let e=0;e<t;e+=1)c.push(a.row.createChecked(null,r&&e===0?o:s));return a.table.createChecked(null,c)}function cy(e){return e instanceof A_}var ly=({editor:e})=>{let{selection:t}=e.state;if(!cy(t))return!1;let n=0;return Md(t.ranges[0].$from,e=>e.type.name===`table`)?.node.descendants(e=>{if(e.type.name===`table`)return!1;[`tableCell`,`tableHeader`].includes(e.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1};function uy(e){return(e||``).replace(/\s+/g,` `).trim()}function dy(e,t,n={}){let r=n.cellLineSeparator??``;if(!e||!e.content||e.content.length===0)return``;let i=[];e.content.forEach(e=>{let n=[];e.content&&e.content.forEach(e=>{let i=``;i=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>t.renderChildren(e)).join(r):e.content?t.renderChildren(e.content):``;let a=uy(i),o=e.type===`tableHeader`,s=Xv(e.attrs);n.push({text:a,isHeader:o,align:s})}),i.push(n)});let a=i.reduce((e,t)=>Math.max(e,t.length),0);if(a===0)return``;let o=Array(a).fill(0);i.forEach(e=>{for(let t=0;t<a;t+=1){let n=(e[t]?.text||``).length;n>o[t]&&(o[t]=n),o[t]<3&&(o[t]=3)}});let s=(e,t)=>e+` `.repeat(Math.max(0,t-e.length)),c=i[0],l=c.some(e=>e.isHeader),u=Array(a).fill(null);i.forEach(e=>{for(let t=0;t<a;t+=1)!u[t]&&e[t]?.align&&(u[t]=e[t].align)});let d=`
126
126
  `,f=Array(a).fill(0).map((e,t)=>l&&c[t]&&c[t].text||``);return d+=`| ${f.map((e,t)=>s(e,o[t])).join(` | `)} |
127
127
  `,d+=`| ${o.map((e,t)=>{let n=Math.max(3,e),r=u[t];return r===`left`?`:${`-`.repeat(n)}`:r===`right`?`${`-`.repeat(n)}:`:r===`center`?`:${`-`.repeat(n)}:`:`-`.repeat(n)}).join(` | `)} |
128
128
  `,(l?i.slice(1):i).forEach(e=>{d+=`| ${Array(a).fill(0).map((t,n)=>s(e[n]&&e[n].text||``,o[n])).join(` | `)} |
129
- `}),d}var Iy=Fy,Ly=$p.create({name:`table`,addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Dy,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:`tableRow+`,tableRole:`table`,isolating:!0,group:`block`,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=Oy(e,this.options.cellMinWidth),a=t.style;function o(){return a||(r?`width: ${r}`:`min-width: ${i}`)}let s=[`table`,Ud(this.options.HTMLAttributes,t,{style:o()}),n,[`tbody`,0]];return this.options.renderWrapper?[`div`,{class:`tableWrapper`},s]:s},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{let a=vy(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableHeader`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{let a=vy(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableCell`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}),t.createNode(`table`,void 0,n)},renderMarkdown:(e,t)=>Iy(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:a})=>{let o=jy(a.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(N.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>fv(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>pv(e,t),deleteColumn:()=>({state:e,dispatch:t})=>hv(e,t),addRowBefore:()=>({state:e,dispatch:t})=>vv(e,t),addRowAfter:()=>({state:e,dispatch:t})=>yv(e,t),deleteRow:()=>({state:e,dispatch:t})=>xv(e,t),deleteTable:()=>({state:e,dispatch:t})=>Pv(e,t),mergeCells:()=>({state:e,dispatch:t})=>wv(e,t),splitCell:()=>({state:e,dispatch:t})=>Tv(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Av(`column`)(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Av(`row`)(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>jv(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>wv(e,t)?!0:Tv(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>Dv(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>Nv(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>Nv(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&cv(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=ev.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Ny,"Mod-Backspace":Ny,Delete:Ny,"Mod-Delete":Ny}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[ry({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_y({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){return{tableRole:Ld(F(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}});hp.create({name:`tableKit`,addExtensions(){let e=[];return this.options.table!==!1&&e.push(Ly.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Sy.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(Cy.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(wy.configure(this.options.tableRow)),e}});var Ry=/^\s*>\s$/,zy=$p.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Nm(`blockquote`,{...Ud(this.options.HTMLAttributes,e),children:Nm(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
129
+ `}),d}var fy=dy,py=$p.create({name:`table`,addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:ry,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:`tableRow+`,tableRole:`table`,isolating:!0,group:`block`,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=iy(e,this.options.cellMinWidth),a=t.style;function o(){return a||(r?`width: ${r}`:`min-width: ${i}`)}let s=[`table`,Ud(this.options.HTMLAttributes,t,{style:o()}),n,[`tbody`,0]];return this.options.renderWrapper?[`div`,{class:`tableWrapper`},s]:s},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{let a=Jv(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableHeader`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{let a=Jv(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableCell`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}),t.createNode(`table`,void 0,n)},renderMarkdown:(e,t)=>fy(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:a})=>{let o=sy(a.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(N.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>H_(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>U_(e,t),deleteColumn:()=>({state:e,dispatch:t})=>G_(e,t),addRowBefore:()=>({state:e,dispatch:t})=>J_(e,t),addRowAfter:()=>({state:e,dispatch:t})=>Y_(e,t),deleteRow:()=>({state:e,dispatch:t})=>Z_(e,t),deleteTable:()=>({state:e,dispatch:t})=>uv(e,t),mergeCells:()=>({state:e,dispatch:t})=>ev(e,t),splitCell:()=>({state:e,dispatch:t})=>tv(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>ov(`column`)(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>ov(`row`)(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>sv(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>ev(e,t)?!0:tv(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>rv(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>lv(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>lv(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&R_(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=A_.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ly,"Mod-Backspace":ly,Delete:ly,"Mod-Delete":ly}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Nv({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],qv({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){return{tableRole:Ld(F(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}});hp.create({name:`tableKit`,addExtensions(){let e=[];return this.options.table!==!1&&e.push(py.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Qv.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push($v.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(ey.configure(this.options.tableRow)),e}});var my=/^\s*>\s$/,hy=$p.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Em(`blockquote`,{...Ud(this.options.HTMLAttributes,e),children:Em(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
130
130
  `).map(e=>e.trim()===``?`>`:`> ${e}`);n.push(i.join(`
131
131
  `))}),n.join(`
132
132
  >
133
- `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Pp({find:Ry,type:this.type})]}}),By=/(^|[^`])`([^`]+)`(?!`)$/,Vy=/(^|[^`])`([^`]+)`(?!`)/g,Hy=op.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:``,addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[jp({find:By,type:this.type})]},addPasteRules(){return[tm({find:Vy,type:this.type})]}}),Uy=Hy,Wy=$p.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
133
+ `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Pp({find:my,type:this.type})]}}),gy=/(^|[^`])`([^`]+)`(?!`)$/,_y=/(^|[^`])`([^`]+)`(?!`)/g,vy=op.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:``,addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[jp({find:gy,type:this.type})]},addPasteRules(){return[tm({find:_y,type:this.type})]}}),yy=vy,by=$p.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
134
134
 
135
- `):``}),Gy=$p.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,Ud(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Lp(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return xf(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(N.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(P.create(t.doc,n.pos)):t.setSelection(N.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(N.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Mp({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Ky=Gy,qy=Object.defineProperty,Jy=(e,t)=>{for(var n in t)qy(e,n,{get:t[n],enumerable:!0})},Yy=`listItem`,Xy=`textStyle`,Zy=/^\s*([-+*])\s$/,Qy=$p.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
136
- `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Yy,this.editor.getAttributes(Xy)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Pp({find:Zy,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Pp({find:Zy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Xy),editor:this.editor})),[e]}}),$y=$p.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Jp(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});Jy({},{findListItemPos:()=>eb,getNextListDepth:()=>tb,handleBackspace:()=>ab,handleDelete:()=>cb,hasListBefore:()=>nb,hasListItemAfter:()=>lb,hasListItemBefore:()=>rb,listItemHasSubList:()=>ib,nextListIsDeeper:()=>ob,nextListIsHigher:()=>sb});var eb=(e,t)=>{let{$from:n}=t.selection,r=Tu(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},tb=(e,t)=>{let n=eb(e,t);if(!n)return!1;let[,r]=uf(t,e,n.$pos.pos+4);return r},nb=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},rb=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},ib=(e,t,n)=>{if(!n)return!1;let r=Tu(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},ab=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!dd(e.state,t)&&nb(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!dd(e.state,t)||!_f(e.state))return!1;let r=eb(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=ib(t,e.state,i);return rb(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},ob=(e,t)=>{let n=tb(e,t),r=eb(e,t);return!r||!n?!1:n>r.depth},sb=(e,t)=>{let n=tb(e,t),r=eb(e,t);return!r||!n?!1:n<r.depth},cb=(e,t)=>{if(!dd(e.state,t)||!gf(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:ob(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():sb(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},lb=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},ub=hp.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&cb(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&cb(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&ab(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&ab(e,n,r)&&(t=!0)}),t}}}}),db=/^(\s*)(\d+)\.\s+(.*)$/,fb=/^\s/;function pb(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(db);if(!a)break;let[,o,s,c]=a,l=o.length,u=c,d=n+1,f=[i];for(;d<e.length;){let t=e[d];if(t.match(db))break;if(t.trim()===``)f.push(t),u+=`
137
- `,d+=1;else if(t.match(fb))f.push(t),u+=`
135
+ `):``}),xy=$p.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,Ud(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!Lp(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return xf(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(N.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(P.create(t.doc,n.pos)):t.setSelection(N.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(N.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Mp({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Sy=xy,Cy=Object.defineProperty,wy=(e,t)=>{for(var n in t)Cy(e,n,{get:t[n],enumerable:!0})},Ty=`listItem`,Ey=`textStyle`,Dy=/^\s*([-+*])\s$/,Oy=$p.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
136
+ `):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Ty,this.editor.getAttributes(Ey)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Pp({find:Dy,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Pp({find:Dy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Ey),editor:this.editor})),[e]}}),ky=$p.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Jp(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});wy({},{findListItemPos:()=>Ay,getNextListDepth:()=>jy,handleBackspace:()=>Fy,handleDelete:()=>Ry,hasListBefore:()=>My,hasListItemAfter:()=>zy,hasListItemBefore:()=>Ny,listItemHasSubList:()=>Py,nextListIsDeeper:()=>Iy,nextListIsHigher:()=>Ly});var Ay=(e,t)=>{let{$from:n}=t.selection,r=Tu(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},jy=(e,t)=>{let n=Ay(e,t);if(!n)return!1;let[,r]=uf(t,e,n.$pos.pos+4);return r},My=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},Ny=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},Py=(e,t,n)=>{if(!n)return!1;let r=Tu(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},Fy=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!dd(e.state,t)&&My(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!dd(e.state,t)||!_f(e.state))return!1;let r=Ay(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=Py(t,e.state,i);return Ny(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},Iy=(e,t)=>{let n=jy(e,t),r=Ay(e,t);return!r||!n?!1:n>r.depth},Ly=(e,t)=>{let n=jy(e,t),r=Ay(e,t);return!r||!n?!1:n<r.depth},Ry=(e,t)=>{if(!dd(e.state,t)||!gf(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:Iy(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():Ly(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},zy=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},By=hp.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Ry(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&Ry(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Fy(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&Fy(e,n,r)&&(t=!0)}),t}}}}),Vy=/^(\s*)(\d+)\.\s+(.*)$/,Hy=/^\s/;function Uy(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(Vy);if(!a)break;let[,o,s,c]=a,l=o.length,u=c,d=n+1,f=[i];for(;d<e.length;){let t=e[d];if(t.match(Vy))break;if(t.trim()===``)f.push(t),u+=`
137
+ `,d+=1;else if(t.match(Hy))f.push(t),u+=`
138
138
  ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:u.trim(),raw:f.join(`
139
- `)}),r=d,n=d}return[t,r]}function mb(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let o=a.content.split(`
139
+ `)}),r=d,n=d}return[t,r]}function Wy(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let o=a.content.split(`
140
140
  `),s=o[0]?.trim()||``,c=[];s&&c.push({type:`paragraph`,raw:s,tokens:n.inlineTokens(s)});let l=o.slice(1).join(`
141
- `).trim();if(l){let e=n.blockTokens(l);c.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=mb(d,Math.min(...d.map(e=>e.indent)),n);c.push({type:`list`,ordered:!0,start:d[0].number,items:e,raw:d.map(e=>e.raw).join(`
142
- `)})}r.push({type:`list_item`,raw:a.raw,tokens:c}),i=u}else i+=1}return r}function hb(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var gb=`listItem`,_b=`textStyle`,vb=/^(\d+)\.\s$/,yb=$p.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,Ud(this.options.HTMLAttributes,n),0]:[`ol`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?hb(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
141
+ `).trim();if(l){let e=n.blockTokens(l);c.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=Wy(d,Math.min(...d.map(e=>e.indent)),n);c.push({type:`list`,ordered:!0,start:d[0].number,items:e,raw:d.map(e=>e.raw).join(`
142
+ `)})}r.push({type:`list_item`,raw:a.raw,tokens:c}),i=u}else i+=1}return r}function Gy(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var Ky=`listItem`,qy=`textStyle`,Jy=/^(\d+)\.\s$/,Yy=$p.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>e.getAttribute(`type`)}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return t===1?[`ol`,Ud(this.options.HTMLAttributes,n),0]:[`ol`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.items?Gy(e.items,t):[];return n===1?{type:`orderedList`,content:r}:{type:`orderedList`,attrs:{start:n},content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
143
143
  `):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
144
- `),[i,a]=pb(r);if(i.length===0)return;let o=mb(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
145
- `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(gb,this.editor.getAttributes(_b)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Pp({find:vb,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Pp({find:vb,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(_b)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),bb=/^\s*(\[([( |x])?\])\s$/,xb=$p.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Ud(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Jp(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=Wd(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Pp({find:bb,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),Sb=$p.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,Ud(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
146
- `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=qp(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=qp(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});hp.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Qy.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push($y.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(ub.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(yb.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(xb.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Sb.configure(this.options.taskList)),e}});var Cb=`&nbsp;`,wb=`\xA0`,Tb=$p.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Ud(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===Cb||n[0].text===Cb||n[0].raw===wb||n[0].text===wb)&&r.length===1&&r[0].type===`text`&&(r[0].text===Cb||r[0].text===wb)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?Cb:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Eb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Db=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Ob=op.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[jp({find:Eb,type:this.type})]},addPasteRules(){return[tm({find:Db,type:this.type})]}}),kb=$p.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),Ab=op.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Ud(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function jb(e={}){return new Vi({view(t){return new Mb(t,e)}})}var Mb=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=ti(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},Nb=class e extends M{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):M.near(r)}content(){return j.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new Pb(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!Ib(e)||!Lb(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!P.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};Nb.prototype.visible=!1,Nb.findFrom=Nb.findGapCursorFrom,M.jsonID(`gapcursor`,Nb);var Pb=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Nb.valid(t)?new Nb(t):M.near(t)}};function Fb(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function Ib(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||Fb(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Lb(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||Fb(e.type))return!0;if(e.inlineContent)return!1}}return!0}function Rb(){return new Vi({props:{decorations:Ub,createSelectionBetween(e,t,n){return t.pos==n.pos&&Nb.valid(n)?new Nb(n):null},handleClick:Vb,handleKeyDown:zb,handleDOMEvents:{beforeinput:Hb}}})}var zb=fu({ArrowLeft:Bb(`horiz`,-1),ArrowRight:Bb(`horiz`,1),ArrowUp:Bb(`vert`,-1),ArrowDown:Bb(`vert`,1)});function Bb(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof N){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=Nb.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new Nb(c))),!0):!1}}function Vb(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Nb.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&P.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Nb(r))),!0)}function Hb(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof Nb))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=A.empty;for(let e=r.length-1;e>=0;e--)i=A.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new j(i,0,0));return a.setSelection(N.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Ub(e){if(!(e.selection instanceof Nb))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,vl.create(e.doc,[hl.widget(e.selection.head,t,{key:`gapcursor`})])}var Wb=200,Gb=function(){};Gb.prototype.append=function(e){return e.length?(e=Gb.from(e),!this.length&&e||e.length<Wb&&this.leafAppend(e)||this.length<Wb&&e.leafPrepend(this)||this.appendInner(e)):this},Gb.prototype.prepend=function(e){return e.length?Gb.from(e).append(this):this},Gb.prototype.appendInner=function(e){return new qb(this,e)},Gb.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Gb.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Gb.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Gb.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Gb.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},Gb.from=function(e){return e instanceof Gb?e:e&&e.length?new Kb(e):Gb.empty};var Kb=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=Wb)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Wb)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Gb);Gb.empty=new Kb([]);var qb=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Gb),Jb=500,Yb=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new Zb(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new Zb(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new Zb(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>$b&&(s=Xb(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new yr;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new Zb(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new Zb(i,o,l))}else r.push(new Zb(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new Zb(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>Jb&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new Zb(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(Gb.from(i.reverse()),a)}};Yb.empty=new Yb(Gb.empty,0);function Xb(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var Zb=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Qb=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},$b=20;function ex(e,t,n,r){let i=n.getMeta(cx),a;if(i)return i.historyState;n.getMeta(lx)&&(e=new Qb(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(cx))return o.getMeta(cx).redo?new Qb(e.done.addTransform(n,void 0,r,sx(t)),e.undone,nx(n.mapping.maps),e.prevTime,e.prevComposition):new Qb(e.done,e.undone.addTransform(n,void 0,r,sx(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!tx(n,e.prevRanges)),s=o?rx(e.prevRanges,n.mapping):nx(n.mapping.maps);return new Qb(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,sx(t)),Yb.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new Qb(e.done.rebased(n,a),e.undone.rebased(n,a),rx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new Qb(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),rx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function tx(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function nx(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function rx(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function ix(e,t,n){let r=sx(t),i=cx.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new Qb(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(cx,{redo:n,historyState:c})}var ax=!1,ox=null;function sx(e){let t=e.plugins;if(ox!=t){ax=!1,ox=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){ax=!0;break}}return ax}var cx=new Wi(`history`),lx=new Wi(`closeHistory`);function ux(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Vi({key:cx,state:{init(){return new Qb(Yb.empty,Yb.empty,null,0,-1)},apply(t,n,r){return ex(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?fx:n==`historyRedo`?px:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function dx(e,t){return(n,r)=>{let i=cx.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=ix(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var fx=dx(!1,!0),px=dx(!0,!0);hp.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Vi({key:new Wi(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var mx=hp.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[jb(this.options)]}});hp.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Vi({key:new Wi(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return vl.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(hl.node(t,t+e.nodeSize,{class:this.options.className}))}),vl.create(e,a)}}})]}});var hx=hp.create({name:`gapCursor`,addProseMirrorPlugins(){return[Rb()]},extendNodeSchema(e){return{allowGapCursor:Ld(F(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),gx=`placeholder`;function _x(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var vx=hp.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:gx,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${_x(this.options.dataAttribute)}`:`data-${gx}`;return[new Vi({key:new Wi(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&bf(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=hl.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),vl.create(t,a)}}})]}});hp.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Vi({key:new Wi(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||xf(n.selection)||e.view.dragging?null:vl.create(n.doc,[hl.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function yx({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var bx=hp.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Wi(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Vi({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!yx({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!yx({node:r,types:n})}}})]}}),xx=hp.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>fx(e,t),redo:()=>({state:e,dispatch:t})=>px(e,t)}},addProseMirrorPlugins(){return[ux(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Sx=hp.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(Rm.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(zy.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(Qy.configure(this.options.bulletList)),this.options.code!==!1&&e.push(Hy.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(jm.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Wy.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(mx.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(hx.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(Xm.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Qm.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(xx.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Gy.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(Wm.configure(this.options.italic)),this.options.listItem!==!1&&e.push($y.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(ub.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(g_.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(yb.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(Tb.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(Ob.configure(this.options.strike)),this.options.text!==!1&&e.push(kb.configure(this.options.text)),this.options.underline!==!1&&e.push(Ab.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(bx.configure(this.options?.trailingNode)),e}}),Cx=Uy.extend({excludes:``}),wx=Ky.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}}});function Tx(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function Ex(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var Dx=$p.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:Tx(e.getAttribute(`data-alias`)),anchor:Tx(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:Tx(e.getAttribute(`data-alias`)),anchor:Tx(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=Tx(e.attrs.alias),i=Tx(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},Ex({target:n,alias:r,anchor:i})]}}),Ox=[th,D_,nh,Dx,T_,E_,Gm,Km,Cx,Mm,$m,wx,__,eh,v_,Zm,qm,Sx.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,italic:!1,bold:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1}),Ly.configure({resizable:!0}),wy,Cy,Sy,M_.configure({inline:!0}),A_],kx=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};kx.prototype.normal={},kx.prototype.property={},kx.prototype.space=void 0;function Ax(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new kx(n,r,t)}function jx(e){return e.toLowerCase()}var Mx=class{constructor(e,t){this.attribute=t,this.property=e}};Mx.prototype.attribute=``,Mx.prototype.booleanish=!1,Mx.prototype.boolean=!1,Mx.prototype.commaOrSpaceSeparated=!1,Mx.prototype.commaSeparated=!1,Mx.prototype.defined=!1,Mx.prototype.mustUseProperty=!1,Mx.prototype.number=!1,Mx.prototype.overloadedBoolean=!1,Mx.prototype.property=``,Mx.prototype.spaceSeparated=!1,Mx.prototype.space=void 0;var Nx=e({boolean:()=>R,booleanish:()=>Fx,commaOrSpaceSeparated:()=>zx,commaSeparated:()=>Rx,number:()=>z,overloadedBoolean:()=>Ix,spaceSeparated:()=>Lx}),Px=0,R=Bx(),Fx=Bx(),Ix=Bx(),z=Bx(),Lx=Bx(),Rx=Bx(),zx=Bx();function Bx(){return 2**++Px}var Vx=Object.keys(Nx),Hx=class extends Mx{constructor(e,t,n,r){let i=-1;if(super(e,t),Ux(this,`space`,r),typeof n==`number`)for(;++i<Vx.length;){let e=Vx[i];Ux(this,Vx[i],(n&Nx[e])===Nx[e])}}};Hx.prototype.defined=!0;function Ux(e,t,n){n&&(e[t]=n)}function Wx(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Hx(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[jx(r)]=r,n[jx(a.attribute)]=r}return new kx(t,n,e.space)}var Gx=Wx({properties:{ariaActiveDescendant:null,ariaAtomic:Fx,ariaAutoComplete:null,ariaBusy:Fx,ariaChecked:Fx,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Lx,ariaCurrent:null,ariaDescribedBy:Lx,ariaDetails:null,ariaDisabled:Fx,ariaDropEffect:Lx,ariaErrorMessage:null,ariaExpanded:Fx,ariaFlowTo:Lx,ariaGrabbed:Fx,ariaHasPopup:null,ariaHidden:Fx,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Lx,ariaLevel:z,ariaLive:null,ariaModal:Fx,ariaMultiLine:Fx,ariaMultiSelectable:Fx,ariaOrientation:null,ariaOwns:Lx,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Fx,ariaReadOnly:Fx,ariaRelevant:null,ariaRequired:Fx,ariaRoleDescription:Lx,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Fx,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Kx(e,t){return t in e?e[t]:t}function qx(e,t){return Kx(e,t.toLowerCase())}var Jx=Wx({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Rx,acceptCharset:Lx,accessKey:Lx,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:Lx,autoFocus:R,autoPlay:R,blocking:Lx,capture:null,charSet:null,checked:R,cite:null,className:Lx,cols:z,colSpan:null,content:null,contentEditable:Fx,controls:R,controlsList:Lx,coords:z|Rx,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:Ix,draggable:Fx,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:Lx,height:z,hidden:Ix,high:z,href:null,hrefLang:null,htmlFor:Lx,httpEquiv:Lx,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:Lx,itemRef:Lx,itemScope:R,itemType:Lx,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:R,optimum:z,pattern:null,ping:Lx,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:Lx,required:R,reversed:R,rows:z,rowSpan:z,sandbox:Lx,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Fx,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:Fx,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Lx,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Fx,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:R,disableRemotePlayback:R,prefix:null,property:null,results:z,security:null,unselectable:null},space:`html`,transform:qx}),Yx=Wx({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:zx,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:Lx,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:Rx,g2:Rx,glyphName:Rx,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:zx,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,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:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Lx,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zx,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zx,rev:zx,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zx,requiredFeatures:zx,requiredFonts:zx,requiredFormats:zx,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:zx,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zx,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zx,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Kx}),Xx=Wx({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()}}),Zx=Wx({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:qx}),Qx=Wx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),$x=/[A-Z]/g,eS=/-[a-z]/g,tS=/^data[-\w.:]+$/i;function nS(e,t){let n=jx(t),r=t,i=Mx;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&tS.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(eS,iS);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!eS.test(e)){let n=e.replace($x,rS);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Hx}return new i(r,t)}function rS(e){return`-`+e.toLowerCase()}function iS(e){return e.charAt(1).toUpperCase()}var aS=Ax([Gx,Jx,Xx,Zx,Qx],`html`),oS=Ax([Gx,Yx,Xx,Zx,Qx],`svg`);function sS(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function cS(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var lS=/[#.]/g;function uS(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){lS.lastIndex=i;let e=lS.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function dS(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function fS(e){return e.join(` `).trim()}function pS(e,t,n){let r=n?yS(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=uS(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,mS(i))a.unshift(i);else for(let[t,n]of Object.entries(i))hS(e,o.properties,t,n)}for(let e of a)gS(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function mS(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function hS(e,t,n,r){let i=nS(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?dS(r):i.commaSeparated?sS(r):i.commaOrSpaceSeparated?dS(sS(r).join(` `)):_S(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?vS(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(_S(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function gS(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)gS(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?gS(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function _S(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||jx(n)===jx(t)))return!0}return n}function vS(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function yS(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var bS=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),xS=pS(aS,`div`),SS=pS(oS,`g`,bS);function CS(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=wS(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=wS(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function wS(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
147
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var TS={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},ES={}.hasOwnProperty,DS=Object.prototype;function OS(e,t){let n=t||{};return kS({file:n.file||void 0,location:!1,schema:n.space===`svg`?oS:aS,verbose:n.verbose||!1},e)}function kS(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},MS(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:AS(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=CS(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},MS(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},MS(e,r,n),n}default:return n=jS(e,t),n}}function AS(e,t){let n=-1,r=[];for(;++n<t.length;){let i=kS(e,t[n]);r.push(i)}return r}function jS(e,t){let n=e.schema;e.schema=t.namespaceURI===TS.svg?oS:aS;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;ES.call(DS,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?SS:xS)(t.tagName,i,AS(e,t.childNodes));if(MS(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&PS(r.startTag),o=r&&r.endTag&&PS(r.endTag),s=kS(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function MS(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=NS(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function NS(e,t,n){let r=PS(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)ES.call(n.attrs,i)&&(r[nS(e.schema,i).property]=PS(n.attrs[i]));n.startTag;let a=PS(n.startTag),o=n.endTag?PS(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function PS(e){let t=FS({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=FS({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function FS(e){return e.line&&e.column?e:void 0}var IS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),B;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(B||={});var LS={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function RS(e){return e>=55296&&e<=57343}function zS(e){return e>=56320&&e<=57343}function BS(e,t){return(e-55296)*1024+9216+t}function VS(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function HS(e){return e>=64976&&e<=65007||IS.has(e)}var V;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(V||={});var US=65536,WS=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=US,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(zS(t))return this.pos++,this._addGap(),BS(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(V.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let n=this.html.charCodeAt(t);return n===B.CARRIAGE_RETURN?B.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let e=this.html.charCodeAt(this.pos);return e===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):e===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,RS(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===B.LINE_FEED||e===B.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){VS(e)?this._err(V.controlCharacterInInputStream):HS(e)&&this._err(V.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},GS;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(GS||={});function KS(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var qS=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),JS=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function YS(e){return e>=55296&&e<=57343||e>1114111?65533:JS.get(e)??e}var XS;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(XS||={});var ZS=32,QS;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(QS||={});function $S(e){return e>=XS.ZERO&&e<=XS.NINE}function eC(e){return e>=XS.UPPER_A&&e<=XS.UPPER_F||e>=XS.LOWER_A&&e<=XS.LOWER_F}function tC(e){return e>=XS.UPPER_A&&e<=XS.UPPER_Z||e>=XS.LOWER_A&&e<=XS.LOWER_Z||$S(e)}function nC(e){return e===XS.EQUALS||tC(e)}var rC;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(rC||={});var iC;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(iC||={});var aC=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=rC.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=iC.Strict}startEntity(e){this.decodeMode=e,this.state=rC.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case rC.EntityStart:return e.charCodeAt(t)===XS.NUM?(this.state=rC.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=rC.NamedEntity,this.stateNamedEntity(e,t));case rC.NumericStart:return this.stateNumericStart(e,t);case rC.NumericDecimal:return this.stateNumericDecimal(e,t);case rC.NumericHex:return this.stateNumericHex(e,t);case rC.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|ZS)===XS.LOWER_X?(this.state=rC.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=rC.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($S(r)||eC(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if($S(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===XS.SEMI)this.consumed+=1;else if(this.decodeMode===iC.Strict)return 0;return this.emitCodePoint(YS(this.result),this.consumed),this.errors&&(e!==XS.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&QS.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=oC(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===iC.Attribute&&(i===0||nC(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&QS.VALUE_LENGTH)>>14,i!==0){if(a===XS.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==iC.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&QS.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~QS.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case rC.NamedEntity:return this.result!==0&&(this.decodeMode!==iC.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case rC.NumericDecimal:return this.emitNumericEntity(0,2);case rC.NumericHex:return this.emitNumericEntity(0,3);case rC.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case rC.EntityStart:return 0}}};function oC(e,t,n,r){let i=(t&QS.BRANCH_LENGTH)>>7,a=t&QS.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var H;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(H||={});var sC;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(sC||={});var cC;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(cC||={});var U;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(U||={});var W;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(W||={});var lC=new Map([[U.A,W.A],[U.ADDRESS,W.ADDRESS],[U.ANNOTATION_XML,W.ANNOTATION_XML],[U.APPLET,W.APPLET],[U.AREA,W.AREA],[U.ARTICLE,W.ARTICLE],[U.ASIDE,W.ASIDE],[U.B,W.B],[U.BASE,W.BASE],[U.BASEFONT,W.BASEFONT],[U.BGSOUND,W.BGSOUND],[U.BIG,W.BIG],[U.BLOCKQUOTE,W.BLOCKQUOTE],[U.BODY,W.BODY],[U.BR,W.BR],[U.BUTTON,W.BUTTON],[U.CAPTION,W.CAPTION],[U.CENTER,W.CENTER],[U.CODE,W.CODE],[U.COL,W.COL],[U.COLGROUP,W.COLGROUP],[U.DD,W.DD],[U.DESC,W.DESC],[U.DETAILS,W.DETAILS],[U.DIALOG,W.DIALOG],[U.DIR,W.DIR],[U.DIV,W.DIV],[U.DL,W.DL],[U.DT,W.DT],[U.EM,W.EM],[U.EMBED,W.EMBED],[U.FIELDSET,W.FIELDSET],[U.FIGCAPTION,W.FIGCAPTION],[U.FIGURE,W.FIGURE],[U.FONT,W.FONT],[U.FOOTER,W.FOOTER],[U.FOREIGN_OBJECT,W.FOREIGN_OBJECT],[U.FORM,W.FORM],[U.FRAME,W.FRAME],[U.FRAMESET,W.FRAMESET],[U.H1,W.H1],[U.H2,W.H2],[U.H3,W.H3],[U.H4,W.H4],[U.H5,W.H5],[U.H6,W.H6],[U.HEAD,W.HEAD],[U.HEADER,W.HEADER],[U.HGROUP,W.HGROUP],[U.HR,W.HR],[U.HTML,W.HTML],[U.I,W.I],[U.IMG,W.IMG],[U.IMAGE,W.IMAGE],[U.INPUT,W.INPUT],[U.IFRAME,W.IFRAME],[U.KEYGEN,W.KEYGEN],[U.LABEL,W.LABEL],[U.LI,W.LI],[U.LINK,W.LINK],[U.LISTING,W.LISTING],[U.MAIN,W.MAIN],[U.MALIGNMARK,W.MALIGNMARK],[U.MARQUEE,W.MARQUEE],[U.MATH,W.MATH],[U.MENU,W.MENU],[U.META,W.META],[U.MGLYPH,W.MGLYPH],[U.MI,W.MI],[U.MO,W.MO],[U.MN,W.MN],[U.MS,W.MS],[U.MTEXT,W.MTEXT],[U.NAV,W.NAV],[U.NOBR,W.NOBR],[U.NOFRAMES,W.NOFRAMES],[U.NOEMBED,W.NOEMBED],[U.NOSCRIPT,W.NOSCRIPT],[U.OBJECT,W.OBJECT],[U.OL,W.OL],[U.OPTGROUP,W.OPTGROUP],[U.OPTION,W.OPTION],[U.P,W.P],[U.PARAM,W.PARAM],[U.PLAINTEXT,W.PLAINTEXT],[U.PRE,W.PRE],[U.RB,W.RB],[U.RP,W.RP],[U.RT,W.RT],[U.RTC,W.RTC],[U.RUBY,W.RUBY],[U.S,W.S],[U.SCRIPT,W.SCRIPT],[U.SEARCH,W.SEARCH],[U.SECTION,W.SECTION],[U.SELECT,W.SELECT],[U.SOURCE,W.SOURCE],[U.SMALL,W.SMALL],[U.SPAN,W.SPAN],[U.STRIKE,W.STRIKE],[U.STRONG,W.STRONG],[U.STYLE,W.STYLE],[U.SUB,W.SUB],[U.SUMMARY,W.SUMMARY],[U.SUP,W.SUP],[U.TABLE,W.TABLE],[U.TBODY,W.TBODY],[U.TEMPLATE,W.TEMPLATE],[U.TEXTAREA,W.TEXTAREA],[U.TFOOT,W.TFOOT],[U.TD,W.TD],[U.TH,W.TH],[U.THEAD,W.THEAD],[U.TITLE,W.TITLE],[U.TR,W.TR],[U.TRACK,W.TRACK],[U.TT,W.TT],[U.U,W.U],[U.UL,W.UL],[U.SVG,W.SVG],[U.VAR,W.VAR],[U.WBR,W.WBR],[U.XMP,W.XMP]]);function uC(e){return lC.get(e)??W.UNKNOWN}var G=W,dC={[H.HTML]:new Set([G.ADDRESS,G.APPLET,G.AREA,G.ARTICLE,G.ASIDE,G.BASE,G.BASEFONT,G.BGSOUND,G.BLOCKQUOTE,G.BODY,G.BR,G.BUTTON,G.CAPTION,G.CENTER,G.COL,G.COLGROUP,G.DD,G.DETAILS,G.DIR,G.DIV,G.DL,G.DT,G.EMBED,G.FIELDSET,G.FIGCAPTION,G.FIGURE,G.FOOTER,G.FORM,G.FRAME,G.FRAMESET,G.H1,G.H2,G.H3,G.H4,G.H5,G.H6,G.HEAD,G.HEADER,G.HGROUP,G.HR,G.HTML,G.IFRAME,G.IMG,G.INPUT,G.LI,G.LINK,G.LISTING,G.MAIN,G.MARQUEE,G.MENU,G.META,G.NAV,G.NOEMBED,G.NOFRAMES,G.NOSCRIPT,G.OBJECT,G.OL,G.P,G.PARAM,G.PLAINTEXT,G.PRE,G.SCRIPT,G.SECTION,G.SELECT,G.SOURCE,G.STYLE,G.SUMMARY,G.TABLE,G.TBODY,G.TD,G.TEMPLATE,G.TEXTAREA,G.TFOOT,G.TH,G.THEAD,G.TITLE,G.TR,G.TRACK,G.UL,G.WBR,G.XMP]),[H.MATHML]:new Set([G.MI,G.MO,G.MN,G.MS,G.MTEXT,G.ANNOTATION_XML]),[H.SVG]:new Set([G.TITLE,G.FOREIGN_OBJECT,G.DESC]),[H.XLINK]:new Set,[H.XML]:new Set,[H.XMLNS]:new Set},fC=new Set([G.H1,G.H2,G.H3,G.H4,G.H5,G.H6]);new Set([U.STYLE,U.SCRIPT,U.XMP,U.IFRAME,U.NOEMBED,U.NOFRAMES,U.PLAINTEXT]);var K;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(K||={});var pC={DATA:K.DATA,RCDATA:K.RCDATA,RAWTEXT:K.RAWTEXT,SCRIPT_DATA:K.SCRIPT_DATA,PLAINTEXT:K.PLAINTEXT,CDATA_SECTION:K.CDATA_SECTION};function mC(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function hC(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function gC(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function _C(e){return gC(e)||hC(e)}function vC(e){return _C(e)||mC(e)}function yC(e){return e+32}function bC(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function xC(e){return bC(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function SC(e){return e===B.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:RS(e)?V.surrogateCharacterReference:HS(e)?V.noncharacterCharacterReference:VS(e)||e===B.CARRIAGE_RETURN?V.controlCharacterReference:null}var CC=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=K.DATA,this.returnState=K.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new WS(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new aC(qS,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=SC(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:GS.START_TAG,tagName:``,tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:GS.END_TAG,tagName:``,tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:GS.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:GS.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(KS(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=uC(e.tagName),e.type===GS.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(V.endTagWithAttributes),e.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case GS.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case GS.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case GS.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:GS.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=bC(e)?GS.WHITESPACE_CHARACTER:e===B.NULL?GS.NULL_CHARACTER:GS.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(GS.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=K.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?iC.Attribute:iC.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===K.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case K.DATA:this._stateData(e);break;case K.RCDATA:this._stateRcdata(e);break;case K.RAWTEXT:this._stateRawtext(e);break;case K.SCRIPT_DATA:this._stateScriptData(e);break;case K.PLAINTEXT:this._statePlaintext(e);break;case K.TAG_OPEN:this._stateTagOpen(e);break;case K.END_TAG_OPEN:this._stateEndTagOpen(e);break;case K.TAG_NAME:this._stateTagName(e);break;case K.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case K.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case K.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case K.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case K.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case K.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case K.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case K.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case K.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case K.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case K.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case K.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case K.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case K.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case K.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case K.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case K.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case K.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case K.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case K.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case K.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case K.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case K.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case K.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case K.BOGUS_COMMENT:this._stateBogusComment(e);break;case K.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case K.COMMENT_START:this._stateCommentStart(e);break;case K.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case K.COMMENT:this._stateComment(e);break;case K.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case K.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case K.COMMENT_END:this._stateCommentEnd(e);break;case K.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case K.DOCTYPE:this._stateDoctype(e);break;case K.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case K.DOCTYPE_NAME:this._stateDoctypeName(e);break;case K.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case K.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case K.CDATA_SECTION:this._stateCdataSection(e);break;case K.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case K.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case K.CHARACTER_REFERENCE:this._stateCharacterReference();break;case K.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.TAG_OPEN;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitCodePoint(e);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case B.AMPERSAND:this._startCharacterReference();break;case B.LESS_THAN_SIGN:this.state=K.RCDATA_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.RAWTEXT_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(_C(e))this._createStartTagToken(),this.state=K.TAG_NAME,this._stateTagName(e);else switch(e){case B.EXCLAMATION_MARK:this.state=K.MARKUP_DECLARATION_OPEN;break;case B.SOLIDUS:this.state=K.END_TAG_OPEN;break;case B.QUESTION_MARK:this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e);break;case B.EOF:this._err(V.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=K.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(_C(e))this._createEndTagToken(),this.state=K.TAG_NAME,this._stateTagName(e);else switch(e){case B.GREATER_THAN_SIGN:this._err(V.missingEndTagName),this.state=K.DATA;break;case B.EOF:this._err(V.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.SOLIDUS:this.state=K.SELF_CLOSING_START_TAG;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentTagToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),t.tagName+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(hC(e)?yC(e):e)}}_stateRcdataLessThanSign(e){e===B.SOLIDUS?this.state=K.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=K.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){_C(e)?(this.state=K.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=K.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=K.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=K.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=K.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===B.SOLIDUS?this.state=K.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){_C(e)?(this.state=K.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case B.SOLIDUS:this.state=K.SCRIPT_DATA_END_TAG_OPEN;break;case B.EXCLAMATION_MARK:this.state=K.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=K.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){_C(e)?(this.state=K.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===B.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===B.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.GREATER_THAN_SIGN:this.state=K.SCRIPT_DATA,this._emitChars(`>`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===B.SOLIDUS?this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:_C(e)?(this._emitChars(`<`),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){_C(e)?(this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(LS.SCRIPT,!1)&&xC(this.preprocessor.peek(LS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<LS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.GREATER_THAN_SIGN:this.state=K.SCRIPT_DATA,this._emitChars(`>`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===B.SOLIDUS?(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(LS.SCRIPT,!1)&&xC(this.preprocessor.peek(LS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<LS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case B.EQUALS_SIGN:this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=K.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:this._leaveAttrName(),this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case B.EQUALS_SIGN:this._leaveAttrName(),this.state=K.BEFORE_ATTRIBUTE_VALUE;break;case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(hC(e)?yC(e):e)}}_stateAfterAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:this.state=K.SELF_CLOSING_START_TAG;break;case B.EQUALS_SIGN:this.state=K.BEFORE_ATTRIBUTE_VALUE;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentTagToken();break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:this.state=K.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case B.APOSTROPHE:this.state=K.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingAttributeValue),this.state=K.DATA,this.emitCurrentTagToken();break;default:this.state=K.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case B.APOSTROPHE:this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.AMPERSAND:this._startCharacterReference();break;case B.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.SOLIDUS:this._leaveAttrValue(),this.state=K.SELF_CLOSING_START_TAG;break;case B.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.missingWhitespaceBetweenAttributes),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case B.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=K.DATA,this.emitCurrentTagToken();break}case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.unexpectedSolidusInTag),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(LS.DASH_DASH,!0)?(this._createCommentToken(LS.DASH_DASH.length+1),this.state=K.COMMENT_START):this._consumeSequenceIfMatch(LS.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(LS.DOCTYPE.length+1),this.state=K.DOCTYPE):this._consumeSequenceIfMatch(LS.CDATA_START,!0)?this.inForeignNode?this.state=K.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(LS.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=K.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_START_DASH;break;case B.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=K.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=K.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END;break;case B.GREATER_THAN_SIGN:this._err(V.abruptClosingOfEmptyComment),this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=K.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END_DASH;break;case B.LESS_THAN_SIGN:t.data+=`<`,this.state=K.COMMENT_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.data+=`�`;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case B.EXCLAMATION_MARK:t.data+=`!`,this.state=K.COMMENT_LESS_THAN_SIGN_BANG;break;case B.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=K.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===B.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=K.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===B.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=K.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==B.GREATER_THAN_SIGN&&e!==B.EOF&&this._err(V.nestedComment),this.state=K.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=K.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentComment(t);break;case B.EXCLAMATION_MARK:this.state=K.COMMENT_END_BANG;break;case B.HYPHEN_MINUS:t.data+=`-`;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=K.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:t.data+=`--!`,this.state=K.COMMENT_END_DASH;break;case B.GREATER_THAN_SIGN:this._err(V.incorrectlyClosedComment),this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=K.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case B.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(hC(e))this._createDoctypeToken(String.fromCharCode(yC(e))),this.state=K.DOCTYPE_NAME;else switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:this._err(V.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=K.DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=K.DATA;break}case B.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=K.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.AFTER_DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.NULL:this._err(V.unexpectedNullCharacter),t.name+=`�`;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(hC(e)?yC(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(LS.PUBLIC,!1)?this.state=K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(LS.SYSTEM,!1)?this.state=K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.publicId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case B.APOSTROPHE:this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.publicId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.QUOTATION_MARK:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.systemId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case B.APOSTROPHE:this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.systemId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.NULL:this._err(V.unexpectedNullCharacter);break;case B.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case B.RIGHT_SQUARE_BRACKET:this.state=K.CDATA_SECTION_BRACKET;break;case B.EOF:this._err(V.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===B.RIGHT_SQUARE_BRACKET?this.state=K.CDATA_SECTION_END:(this._emitChars(`]`),this.state=K.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA;break;case B.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=K.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&vC(this.preprocessor.peek(1))?K.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){vC(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===B.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},wC=new Set([W.DD,W.DT,W.LI,W.OPTGROUP,W.OPTION,W.P,W.RB,W.RP,W.RT,W.RTC]),TC=new Set([...wC,W.CAPTION,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]),EC=new Set([W.APPLET,W.CAPTION,W.HTML,W.MARQUEE,W.OBJECT,W.TABLE,W.TD,W.TEMPLATE,W.TH]),DC=new Set([...EC,W.OL,W.UL]),OC=new Set([...EC,W.BUTTON]),kC=new Set([W.ANNOTATION_XML,W.MI,W.MN,W.MO,W.MS,W.MTEXT]),AC=new Set([W.DESC,W.FOREIGN_OBJECT,W.TITLE]),jC=new Set([W.TR,W.TEMPLATE,W.HTML]),MC=new Set([W.TBODY,W.TFOOT,W.THEAD,W.TEMPLATE,W.HTML]),NC=new Set([W.TABLE,W.TEMPLATE,W.HTML]),PC=new Set([W.TD,W.TH]),FC=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=W.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===W.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===H.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==H.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(fC,H.HTML)}popUntilTableCellPopped(){this.popUntilPopped(PC,H.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(NC,H.HTML)}clearBackToTableBodyContext(){this.clearBackTo(MC,H.HTML)}clearBackToTableRowContext(){this.clearBackTo(jC,H.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===W.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===W.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case H.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case H.SVG:if(AC.has(r))return!1;break;case H.MATHML:if(kC.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,EC)}hasInListItemScope(e){return this.hasInDynamicScope(e,DC)}hasInButtonScope(e){return this.hasInDynamicScope(e,OC)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case H.HTML:if(fC.has(t))return!0;if(EC.has(t))return!1;break;case H.SVG:if(AC.has(t))return!1;break;case H.MATHML:if(kC.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case e:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===H.HTML)switch(this.tagIDs[e]){case W.TBODY:case W.THEAD:case W.TFOOT:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case e:return!0;case W.OPTION:case W.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&wC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&TC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&TC.has(this.currentTagId);)this.pop()}},IC=3,LC;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(LC||={});var RC={type:LC.Marker},zC=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===LC.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<IC)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<IC)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=IC&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(RC)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:LC.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:LC.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(RC);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===LC.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===LC.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===LC.Element&&t.element===e)}},BC={createDocument(){return{nodeName:`#document`,mode:cC.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};BC.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(BC.isTextNode(n)){n.value+=t;return}}BC.appendChild(e,BC.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&BC.isTextNode(r)?r.value+=t:BC.insertBefore(e,BC.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},VC=`html`,HC=`about:legacy-compat`,UC=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,WC=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),GC=[...WC,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],KC=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),qC=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],JC=[...qC,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function YC(e,t){return t.some(t=>e.startsWith(t))}function XC(e){return e.name===VC&&e.publicId===null&&(e.systemId===null||e.systemId===HC)}function ZC(e){if(e.name!==VC)return cC.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===UC)return cC.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),KC.has(n))return cC.QUIRKS;let e=t===null?GC:WC;if(YC(n,e))return cC.QUIRKS;if(e=t===null?qC:JC,YC(n,e))return cC.LIMITED_QUIRKS}return cC.NO_QUIRKS}var QC={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},$C=`definitionurl`,ew=`definitionURL`,tw=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),nw=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:H.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:H.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:H.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:H.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:H.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:H.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:H.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:H.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:H.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:H.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:H.XMLNS}]]),rw=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),iw=new Set([W.B,W.BIG,W.BLOCKQUOTE,W.BODY,W.BR,W.CENTER,W.CODE,W.DD,W.DIV,W.DL,W.DT,W.EM,W.EMBED,W.H1,W.H2,W.H3,W.H4,W.H5,W.H6,W.HEAD,W.HR,W.I,W.IMG,W.LI,W.LISTING,W.MENU,W.META,W.NOBR,W.OL,W.P,W.PRE,W.RUBY,W.S,W.SMALL,W.SPAN,W.STRONG,W.STRIKE,W.SUB,W.SUP,W.TABLE,W.TT,W.U,W.UL,W.VAR]);function aw(e){let t=e.tagID;return t===W.FONT&&e.attrs.some(({name:e})=>e===sC.COLOR||e===sC.SIZE||e===sC.FACE)||iw.has(t)}function ow(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===$C){e.attrs[t].name=ew;break}}function sw(e){for(let t=0;t<e.attrs.length;t++){let n=tw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function cw(e){for(let t=0;t<e.attrs.length;t++){let n=nw.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function lw(e){let t=rw.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=uC(e.tagName))}function uw(e,t){return t===H.MATHML&&(e===W.MI||e===W.MO||e===W.MN||e===W.MS||e===W.MTEXT)}function dw(e,t,n){if(t===H.MATHML&&e===W.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===sC.ENCODING){let t=n[e].value.toLowerCase();return t===QC.TEXT_HTML||t===QC.APPLICATION_XML}}return t===H.SVG&&(e===W.FOREIGN_OBJECT||e===W.DESC||e===W.TITLE)}function fw(e,t,n,r){return(!r||r===H.HTML)&&dw(e,t,n)||(!r||r===H.MATHML)&&uw(e,t)}var pw=`hidden`,mw=8,hw=3,q;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(q||={});var gw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},_w=new Set([W.TABLE,W.TBODY,W.TFOOT,W.THEAD,W.TR]),vw={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:BC,onParseError:null},yw=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...vw,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new CC(this.options,this),this.activeFormattingElements=new zC(this.treeAdapter),this.fragmentContextID=n?uC(this.treeAdapter.getTagName(n)):W.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new FC(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...vw,...t};e??=n.treeAdapter.createElement(U.TEMPLATE,H.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,H.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===W.TEMPLATE&&i.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??gw,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===H.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,H.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=pC.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===U.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==H.HTML))switch(this.fragmentContextID){case W.TITLE:case W.TEXTAREA:this.tokenizer.state=pC.RCDATA;break;case W.STYLE:case W.XMP:case W.IFRAME:case W.NOEMBED:case W.NOFRAMES:case W.NOSCRIPT:this.tokenizer.state=pC.RAWTEXT;break;case W.SCRIPT:this.tokenizer.state=pC.SCRIPT_DATA;break;case W.PLAINTEXT:this.tokenizer.state=pC.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,H.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,H.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(U.HTML,H.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,W.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===GS.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===W.SVG&&this.treeAdapter.getTagName(t)===U.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===H.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===W.MGLYPH||e.tagID===W.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,H.HTML)}_processToken(e){switch(e.type){case GS.CHARACTER:this.onCharacter(e);break;case GS.NULL_CHARACTER:this.onNullCharacter(e);break;case GS.COMMENT:this.onComment(e);break;case GS.DOCTYPE:this.onDoctype(e);break;case GS.START_TAG:this._processStartTag(e);break;case GS.END_TAG:this.onEndTag(e);break;case GS.EOF:this.onEof(e);break;case GS.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return fw(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===LC.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(W.P),this.openElements.popUntilTagNamePopped(W.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case W.TR:this.insertionMode=q.IN_ROW;return;case W.TBODY:case W.THEAD:case W.TFOOT:this.insertionMode=q.IN_TABLE_BODY;return;case W.CAPTION:this.insertionMode=q.IN_CAPTION;return;case W.COLGROUP:this.insertionMode=q.IN_COLUMN_GROUP;return;case W.TABLE:this.insertionMode=q.IN_TABLE;return;case W.BODY:this.insertionMode=q.IN_BODY;return;case W.FRAMESET:this.insertionMode=q.IN_FRAMESET;return;case W.SELECT:this._resetInsertionModeForSelect(e);return;case W.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case W.HTML:this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return;case W.TD:case W.TH:if(e>0){this.insertionMode=q.IN_CELL;return}break;case W.HEAD:if(e>0){this.insertionMode=q.IN_HEAD;return}break}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===W.TEMPLATE)break;if(e===W.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(e){return _w.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case W.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===H.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case W.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return dC[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){LE(this,e);return}switch(this.insertionMode){case q.INITIAL:Mw(this,e);break;case q.BEFORE_HTML:Fw(this,e);break;case q.BEFORE_HEAD:Rw(this,e);break;case q.IN_HEAD:Hw(this,e);break;case q.IN_HEAD_NO_SCRIPT:Gw(this,e);break;case q.AFTER_HEAD:Jw(this,e);break;case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:Zw(this,e);break;case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:KT(this,e);break;case q.IN_TABLE_TEXT:aE(this,e);break;case q.IN_COLUMN_GROUP:fE(this,e);break;case q.AFTER_BODY:OE(this,e);break;case q.AFTER_AFTER_BODY:PE(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){IE(this,e);return}switch(this.insertionMode){case q.INITIAL:Mw(this,e);break;case q.BEFORE_HTML:Fw(this,e);break;case q.BEFORE_HEAD:Rw(this,e);break;case q.IN_HEAD:Hw(this,e);break;case q.IN_HEAD_NO_SCRIPT:Gw(this,e);break;case q.AFTER_HEAD:Jw(this,e);break;case q.TEXT:this._insertCharacters(e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:KT(this,e);break;case q.IN_COLUMN_GROUP:fE(this,e);break;case q.AFTER_BODY:OE(this,e);break;case q.AFTER_AFTER_BODY:PE(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Dw(this,e);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:Dw(this,e);break;case q.IN_TABLE_TEXT:oE(this,e);break;case q.AFTER_BODY:Ow(this,e);break;case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:kw(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:jw(this,e);break;case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:this._err(e,V.misplacedDoctype);break;case q.IN_TABLE_TEXT:oE(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?zE(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:Mw(this,e);break;case q.BEFORE_HTML:Nw(this,e);break;case q.BEFORE_HEAD:Iw(this,e);break;case q.IN_HEAD:zw(this,e);break;case q.IN_HEAD_NO_SCRIPT:Uw(this,e);break;case q.AFTER_HEAD:Kw(this,e);break;case q.IN_BODY:AT(this,e);break;case q.IN_TABLE:tE(this,e);break;case q.IN_TABLE_TEXT:oE(this,e);break;case q.IN_CAPTION:cE(this,e);break;case q.IN_COLUMN_GROUP:uE(this,e);break;case q.IN_TABLE_BODY:pE(this,e);break;case q.IN_ROW:hE(this,e);break;case q.IN_CELL:_E(this,e);break;case q.IN_SELECT:yE(this,e);break;case q.IN_SELECT_IN_TABLE:xE(this,e);break;case q.IN_TEMPLATE:CE(this,e);break;case q.AFTER_BODY:EE(this,e);break;case q.IN_FRAMESET:kE(this,e);break;case q.AFTER_FRAMESET:jE(this,e);break;case q.AFTER_AFTER_BODY:NE(this,e);break;case q.AFTER_AFTER_FRAMESET:FE(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?BE(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:Mw(this,e);break;case q.BEFORE_HTML:Pw(this,e);break;case q.BEFORE_HEAD:Lw(this,e);break;case q.IN_HEAD:Bw(this,e);break;case q.IN_HEAD_NO_SCRIPT:Ww(this,e);break;case q.AFTER_HEAD:qw(this,e);break;case q.IN_BODY:HT(this,e);break;case q.TEXT:WT(this,e);break;case q.IN_TABLE:nE(this,e);break;case q.IN_TABLE_TEXT:oE(this,e);break;case q.IN_CAPTION:lE(this,e);break;case q.IN_COLUMN_GROUP:dE(this,e);break;case q.IN_TABLE_BODY:mE(this,e);break;case q.IN_ROW:gE(this,e);break;case q.IN_CELL:vE(this,e);break;case q.IN_SELECT:bE(this,e);break;case q.IN_SELECT_IN_TABLE:SE(this,e);break;case q.IN_TEMPLATE:wE(this,e);break;case q.AFTER_BODY:DE(this,e);break;case q.IN_FRAMESET:AE(this,e);break;case q.AFTER_FRAMESET:ME(this,e);break;case q.AFTER_AFTER_BODY:PE(this,e);break;default:}}onEof(e){switch(this.insertionMode){case q.INITIAL:Mw(this,e);break;case q.BEFORE_HTML:Fw(this,e);break;case q.BEFORE_HEAD:Rw(this,e);break;case q.IN_HEAD:Hw(this,e);break;case q.IN_HEAD_NO_SCRIPT:Gw(this,e);break;case q.AFTER_HEAD:Jw(this,e);break;case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:UT(this,e);break;case q.TEXT:GT(this,e);break;case q.IN_TABLE_TEXT:oE(this,e);break;case q.IN_TEMPLATE:TE(this,e);break;case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:Aw(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===B.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:this._insertCharacters(e);break;case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:Xw(this,e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:KT(this,e);break;case q.IN_TABLE_TEXT:iE(this,e);break;default:}}};function bw(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):VT(e,t),n}function xw(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Sw(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=hw;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Cw(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Cw(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function ww(e,t,n){let r=uC(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===W.TEMPLATE&&i===H.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Tw(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Ew(e,t){for(let n=0;n<mw;n++){let n=bw(e,t);if(!n)break;let r=xw(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Sw(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&ww(e,a,i),Tw(e,r,n)}}function Dw(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ow(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kw(e,t){e._appendCommentNode(t,e.document)}function Aw(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function jw(e,t){e._setDocumentType(t);let n=t.forceQuirks?cC.QUIRKS:ZC(t);XC(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=q.BEFORE_HTML}function Mw(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,cC.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function Nw(e,t){t.tagID===W.HTML?(e._insertElement(t,H.HTML),e.insertionMode=q.BEFORE_HEAD):Fw(e,t)}function Pw(e,t){let n=t.tagID;(n===W.HTML||n===W.HEAD||n===W.BODY||n===W.BR)&&Fw(e,t)}function Fw(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function Iw(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.HEAD:e._insertElement(t,H.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break;default:Rw(e,t)}}function Lw(e,t){let n=t.tagID;n===W.HEAD||n===W.BODY||n===W.HTML||n===W.BR?Rw(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function Rw(e,t){e._insertFakeElement(U.HEAD,W.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function zw(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.TITLE:e._switchToTextParsing(t,pC.RCDATA);break;case W.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,pC.RAWTEXT):(e._insertElement(t,H.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break;case W.NOFRAMES:case W.STYLE:e._switchToTextParsing(t,pC.RAWTEXT);break;case W.SCRIPT:e._switchToTextParsing(t,pC.SCRIPT_DATA);break;case W.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break;case W.HEAD:e._err(t,V.misplacedStartTagForHeadElement);break;default:Hw(e,t)}}function Bw(e,t){switch(t.tagID){case W.HEAD:e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break;case W.BODY:case W.BR:case W.HTML:Hw(e,t);break;case W.TEMPLATE:Vw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Vw(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==W.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function Hw(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function Uw(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.BASEFONT:case W.BGSOUND:case W.HEAD:case W.LINK:case W.META:case W.NOFRAMES:case W.STYLE:zw(e,t);break;case W.NOSCRIPT:e._err(t,V.nestedNoscriptInHead);break;default:Gw(e,t)}}function Ww(e,t){switch(t.tagID){case W.NOSCRIPT:e.openElements.pop(),e.insertionMode=q.IN_HEAD;break;case W.BR:Gw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Gw(e,t){let n=t.type===GS.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function Kw(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.BODY:e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break;case W.FRAMESET:e._insertElement(t,H.HTML),e.insertionMode=q.IN_FRAMESET;break;case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,W.HEAD),zw(e,t),e.openElements.remove(e.headElement);break;case W.HEAD:e._err(t,V.misplacedStartTagForHeadElement);break;default:Jw(e,t)}}function qw(e,t){switch(t.tagID){case W.BODY:case W.HTML:case W.BR:Jw(e,t);break;case W.TEMPLATE:Vw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Jw(e,t){e._insertFakeElement(U.BODY,W.BODY),e.insertionMode=q.IN_BODY,Yw(e,t)}function Yw(e,t){switch(t.type){case GS.CHARACTER:Zw(e,t);break;case GS.WHITESPACE_CHARACTER:Xw(e,t);break;case GS.COMMENT:Dw(e,t);break;case GS.START_TAG:AT(e,t);break;case GS.END_TAG:HT(e,t);break;case GS.EOF:UT(e,t);break;default:}}function Xw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Zw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Qw(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $w(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eT(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_FRAMESET)}function tT(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function nT(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&fC.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,H.HTML)}function rT(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function iT(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),n||(e.formElement=e.openElements.current))}function aT(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===W.LI&&r===W.LI||(n===W.DD||n===W.DT)&&(r===W.DD||r===W.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==W.ADDRESS&&r!==W.DIV&&r!==W.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function oT(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.tokenizer.state=pC.PLAINTEXT}function sT(e,t){e.openElements.hasInScope(W.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1}function cT(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(U.A);n&&(Ew(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uT(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(W.NOBR)&&(Ew(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function fT(e,t){e.treeAdapter.getDocumentMode(e.document)!==cC.QUIRKS&&e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function pT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mT(e){let t=KS(e,sC.TYPE);return t!=null&&t.toLowerCase()===pw}function hT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),mT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function gT(e,t){e._appendElement(t,H.HTML),t.ackSelfClosing=!0}function _T(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vT(e,t){t.tagName=U.IMG,t.tagID=W.IMG,pT(e,t)}function yT(e,t){e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.tokenizer.state=pC.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function bT(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,pC.RAWTEXT)}function xT(e,t){e.framesetOk=!1,e._switchToTextParsing(t,pC.RAWTEXT)}function ST(e,t){e._switchToTextParsing(t,pC.RAWTEXT)}function CT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function wT(e,t){e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function TT(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,H.HTML)}function ET(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(W.RTC),e._insertElement(t,H.HTML)}function DT(e,t){e._reconstructActiveFormattingElements(),ow(t),cw(t),t.selfClosing?e._appendElement(t,H.MATHML):e._insertElement(t,H.MATHML),t.ackSelfClosing=!0}function OT(e,t){e._reconstructActiveFormattingElements(),sw(t),cw(t),t.selfClosing?e._appendElement(t,H.SVG):e._insertElement(t,H.SVG),t.ackSelfClosing=!0}function kT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function AT(e,t){switch(t.tagID){case W.I:case W.S:case W.B:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.SMALL:case W.STRIKE:case W.STRONG:lT(e,t);break;case W.A:cT(e,t);break;case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:nT(e,t);break;case W.P:case W.DL:case W.OL:case W.UL:case W.DIV:case W.DIR:case W.NAV:case W.MAIN:case W.MENU:case W.ASIDE:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.DETAILS:case W.ADDRESS:case W.ARTICLE:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:tT(e,t);break;case W.LI:case W.DD:case W.DT:aT(e,t);break;case W.BR:case W.IMG:case W.WBR:case W.AREA:case W.EMBED:case W.KEYGEN:pT(e,t);break;case W.HR:_T(e,t);break;case W.RB:case W.RTC:TT(e,t);break;case W.RT:case W.RP:ET(e,t);break;case W.PRE:case W.LISTING:rT(e,t);break;case W.XMP:bT(e,t);break;case W.SVG:OT(e,t);break;case W.HTML:Qw(e,t);break;case W.BASE:case W.LINK:case W.META:case W.STYLE:case W.TITLE:case W.SCRIPT:case W.BGSOUND:case W.BASEFONT:case W.TEMPLATE:zw(e,t);break;case W.BODY:$w(e,t);break;case W.FORM:iT(e,t);break;case W.NOBR:uT(e,t);break;case W.MATH:DT(e,t);break;case W.TABLE:fT(e,t);break;case W.INPUT:hT(e,t);break;case W.PARAM:case W.TRACK:case W.SOURCE:gT(e,t);break;case W.IMAGE:vT(e,t);break;case W.BUTTON:sT(e,t);break;case W.APPLET:case W.OBJECT:case W.MARQUEE:dT(e,t);break;case W.IFRAME:xT(e,t);break;case W.SELECT:CT(e,t);break;case W.OPTION:case W.OPTGROUP:wT(e,t);break;case W.NOEMBED:case W.NOFRAMES:ST(e,t);break;case W.FRAMESET:eT(e,t);break;case W.TEXTAREA:yT(e,t);break;case W.NOSCRIPT:e.options.scriptingEnabled?ST(e,t):kT(e,t);break;case W.PLAINTEXT:oT(e,t);break;case W.COL:case W.TH:case W.TD:case W.TR:case W.HEAD:case W.FRAME:case W.TBODY:case W.TFOOT:case W.THEAD:case W.CAPTION:case W.COLGROUP:break;default:kT(e,t)}}function jT(e,t){if(e.openElements.hasInScope(W.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function MT(e,t){e.openElements.hasInScope(W.BODY)&&(e.insertionMode=q.AFTER_BODY,DE(e,t))}function NT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function PT(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(W.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(W.FORM):n&&e.openElements.remove(n))}function FT(e){e.openElements.hasInButtonScope(W.P)||e._insertFakeElement(U.P,W.P),e._closePElement()}function IT(e){e.openElements.hasInListItemScope(W.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(W.LI),e.openElements.popUntilTagNamePopped(W.LI))}function LT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function RT(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function BT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(U.BR,W.BR),e.openElements.pop(),e.framesetOk=!1}function VT(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==W.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function HT(e,t){switch(t.tagID){case W.A:case W.B:case W.I:case W.S:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.NOBR:case W.SMALL:case W.STRIKE:case W.STRONG:Ew(e,t);break;case W.P:FT(e);break;case W.DL:case W.UL:case W.OL:case W.DIR:case W.DIV:case W.NAV:case W.PRE:case W.MAIN:case W.MENU:case W.ASIDE:case W.BUTTON:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.ADDRESS:case W.ARTICLE:case W.DETAILS:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.LISTING:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:NT(e,t);break;case W.LI:IT(e);break;case W.DD:case W.DT:LT(e,t);break;case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:RT(e);break;case W.BR:BT(e);break;case W.BODY:jT(e,t);break;case W.HTML:MT(e,t);break;case W.FORM:PT(e);break;case W.APPLET:case W.OBJECT:case W.MARQUEE:zT(e,t);break;case W.TEMPLATE:Vw(e,t);break;default:VT(e,t)}}function UT(e,t){e.tmplInsertionModeStack.length>0?TE(e,t):Aw(e,t)}function WT(e,t){var n;t.tagID===W.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function GT(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function KT(e,t){if(e.openElements.currentTagId!==void 0&&_w.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case GS.CHARACTER:aE(e,t);break;case GS.WHITESPACE_CHARACTER:iE(e,t);break}else rE(e,t)}function qT(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_CAPTION}function JT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function YT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.COLGROUP,W.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,uE(e,t)}function XT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_TABLE_BODY}function ZT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.TBODY,W.TBODY),e.insertionMode=q.IN_TABLE_BODY,pE(e,t)}function QT(e,t){e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function $T(e,t){mT(t)?e._appendElement(t,H.HTML):rE(e,t),t.ackSelfClosing=!0}function eE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,H.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function tE(e,t){switch(t.tagID){case W.TD:case W.TH:case W.TR:ZT(e,t);break;case W.STYLE:case W.SCRIPT:case W.TEMPLATE:zw(e,t);break;case W.COL:YT(e,t);break;case W.FORM:eE(e,t);break;case W.TABLE:QT(e,t);break;case W.TBODY:case W.TFOOT:case W.THEAD:XT(e,t);break;case W.INPUT:$T(e,t);break;case W.CAPTION:qT(e,t);break;case W.COLGROUP:JT(e,t);break;default:rE(e,t)}}function nE(e,t){switch(t.tagID){case W.TABLE:e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode());break;case W.TEMPLATE:Vw(e,t);break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:rE(e,t)}}function rE(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Yw(e,t),e.fosterParentingEnabled=n}function iE(e,t){e.pendingCharacterTokens.push(t)}function aE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oE(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)rE(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var sE=new Set([W.CAPTION,W.COL,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]);function cE(e,t){let n=t.tagID;sE.has(n)?e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,tE(e,t)):AT(e,t)}function lE(e,t){let n=t.tagID;switch(n){case W.CAPTION:case W.TABLE:e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,n===W.TABLE&&nE(e,t));break;case W.BODY:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:HT(e,t)}}function uE(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.COL:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.TEMPLATE:zw(e,t);break;default:fE(e,t)}}function dE(e,t){switch(t.tagID){case W.COLGROUP:e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break;case W.TEMPLATE:Vw(e,t);break;case W.COL:break;default:fE(e,t)}}function fE(e,t){e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function pE(e,t){switch(t.tagID){case W.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_ROW;break;case W.TH:case W.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(U.TR,W.TR),e.insertionMode=q.IN_ROW,hE(e,t);break;case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,tE(e,t));break;default:tE(e,t)}}function mE(e,t){let n=t.tagID;switch(t.tagID){case W.TBODY:case W.TFOOT:case W.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE);break;case W.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,nE(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:case W.TR:break;default:nE(e,t)}}function hE(e,t){switch(t.tagID){case W.TH:case W.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_CELL,e.activeFormattingElements.insertMarker();break;case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,pE(e,t));break;default:tE(e,t)}}function gE(e,t){switch(t.tagID){case W.TR:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break;case W.TABLE:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,mE(e,t));break;case W.TBODY:case W.TFOOT:case W.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(W.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,mE(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:break;default:nE(e,t)}}function _E(e,t){let n=t.tagID;sE.has(n)?(e.openElements.hasInTableScope(W.TD)||e.openElements.hasInTableScope(W.TH))&&(e._closeTableCell(),hE(e,t)):AT(e,t)}function vE(e,t){let n=t.tagID;switch(n){case W.TD:case W.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_ROW);break;case W.TABLE:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),gE(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:break;default:HT(e,t)}}function yE(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.OPTION:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._insertElement(t,H.HTML);break;case W.OPTGROUP:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._insertElement(t,H.HTML);break;case W.HR:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.INPUT:case W.KEYGEN:case W.TEXTAREA:case W.SELECT:e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),t.tagID!==W.SELECT&&e._processStartTag(t));break;case W.SCRIPT:case W.TEMPLATE:zw(e,t);break;default:}}function bE(e,t){switch(t.tagID){case W.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===W.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===W.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop();break;case W.OPTION:e.openElements.currentTagId===W.OPTION&&e.openElements.pop();break;case W.SELECT:e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode());break;case W.TEMPLATE:Vw(e,t);break;default:}}function xE(e,t){let n=t.tagID;n===W.CAPTION||n===W.TABLE||n===W.TBODY||n===W.TFOOT||n===W.THEAD||n===W.TR||n===W.TD||n===W.TH?(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e._processStartTag(t)):yE(e,t)}function SE(e,t){let n=t.tagID;n===W.CAPTION||n===W.TABLE||n===W.TBODY||n===W.TFOOT||n===W.THEAD||n===W.TR||n===W.TD||n===W.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bE(e,t)}function CE(e,t){switch(t.tagID){case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:zw(e,t);break;case W.CAPTION:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,tE(e,t);break;case W.COL:e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,uE(e,t);break;case W.TR:e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,pE(e,t);break;case W.TD:case W.TH:e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,hE(e,t);break;default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,AT(e,t)}}function wE(e,t){t.tagID===W.TEMPLATE&&Vw(e,t)}function TE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Aw(e,t)}function EE(e,t){t.tagID===W.HTML?AT(e,t):OE(e,t)}function DE(e,t){if(t.tagID===W.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===W.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else OE(e,t)}function OE(e,t){e.insertionMode=q.IN_BODY,Yw(e,t)}function kE(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.FRAMESET:e._insertElement(t,H.HTML);break;case W.FRAME:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.NOFRAMES:zw(e,t);break;default:}}function AE(e,t){t.tagID===W.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==W.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function jE(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.NOFRAMES:zw(e,t);break;default:}}function ME(e,t){t.tagID===W.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function NE(e,t){t.tagID===W.HTML?AT(e,t):PE(e,t)}function PE(e,t){e.insertionMode=q.IN_BODY,Yw(e,t)}function FE(e,t){switch(t.tagID){case W.HTML:AT(e,t);break;case W.NOFRAMES:zw(e,t);break;default:}}function IE(e,t){t.chars=`�`,e._insertCharacters(t)}function LE(e,t){e._insertCharacters(t),e.framesetOk=!1}function RE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==H.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function zE(e,t){if(aw(t))RE(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===H.MATHML?ow(t):r===H.SVG&&(lw(t),sw(t)),cw(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function BE(e,t){if(t.tagID===W.P||t.tagID===W.BR){RE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===H.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([U.AREA,U.BASE,U.BASEFONT,U.BGSOUND,U.BR,U.COL,U.EMBED,U.FRAME,U.HR,U.IMG,U.INPUT,U.KEYGEN,U.LINK,U.META,U.PARAM,U.SOURCE,U.TRACK,U.WBR]);function VE(e,t){return yw.parse(e,t)}function HE(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=yw.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var UE={basename:WE,dirname:GE,extname:KE,join:qE,sep:`/`};function WE(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);XE(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function GE(e){if(XE(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function KE(e){XE(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function qE(...e){let t=-1,n;for(;++t<e.length;)XE(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:JE(n)}function JE(e){XE(e);let t=e.codePointAt(0)===47,n=YE(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function YE(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function XE(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ZE={cwd:QE};function QE(){return`/`}function $E(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function eD(e){if(typeof e==`string`)e=new URL(e);else if(!$E(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return tD(e)}function tD(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var nD=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],rD=class{constructor(e){let t;t=e?$E(e)?{path:e}:typeof e==`string`||sD(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ZE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<nD.length;){let e=nD[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)nD.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?UE.basename(this.path):void 0}set basename(e){aD(e,`basename`),iD(e,`basename`),this.path=UE.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?UE.dirname(this.path):void 0}set dirname(e){oD(this.basename,`dirname`),this.path=UE.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?UE.extname(this.path):void 0}set extname(e){if(iD(e,`extname`),oD(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=UE.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){$E(e)&&(e=eD(e)),aD(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?UE.basename(this.path,this.extname):void 0}set stem(e){aD(e,`stem`),iD(e,`stem`),this.path=UE.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new bm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function iD(e,t){if(e&&e.includes(UE.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+UE.sep+"`")}function aD(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function oD(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function sD(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var cD={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},lD=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,uD=/-[a-z]/g,dD=/%c(?:([-+])(\d+))?/g,fD=/%x/g,pD={2:!0,1:!1,0:null},mD={};function hD(e,t){let n=t||mD,r=n.onerror,i=e instanceof rD?e:new rD(e),a=n.fragment?HE:VE,o=String(i);return OS(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=gD(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=cD[a],o=new bm(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=pD[c],o.note=l(n.description),o.url=n.url===!1?void 0:lD+t,r(o)}function l(t){return t.replace(dD,n).replace(fD,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return vD(o.charAt(e.startOffset+i))}function r(){return yD(o.charCodeAt(e.startOffset))}}}}function gD(e){return e.replace(uD,_D)}function _D(e){return e.charAt(1).toUpperCase()}function vD(e){return e==="`"?"` ` `":e}function yD(e){return`0x`+e.toString(16).toUpperCase()}function bD(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return hD(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var xD=typeof self==`object`?self:globalThis,SD=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new xD[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new xD[a](o),i)};return r},CD=e=>SD(new Map,e)(0),wD=``,{toString:TD}={},{keys:ED}=Object,DD=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=TD.call(e).slice(8,-1);switch(n){case`Array`:return[1,wD];case`Object`:return[2,wD];case`Date`:return[3,wD];case`RegExp`:return[4,wD];case`Map`:return[5,wD];case`Set`:return[6,wD];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},OD=([e,t])=>e===0&&(t===`function`||t===`symbol`),kD=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=DD(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ED(r))(e||!OD(DD(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(OD(DD(n))||OD(DD(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!OD(DD(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},AD=(e,{json:t,lossy:n}={})=>{let r=[];return kD(!(t||n),!!t,new Map,r)(e),r},jD=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?CD(AD(e,t)):structuredClone(e):(e,t)=>CD(AD(e,t)),MD=(function(e,t,n,r,i){let a=ND(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return RD(e)?a.call(i,e,n,r):!1}),ND=(function(e){if(e==null)return LD;if(typeof e==`string`)return FD(e);if(typeof e==`object`)return PD(e);if(typeof e==`function`)return ID(e);throw Error("Expected function, string, or array as `test`")});function PD(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ND(e[n]);return ID(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function FD(e){return ID(t);function t(t){return t.tagName===e}}function ID(e){return t;function t(t,n,r){return!!(RD(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function LD(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function RD(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var zD=ND(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),BD=/[ \t\n\f\r]/g;function VD(e){return typeof e==`object`?e.type===`text`?HD(e.value):!1:HD(e)}function HD(e){return e.replace(BD,``)===``}var UD=(function(e,t,n,r,i){let a=WD(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!UD(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return XD(e)?a.call(i,e,n,r):!1}),WD=(function(e){if(e==null)return YD;if(typeof e==`function`)return JD(e);if(typeof e==`object`)return Array.isArray(e)?GD(e):KD(e);if(typeof e==`string`)return qD(e);throw Error(`Expected function, string, or object as test`)});function GD(e){let t=[],n=-1;for(;++n<e.length;)t[n]=WD(e[n]);return JD(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function KD(e){let t=e;return JD(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function qD(e){return JD(t);function t(t){return t&&t.type===e}}function JD(e){return t;function t(t,n,r){return!!(XD(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function YD(){return!0}function XD(e){return typeof e==`object`&&!!e&&`type`in e}var ZD=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),QD=[`button`,`input`,`select`,`textarea`],$D=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],eO={},tO=WD([`comment`,`doctype`]);function nO(e,t){rO(e,{collapse:mO((t||eO).newlines?fO:pO),whitespace:`normal`})}function rO(e,t){if(`children`in e){let n={...t};return(e.type===`root`||lO(e))&&(n.before=!0,n.after=!0),n.whitespace=hO(e,t),aO(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return iO(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:tO(e),stripAtStart:!1,remove:!1}}function iO(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&dO(n.charAt(0))&&i++,i!==a&&dO(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function aO(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=rO(i[o],{...t,after:oO(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),cO(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function oO(e,t,n){for(;++t<e.length;){let n=e[t],r=sO(n);if(r===void 0&&`children`in n&&!uO(n)&&(r=oO(n.children,-1)),typeof r==`boolean`)return r}return n}function sO(e){if(e.type===`element`){if(cO(e))return!1;if(lO(e))return!0}else if(e.type===`text`){if(!VD(e))return!1}else if(!tO(e))return!1}function cO(e){return zD(e)||MD(e,QD)}function lO(e){return MD(e,ZD)}function uO(e){return!!(e.type===`element`&&e.properties.hidden)||tO(e)||MD(e,$D)}function dO(e){return e===` `||e===`
148
- `}function fO(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:` `}function pO(){return` `}function mO(e){return t;function t(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}function hO(e,t){if(`tagName`in e&&e.properties)switch(e.tagName){case`listing`:case`plaintext`:case`script`:case`style`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return e.properties.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return e.properties.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}return t.whitespace}function gO(e){return function(t){nO(t,e)}}function _O(e){return e}var vO=[],yO=`skip`;function bO(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=WD(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+_O(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=vO,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=xO(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function xO(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?vO:[e]}function SO(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),bO(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var CO=TO(`end`),wO=TO(`start`);function TO(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function EO(e){let t=wO(e),n=CO(e);if(t&&n)return{start:t,end:n}}function DO(e,t){let n=t.properties||{},r=e.all(t),i={type:`link`,url:e.resolve(String(n.href||``)||null),title:n.title?String(n.title):null,children:r};return e.patch(t,i),i}function OO(e,t){e.baseFound||=(e.frozenBaseUrl=String(t.properties&&t.properties.href||``)||void 0,!0)}function kO(e,t){let n={type:`blockquote`,children:e.toFlow(e.all(t))};return e.patch(t,n),n}function AO(e,t){let n={type:`break`};return e.patch(t,n),n}var jO=(function(e,t,n){let r=WD(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),MO=/\n/g,NO=/[\t ]+/g,PO=ND(`br`),FO=ND(JO),IO=ND(`p`),LO=ND(`tr`),RO=ND([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,qO,YO]),zO=ND(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function BO(e,t){let n=t||{},r=`children`in e?e.children:[],i=zO(e),a=KO(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...UO(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...VO(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?PO(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
149
- `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function VO(e,t,n){return e.type===`element`?HO(e,t,n):e.type===`text`?n.whitespace===`normal`?UO(e,n):WO(e):[]}function HO(e,t,n){let r=KO(e,n),i=e.children||[],a=-1,o=[];if(RO(e))return o;let s,c;for(PO(e)||LO(e)&&jO(t,e,LO)?c=`
150
- `:IO(e)?(s=2,c=2):zO(e)&&(s=1,c=1);++a<i.length;)o=o.concat(VO(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?PO(i[a+1]):c}));return FO(e)&&jO(t,e,FO)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function UO(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){MO.lastIndex=a;let e=MO.exec(n),i=e&&`index`in e?e.index:n.length;r.push(GO(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function WO(e){return[String(e.value)]}function GO(e,t,n){let r=[],i=0,a;for(;i<e.length;){NO.lastIndex=i;let n=NO.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function KO(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function qO(e){return!!(e.properties||{}).hidden}function JO(e){return e.tagName===`td`||e.tagName===`th`}function YO(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function XO(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var ZO=`language-`;function QO(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===ZO){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:XO(BO(t))};return e.patch(t,o),o}function $O(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function ek(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function tk(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function nk(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...rk(e,r[i].titles),...rk(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:tk(o),children:o};return e.patch(t,n),n}}function rk(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,ik);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:tk(r),children:r}]}function ik(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function ak(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function ok(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function sk(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:ok(e.all(t))};return e.patch(t,n),n}function ck(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function lk(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function uk(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function dk(e,t){let n={type:`inlineCode`,value:BO(t)};return e.patch(t,n),n}function fk(e,t){let n=[],r=[],i=t||e.properties||{},a=pk(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=BO(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function pk(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...pk(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var mk=`[x]`,hk=`[ ]`;function gk(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||mk:e.options.unchecked||hk};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=fk(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var _k={}.hasOwnProperty;function vk(e,t){let n=e.type===`element`&&_k.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var yk=new Set([`pingback`,`prefetch`,`stylesheet`]);function bk(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!yk.has(String(t[n])))return!1;return!0}var xk=ND(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),Sk=ND(`meta`);function Ck(e){return!!(e.type===`text`||xk(e)||zD(e)||bk(e)||Sk(e)&&vk(e,`itemProp`))}function wk(e,t){let{rest:n,checkbox:r}=Ek(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:Tk(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function Tk(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if(Ck(r))continue;if(r.tagName===`p`||n||Tk(r))return!0;n=!0}}return!1}function Ek(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=Ek(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function Dk(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),Ok),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:tk(r),children:r};return e.patch(t,a),a}function Ok(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var kk={};function Ak(e,t){let n=t||kk;return jk(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function jk(e,t,n){if(Nk(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 Mk(e.children,t,n)}return Array.isArray(e)?Mk(e,t,n):``}function Mk(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=jk(e[i],t,n);return r.join(``)}function Nk(e){return!!(e&&typeof e==`object`)}var Pk=WD([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Fk(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!Bk(n)||`children`in n&&Fk(n.children))return!0}return!1}function Ik(e){return Rk(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?VD(e.value):!1})?[]:[{type:`paragraph`,children:ok(e)}]}}function Lk(e){return Rk(e.children,t,n);function t(t){let n=Vk(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=Vk(e),r=Vk(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function Rk(e,t,n){let r=zk(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];Bk(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function zk(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&Fk(r.children)?t.push(...Lk(r)):t.push(r)}return t}function Bk(e){let t=e.data&&e.data.hName;return t?Ck({type:`element`,tagName:t,properties:{},children:[]}):Pk(e)}function Vk(e){return jD({...e,children:[]})}function Hk(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(SO({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||Fk(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:Ak(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function Uk(e,t){let n=ok(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var Wk=[`"`];function Gk(e,t){let n=e.options.quotes||Wk;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function Kk(e,t){let n=e.all(t);(e.options.document||Fk(n))&&(n=Ik(n));let r={type:`root`,children:n};return e.patch(t,r),r}function qk(e,t){let n=fk(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function Jk(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function Yk(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function Xk(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),Zk)};return e.patch(t,n),n}function Zk(){return{type:`tableCell`,children:[]}}function Qk(e,t){if(e.inTable){let n={type:`text`,value:BO(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=$k(t),i=e.toSpecificContent(e.all(t),tA);r&&i.unshift(tA());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,eA)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function $k(e){let t={align:[null],headless:!0},n=0,r=0;return SO(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return yO;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function eA(){return{type:`tableCell`,children:[]}}function tA(){return{type:`tableRow`,children:[]}}function nA(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function rA(e,t){let n={type:`text`,value:BO(t)};return e.patch(t,n),n}function iA(e,t){let n={type:`text`,value:`​`};return e.patch(t,n),n}var aA={comment:$O,doctype:Y,root:Kk,text:nA},oA={applet:Y,area:Y,basefont:Y,bgsound:Y,caption:Y,col:Y,colgroup:Y,command:Y,content:Y,datalist:Y,dialog:Y,element:Y,embed:Y,frame:Y,frameset:Y,isindex:Y,keygen:Y,link:Y,math:Y,menu:Y,menuitem:Y,meta:Y,nextid:Y,noembed:Y,noframes:Y,optgroup:Y,option:Y,param:Y,script:Y,shadow:Y,source:Y,spacer:Y,style:Y,svg:Y,template:Y,title:Y,track:Y,abbr:J,acronym:J,bdi:J,bdo:J,big:J,blink:J,button:J,canvas:J,cite:J,data:J,details:J,dfn:J,font:J,ins:J,label:J,map:J,marquee:J,meter:J,nobr:J,noscript:J,object:J,output:J,progress:J,rb:J,rbc:J,rp:J,rt:J,rtc:J,ruby:J,slot:J,small:J,span:J,sup:J,sub:J,tbody:J,tfoot:J,thead:J,time:J,address:sA,article:sA,aside:sA,body:sA,center:sA,div:sA,fieldset:sA,figcaption:sA,figure:sA,form:sA,footer:sA,header:sA,hgroup:sA,html:sA,legend:sA,main:sA,multicol:sA,nav:sA,picture:sA,section:sA,a:DO,audio:Hk,b:Jk,base:OO,blockquote:kO,br:AO,code:dk,dir:Dk,dl:nk,dt:wk,dd:wk,del:ek,em:ak,h1:sk,h2:sk,h3:sk,h4:sk,h5:sk,h6:sk,hr:ck,i:ak,iframe:lk,img:uk,image:uk,input:gk,kbd:dk,li:wk,listing:QO,mark:ak,ol:Dk,p:Uk,plaintext:QO,pre:QO,q:Gk,s:ek,samp:dk,select:qk,strike:ek,strong:Jk,summary:Uk,table:Qk,td:Yk,textarea:rA,th:Yk,tr:Xk,tt:dk,u:ak,ul:Dk,var:dk,video:Hk,wbr:iA,xmp:QO};function J(e,t){return e.all(t)}function sA(e,t){return e.toFlow(e.all(t))}function Y(){}var cA={}.hasOwnProperty;function lA(e){return{all:uA,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...oA,...e.handlers},inTable:!1,nodeHandlers:{...aA,...e.nodeHandlers},one:dA,options:e,patch:fA,qNesting:0,resolve:pA,toFlow:mA,toSpecificContent:hA}}function uA(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function dA(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(cA.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(cA.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function fA(e,t){e.position&&(t.position=EO(e))}function pA(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function mA(e){return Ik(e)}function hA(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var gA={};function _A(e,t){let n=jD(e),r=t||gA,i=gO({newlines:r.newlines===!0}),a=lA(r),o;i(n),SO(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},SO(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var vA={document:!0};function yA(e,t){return e&&`run`in e?async function(n,r){let i=_A(n,{...vA,...t});await e.run(i,r)}:function(t){return _A(t,{...vA,...e})}}function bA(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var xA=AA(/[A-Za-z]/),SA=AA(/[\dA-Za-z]/),CA=AA(/[#-'*+\--9=?A-Z^-~]/);function wA(e){return e!==null&&(e<32||e===127)}var TA=AA(/\d/),EA=AA(/[\dA-Fa-f]/),DA=AA(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var OA=AA(/\p{P}|\p{S}/u),kA=AA(/\s/);function AA(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function jA(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function MA(e,t,n){let r=WD((n||{}).ignore||[]),i=NA(t),a=-1;for(;++a<i.length;)bO(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function NA(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([PA(e[0]),FA(e[1])])}return t}function PA(e){return typeof e==`string`?new RegExp(jA(e),`g`):e}function FA(e){return typeof e==`function`?e:function(){return e}}var IA=`phrasing`,LA=[`autolink`,`link`,`image`,`label`];function RA(){return{transforms:[KA],enter:{literalAutolink:BA,literalAutolinkEmail:VA,literalAutolinkHttp:VA,literalAutolinkWww:VA},exit:{literalAutolink:GA,literalAutolinkEmail:WA,literalAutolinkHttp:HA,literalAutolinkWww:UA}}}function zA(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:IA,notInConstruct:LA},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:IA,notInConstruct:LA},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:IA,notInConstruct:LA}]}}function BA(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function VA(e){this.config.enter.autolinkProtocol.call(this,e)}function HA(e){this.config.exit.autolinkProtocol.call(this,e)}function UA(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function WA(e){this.config.exit.autolinkEmail.call(this,e)}function GA(e){this.exit(e)}function KA(e){MA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qA],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,JA]],{ignore:[`link`,`linkReference`]})}function qA(e,t,n,r,i){let a=``;if(!ZA(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!YA(n)))return!1;let o=XA(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function JA(e,t,n,r){return!ZA(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function YA(e){let 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 XA(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=bA(e,`(`),a=bA(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ZA(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||kA(n)||OA(n))&&(!t||n!==47)}function QA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}cj.peek=sj;function $A(){this.buffer()}function ej(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function tj(){this.buffer()}function nj(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function rj(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=QA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ij(e){this.exit(e)}function aj(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=QA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oj(e){this.exit(e)}function sj(){return`[`}function cj(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function lj(){return{enter:{gfmFootnoteCallString:$A,gfmFootnoteCall:ej,gfmFootnoteDefinitionLabelString:tj,gfmFootnoteDefinition:nj},exit:{gfmFootnoteCallString:rj,gfmFootnoteCall:ij,gfmFootnoteDefinitionLabelString:aj,gfmFootnoteDefinition:oj}}}function uj(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:cj},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
151
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?fj:dj))),s(),o}}function dj(e,t,n){return t===0?e:fj(e,t,n)}function fj(e,t,n){return(n?``:` `)+e}var pj=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];vj.peek=yj;function mj(){return{canContainEols:[`delete`],enter:{strikethrough:gj},exit:{strikethrough:_j}}}function hj(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:pj}],handlers:{delete:vj}}}function gj(e){this.enter({type:`delete`,children:[]},e)}function _j(e){this.exit(e)}function vj(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function yj(){return`~`}function bj(e){return e.length}function xj(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||bj,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Sj(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Cj(r[d]);else{let e=Cj(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
152
- `)}function Sj(e){return e==null?``:String(e)}function Cj(e){let 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}var wj={}.hasOwnProperty;function Tj(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&wj.call(t,e)){let n=String(t[e]);i=wj.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Ej={}.hasOwnProperty;function Dj(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Dj(e,t.extensions[n]);for(r in t)if(Ej.call(t,r))switch(r){case`extensions`:break;case`unsafe`:Oj(e[r],t[r]);break;case`join`:Oj(e[r],t[r]);break;case`handlers`:kj(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function Oj(e,t){t&&e.push(...t)}function kj(e,t){t&&Object.assign(e,t)}function Aj(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),jj);return i(),o}function jj(e,t,n){return`>`+(n?``:` `)+e}function Mj(e,t){return Nj(e,t.inConstruct,!0)&&!Nj(e,t.notInConstruct,!1)}function Nj(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 Pj(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
153
- `&&Mj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
154
- `}function Fj(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Ij(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 Lj(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rj(e,t,n,r){let i=Lj(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Ij(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,zj);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Fj(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
144
+ `),[i,a]=Uy(r);if(i.length===0)return;let o=Wy(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
145
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Ky,this.editor.getAttributes(qy)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Pp({find:Jy,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Pp({find:Jy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(qy)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),Xy=/^\s*(\[([( |x])?\])\s$/,Zy=$p.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Ud(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Jp(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=Wd(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Pp({find:Xy,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),Qy=$p.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,Ud(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
146
+ `):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=qp(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=qp(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});hp.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(Oy.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(ky.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(By.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Yy.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Zy.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Qy.configure(this.options.taskList)),e}});var $y=`&nbsp;`,eb=`\xA0`,tb=$p.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Ud(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===$y||n[0].text===$y||n[0].raw===eb||n[0].text===eb)&&r.length===1&&r[0].type===`text`&&(r[0].text===$y||r[0].text===eb)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?$y:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),nb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,rb=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,ib=op.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Ud(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[jp({find:nb,type:this.type})]},addPasteRules(){return[tm({find:rb,type:this.type})]}}),ab=$p.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),ob=op.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Ud(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function sb(e={}){return new Vi({view(t){return new cb(t,e)}})}var cb=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=ti(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},lb=class e extends M{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):M.near(r)}content(){return j.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new ub(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!fb(e)||!pb(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!P.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};lb.prototype.visible=!1,lb.findFrom=lb.findGapCursorFrom,M.jsonID(`gapcursor`,lb);var ub=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return lb.valid(t)?new lb(t):M.near(t)}};function db(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function fb(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||db(e.type))return!0;if(e.inlineContent)return!1}}return!0}function pb(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||db(e.type))return!0;if(e.inlineContent)return!1}}return!0}function mb(){return new Vi({props:{decorations:yb,createSelectionBetween(e,t,n){return t.pos==n.pos&&lb.valid(n)?new lb(n):null},handleClick:_b,handleKeyDown:hb,handleDOMEvents:{beforeinput:vb}}})}var hb=fu({ArrowLeft:gb(`horiz`,-1),ArrowRight:gb(`horiz`,1),ArrowUp:gb(`vert`,-1),ArrowDown:gb(`vert`,1)});function gb(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof N){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=lb.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new lb(c))),!0):!1}}function _b(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!lb.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&P.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new lb(r))),!0)}function vb(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof lb))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=A.empty;for(let e=r.length-1;e>=0;e--)i=A.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new j(i,0,0));return a.setSelection(N.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function yb(e){if(!(e.selection instanceof lb))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,vl.create(e.doc,[hl.widget(e.selection.head,t,{key:`gapcursor`})])}var bb=200,xb=function(){};xb.prototype.append=function(e){return e.length?(e=xb.from(e),!this.length&&e||e.length<bb&&this.leafAppend(e)||this.length<bb&&e.leafPrepend(this)||this.appendInner(e)):this},xb.prototype.prepend=function(e){return e.length?xb.from(e).append(this):this},xb.prototype.appendInner=function(e){return new Cb(this,e)},xb.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?xb.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},xb.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},xb.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},xb.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},xb.from=function(e){return e instanceof xb?e:e&&e.length?new Sb(e):xb.empty};var Sb=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=bb)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=bb)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(xb);xb.empty=new Sb([]);var Cb=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(xb),wb=500,Tb=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new Db(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new Db(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new Db(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>kb&&(s=Eb(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new yr;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new Db(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new Db(i,o,l))}else r.push(new Db(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new Db(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>wb&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new Db(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(xb.from(i.reverse()),a)}};Tb.empty=new Tb(xb.empty,0);function Eb(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var Db=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Ob=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},kb=20;function Ab(e,t,n,r){let i=n.getMeta(Rb),a;if(i)return i.historyState;n.getMeta(zb)&&(e=new Ob(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(Rb))return o.getMeta(Rb).redo?new Ob(e.done.addTransform(n,void 0,r,Lb(t)),e.undone,Mb(n.mapping.maps),e.prevTime,e.prevComposition):new Ob(e.done,e.undone.addTransform(n,void 0,r,Lb(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!jb(n,e.prevRanges)),s=o?Nb(e.prevRanges,n.mapping):Mb(n.mapping.maps);return new Ob(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Lb(t)),Tb.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new Ob(e.done.rebased(n,a),e.undone.rebased(n,a),Nb(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new Ob(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Nb(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function jb(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function Mb(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function Nb(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function Pb(e,t,n){let r=Lb(t),i=Rb.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new Ob(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Rb,{redo:n,historyState:c})}var Fb=!1,Ib=null;function Lb(e){let t=e.plugins;if(Ib!=t){Fb=!1,Ib=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Fb=!0;break}}return Fb}var Rb=new Wi(`history`),zb=new Wi(`closeHistory`);function Bb(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Vi({key:Rb,state:{init(){return new Ob(Tb.empty,Tb.empty,null,0,-1)},apply(t,n,r){return Ab(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?Hb:n==`historyRedo`?Ub:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function Vb(e,t){return(n,r)=>{let i=Rb.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=Pb(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var Hb=Vb(!1,!0),Ub=Vb(!0,!0);hp.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Vi({key:new Wi(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var Wb=hp.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[sb(this.options)]}});hp.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Vi({key:new Wi(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return vl.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(hl.node(t,t+e.nodeSize,{class:this.options.className}))}),vl.create(e,a)}}})]}});var Gb=hp.create({name:`gapCursor`,addProseMirrorPlugins(){return[mb()]},extendNodeSchema(e){return{allowGapCursor:Ld(F(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),Kb=`placeholder`;function qb(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var Jb=hp.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:Kb,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${qb(this.options.dataAttribute)}`:`data-${Kb}`;return[new Vi({key:new Wi(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&bf(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=hl.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),vl.create(t,a)}}})]}});hp.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Vi({key:new Wi(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||xf(n.selection)||e.view.dragging?null:vl.create(n.doc,[hl.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function Yb({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Xb=hp.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Wi(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Vi({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!Yb({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!Yb({node:r,types:n})}}})]}}),Zb=hp.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Hb(e,t),redo:()=>({state:e,dispatch:t})=>Ub(e,t)}},addProseMirrorPlugins(){return[Bb(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Qb=hp.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(jm.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(hy.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(Oy.configure(this.options.bulletList)),this.options.code!==!1&&e.push(vy.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(wm.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(by.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(Wb.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(Gb.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(zm.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Vm.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Zb.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(xy.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(Lm.configure(this.options.italic)),this.options.listItem!==!1&&e.push(ky.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(By.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(n_.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(Yy.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(tb.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(ib.configure(this.options.strike)),this.options.text!==!1&&e.push(ab.configure(this.options.text)),this.options.underline!==!1&&e.push(ob.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(Xb.configure(this.options?.trailingNode)),e}}),$b=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};$b.prototype.normal={},$b.prototype.property={},$b.prototype.space=void 0;function ex(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new $b(n,r,t)}function tx(e){return e.toLowerCase()}var nx=class{constructor(e,t){this.attribute=t,this.property=e}};nx.prototype.attribute=``,nx.prototype.booleanish=!1,nx.prototype.boolean=!1,nx.prototype.commaOrSpaceSeparated=!1,nx.prototype.commaSeparated=!1,nx.prototype.defined=!1,nx.prototype.mustUseProperty=!1,nx.prototype.number=!1,nx.prototype.overloadedBoolean=!1,nx.prototype.property=``,nx.prototype.spaceSeparated=!1,nx.prototype.space=void 0;var rx=e({boolean:()=>R,booleanish:()=>ax,commaOrSpaceSeparated:()=>lx,commaSeparated:()=>cx,number:()=>z,overloadedBoolean:()=>ox,spaceSeparated:()=>sx}),ix=0,R=ux(),ax=ux(),ox=ux(),z=ux(),sx=ux(),cx=ux(),lx=ux();function ux(){return 2**++ix}var dx=Object.keys(rx),fx=class extends nx{constructor(e,t,n,r){let i=-1;if(super(e,t),px(this,`space`,r),typeof n==`number`)for(;++i<dx.length;){let e=dx[i];px(this,dx[i],(n&rx[e])===rx[e])}}};fx.prototype.defined=!0;function px(e,t,n){n&&(e[t]=n)}function mx(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new fx(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[tx(r)]=r,n[tx(a.attribute)]=r}return new $b(t,n,e.space)}var hx=mx({properties:{ariaActiveDescendant:null,ariaAtomic:ax,ariaAutoComplete:null,ariaBusy:ax,ariaChecked:ax,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:sx,ariaCurrent:null,ariaDescribedBy:sx,ariaDetails:null,ariaDisabled:ax,ariaDropEffect:sx,ariaErrorMessage:null,ariaExpanded:ax,ariaFlowTo:sx,ariaGrabbed:ax,ariaHasPopup:null,ariaHidden:ax,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:sx,ariaLevel:z,ariaLive:null,ariaModal:ax,ariaMultiLine:ax,ariaMultiSelectable:ax,ariaOrientation:null,ariaOwns:sx,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:ax,ariaReadOnly:ax,ariaRelevant:null,ariaRequired:ax,ariaRoleDescription:sx,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:ax,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function gx(e,t){return t in e?e[t]:t}function _x(e,t){return gx(e,t.toLowerCase())}var vx=mx({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:cx,acceptCharset:sx,accessKey:sx,action:null,allow:null,allowFullScreen:R,allowPaymentRequest:R,allowUserMedia:R,alt:null,as:null,async:R,autoCapitalize:null,autoComplete:sx,autoFocus:R,autoPlay:R,blocking:sx,capture:null,charSet:null,checked:R,cite:null,className:sx,cols:z,colSpan:null,content:null,contentEditable:ax,controls:R,controlsList:sx,coords:z|cx,crossOrigin:null,data:null,dateTime:null,decoding:null,default:R,defer:R,dir:null,dirName:null,disabled:R,download:ox,draggable:ax,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:R,formTarget:null,headers:sx,height:z,hidden:ox,high:z,href:null,hrefLang:null,htmlFor:sx,httpEquiv:sx,id:null,imageSizes:null,imageSrcSet:null,inert:R,inputMode:null,integrity:null,is:null,isMap:R,itemId:null,itemProp:sx,itemRef:sx,itemScope:R,itemType:sx,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:R,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:R,muted:R,name:null,nonce:null,noModule:R,noValidate:R,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:R,optimum:z,pattern:null,ping:sx,placeholder:null,playsInline:R,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:R,referrerPolicy:null,rel:sx,required:R,reversed:R,rows:z,rowSpan:z,sandbox:sx,scope:null,scoped:R,seamless:R,selected:R,shadowRootClonable:R,shadowRootDelegatesFocus:R,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:ax,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:R,useMap:null,value:ax,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:sx,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:R,declare:R,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:R,noHref:R,noShade:R,noWrap:R,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:ax,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:R,disableRemotePlayback:R,prefix:null,property:null,results:z,security:null,unselectable:null},space:`html`,transform:_x}),yx=mx({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:lx,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:sx,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:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:R,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,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:cx,g2:cx,glyphName:cx,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:lx,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,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:z,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:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:sx,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lx,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lx,rev:lx,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lx,requiredFeatures:lx,requiredFonts:lx,requiredFormats:lx,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:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:lx,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lx,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lx,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:gx}),bx=mx({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()}}),xx=mx({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:_x}),Sx=mx({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Cx=/[A-Z]/g,wx=/-[a-z]/g,Tx=/^data[-\w.:]+$/i;function Ex(e,t){let n=tx(t),r=t,i=nx;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Tx.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(wx,Ox);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!wx.test(e)){let n=e.replace(Cx,Dx);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=fx}return new i(r,t)}function Dx(e){return`-`+e.toLowerCase()}function Ox(e){return e.charAt(1).toUpperCase()}var kx=ex([hx,vx,bx,xx,Sx],`html`),Ax=ex([hx,yx,bx,xx,Sx],`svg`);function jx(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Mx(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Nx=/[#.]/g;function Px(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Nx.lastIndex=i;let e=Nx.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Fx(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ix(e){return e.join(` `).trim()}function Lx(e,t,n){let r=n?Ux(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Px(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Rx(i))a.unshift(i);else for(let[t,n]of Object.entries(i))zx(e,o.properties,t,n)}for(let e of a)Bx(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Rx(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function zx(e,t,n,r){let i=Ex(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Fx(r):i.commaSeparated?jx(r):i.commaOrSpaceSeparated?Fx(jx(r).join(` `)):Vx(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Hx(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Vx(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Bx(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Bx(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Bx(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Vx(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||tx(n)===tx(t)))return!0}return n}function Hx(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Ux(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Wx=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Gx=Lx(kx,`div`),Kx=Lx(Ax,`g`,Wx);function qx(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Jx(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Jx(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Jx(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
147
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Yx={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Xx={}.hasOwnProperty,Zx=Object.prototype;function Qx(e,t){let n=t||{};return $x({file:n.file||void 0,location:!1,schema:n.space===`svg`?Ax:kx,verbose:n.verbose||!1},e)}function $x(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},nS(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:eS(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=qx(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},nS(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},nS(e,r,n),n}default:return n=tS(e,t),n}}function eS(e,t){let n=-1,r=[];for(;++n<t.length;){let i=$x(e,t[n]);r.push(i)}return r}function tS(e,t){let n=e.schema;e.schema=t.namespaceURI===Yx.svg?Ax:kx;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Xx.call(Zx,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Kx:Gx)(t.tagName,i,eS(e,t.childNodes));if(nS(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&iS(r.startTag),o=r&&r.endTag&&iS(r.endTag),s=$x(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function nS(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=rS(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function rS(e,t,n){let r=iS(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Xx.call(n.attrs,i)&&(r[Ex(e.schema,i).property]=iS(n.attrs[i]));n.startTag;let a=iS(n.startTag),o=n.endTag?iS(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function iS(e){let t=aS({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=aS({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function aS(e){return e.line&&e.column?e:void 0}var oS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),B;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(B||={});var sS={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function cS(e){return e>=55296&&e<=57343}function lS(e){return e>=56320&&e<=57343}function uS(e,t){return(e-55296)*1024+9216+t}function dS(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function fS(e){return e>=64976&&e<=65007||oS.has(e)}var V;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(V||={});var pS=65536,mS=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=pS,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(lS(t))return this.pos++,this._addGap(),uS(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(V.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let n=this.html.charCodeAt(t);return n===B.CARRIAGE_RETURN?B.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let e=this.html.charCodeAt(this.pos);return e===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):e===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,cS(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===B.LINE_FEED||e===B.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){dS(e)?this._err(V.controlCharacterInInputStream):fS(e)&&this._err(V.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},hS;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(hS||={});function gS(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var _S=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),vS=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function yS(e){return e>=55296&&e<=57343||e>1114111?65533:vS.get(e)??e}var bS;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(bS||={});var xS=32,SS;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(SS||={});function CS(e){return e>=bS.ZERO&&e<=bS.NINE}function wS(e){return e>=bS.UPPER_A&&e<=bS.UPPER_F||e>=bS.LOWER_A&&e<=bS.LOWER_F}function TS(e){return e>=bS.UPPER_A&&e<=bS.UPPER_Z||e>=bS.LOWER_A&&e<=bS.LOWER_Z||CS(e)}function ES(e){return e===bS.EQUALS||TS(e)}var DS;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(DS||={});var OS;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(OS||={});var kS=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=DS.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=OS.Strict}startEntity(e){this.decodeMode=e,this.state=DS.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case DS.EntityStart:return e.charCodeAt(t)===bS.NUM?(this.state=DS.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=DS.NamedEntity,this.stateNamedEntity(e,t));case DS.NumericStart:return this.stateNumericStart(e,t);case DS.NumericDecimal:return this.stateNumericDecimal(e,t);case DS.NumericHex:return this.stateNumericHex(e,t);case DS.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|xS)===bS.LOWER_X?(this.state=DS.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=DS.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(CS(r)||wS(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(CS(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===bS.SEMI)this.consumed+=1;else if(this.decodeMode===OS.Strict)return 0;return this.emitCodePoint(yS(this.result),this.consumed),this.errors&&(e!==bS.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&SS.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=AS(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===OS.Attribute&&(i===0||ES(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&SS.VALUE_LENGTH)>>14,i!==0){if(a===bS.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==OS.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&SS.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~SS.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case DS.NamedEntity:return this.result!==0&&(this.decodeMode!==OS.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case DS.NumericDecimal:return this.emitNumericEntity(0,2);case DS.NumericHex:return this.emitNumericEntity(0,3);case DS.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case DS.EntityStart:return 0}}};function AS(e,t,n,r){let i=(t&SS.BRANCH_LENGTH)>>7,a=t&SS.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var H;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(H||={});var jS;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(jS||={});var MS;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(MS||={});var U;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(U||={});var W;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(W||={});var NS=new Map([[U.A,W.A],[U.ADDRESS,W.ADDRESS],[U.ANNOTATION_XML,W.ANNOTATION_XML],[U.APPLET,W.APPLET],[U.AREA,W.AREA],[U.ARTICLE,W.ARTICLE],[U.ASIDE,W.ASIDE],[U.B,W.B],[U.BASE,W.BASE],[U.BASEFONT,W.BASEFONT],[U.BGSOUND,W.BGSOUND],[U.BIG,W.BIG],[U.BLOCKQUOTE,W.BLOCKQUOTE],[U.BODY,W.BODY],[U.BR,W.BR],[U.BUTTON,W.BUTTON],[U.CAPTION,W.CAPTION],[U.CENTER,W.CENTER],[U.CODE,W.CODE],[U.COL,W.COL],[U.COLGROUP,W.COLGROUP],[U.DD,W.DD],[U.DESC,W.DESC],[U.DETAILS,W.DETAILS],[U.DIALOG,W.DIALOG],[U.DIR,W.DIR],[U.DIV,W.DIV],[U.DL,W.DL],[U.DT,W.DT],[U.EM,W.EM],[U.EMBED,W.EMBED],[U.FIELDSET,W.FIELDSET],[U.FIGCAPTION,W.FIGCAPTION],[U.FIGURE,W.FIGURE],[U.FONT,W.FONT],[U.FOOTER,W.FOOTER],[U.FOREIGN_OBJECT,W.FOREIGN_OBJECT],[U.FORM,W.FORM],[U.FRAME,W.FRAME],[U.FRAMESET,W.FRAMESET],[U.H1,W.H1],[U.H2,W.H2],[U.H3,W.H3],[U.H4,W.H4],[U.H5,W.H5],[U.H6,W.H6],[U.HEAD,W.HEAD],[U.HEADER,W.HEADER],[U.HGROUP,W.HGROUP],[U.HR,W.HR],[U.HTML,W.HTML],[U.I,W.I],[U.IMG,W.IMG],[U.IMAGE,W.IMAGE],[U.INPUT,W.INPUT],[U.IFRAME,W.IFRAME],[U.KEYGEN,W.KEYGEN],[U.LABEL,W.LABEL],[U.LI,W.LI],[U.LINK,W.LINK],[U.LISTING,W.LISTING],[U.MAIN,W.MAIN],[U.MALIGNMARK,W.MALIGNMARK],[U.MARQUEE,W.MARQUEE],[U.MATH,W.MATH],[U.MENU,W.MENU],[U.META,W.META],[U.MGLYPH,W.MGLYPH],[U.MI,W.MI],[U.MO,W.MO],[U.MN,W.MN],[U.MS,W.MS],[U.MTEXT,W.MTEXT],[U.NAV,W.NAV],[U.NOBR,W.NOBR],[U.NOFRAMES,W.NOFRAMES],[U.NOEMBED,W.NOEMBED],[U.NOSCRIPT,W.NOSCRIPT],[U.OBJECT,W.OBJECT],[U.OL,W.OL],[U.OPTGROUP,W.OPTGROUP],[U.OPTION,W.OPTION],[U.P,W.P],[U.PARAM,W.PARAM],[U.PLAINTEXT,W.PLAINTEXT],[U.PRE,W.PRE],[U.RB,W.RB],[U.RP,W.RP],[U.RT,W.RT],[U.RTC,W.RTC],[U.RUBY,W.RUBY],[U.S,W.S],[U.SCRIPT,W.SCRIPT],[U.SEARCH,W.SEARCH],[U.SECTION,W.SECTION],[U.SELECT,W.SELECT],[U.SOURCE,W.SOURCE],[U.SMALL,W.SMALL],[U.SPAN,W.SPAN],[U.STRIKE,W.STRIKE],[U.STRONG,W.STRONG],[U.STYLE,W.STYLE],[U.SUB,W.SUB],[U.SUMMARY,W.SUMMARY],[U.SUP,W.SUP],[U.TABLE,W.TABLE],[U.TBODY,W.TBODY],[U.TEMPLATE,W.TEMPLATE],[U.TEXTAREA,W.TEXTAREA],[U.TFOOT,W.TFOOT],[U.TD,W.TD],[U.TH,W.TH],[U.THEAD,W.THEAD],[U.TITLE,W.TITLE],[U.TR,W.TR],[U.TRACK,W.TRACK],[U.TT,W.TT],[U.U,W.U],[U.UL,W.UL],[U.SVG,W.SVG],[U.VAR,W.VAR],[U.WBR,W.WBR],[U.XMP,W.XMP]]);function PS(e){return NS.get(e)??W.UNKNOWN}var G=W,FS={[H.HTML]:new Set([G.ADDRESS,G.APPLET,G.AREA,G.ARTICLE,G.ASIDE,G.BASE,G.BASEFONT,G.BGSOUND,G.BLOCKQUOTE,G.BODY,G.BR,G.BUTTON,G.CAPTION,G.CENTER,G.COL,G.COLGROUP,G.DD,G.DETAILS,G.DIR,G.DIV,G.DL,G.DT,G.EMBED,G.FIELDSET,G.FIGCAPTION,G.FIGURE,G.FOOTER,G.FORM,G.FRAME,G.FRAMESET,G.H1,G.H2,G.H3,G.H4,G.H5,G.H6,G.HEAD,G.HEADER,G.HGROUP,G.HR,G.HTML,G.IFRAME,G.IMG,G.INPUT,G.LI,G.LINK,G.LISTING,G.MAIN,G.MARQUEE,G.MENU,G.META,G.NAV,G.NOEMBED,G.NOFRAMES,G.NOSCRIPT,G.OBJECT,G.OL,G.P,G.PARAM,G.PLAINTEXT,G.PRE,G.SCRIPT,G.SECTION,G.SELECT,G.SOURCE,G.STYLE,G.SUMMARY,G.TABLE,G.TBODY,G.TD,G.TEMPLATE,G.TEXTAREA,G.TFOOT,G.TH,G.THEAD,G.TITLE,G.TR,G.TRACK,G.UL,G.WBR,G.XMP]),[H.MATHML]:new Set([G.MI,G.MO,G.MN,G.MS,G.MTEXT,G.ANNOTATION_XML]),[H.SVG]:new Set([G.TITLE,G.FOREIGN_OBJECT,G.DESC]),[H.XLINK]:new Set,[H.XML]:new Set,[H.XMLNS]:new Set},IS=new Set([G.H1,G.H2,G.H3,G.H4,G.H5,G.H6]);new Set([U.STYLE,U.SCRIPT,U.XMP,U.IFRAME,U.NOEMBED,U.NOFRAMES,U.PLAINTEXT]);var K;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(K||={});var LS={DATA:K.DATA,RCDATA:K.RCDATA,RAWTEXT:K.RAWTEXT,SCRIPT_DATA:K.SCRIPT_DATA,PLAINTEXT:K.PLAINTEXT,CDATA_SECTION:K.CDATA_SECTION};function RS(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function zS(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function BS(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function VS(e){return BS(e)||zS(e)}function HS(e){return VS(e)||RS(e)}function US(e){return e+32}function WS(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function GS(e){return WS(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function KS(e){return e===B.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:cS(e)?V.surrogateCharacterReference:fS(e)?V.noncharacterCharacterReference:dS(e)||e===B.CARRIAGE_RETURN?V.controlCharacterReference:null}var qS=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=K.DATA,this.returnState=K.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new mS(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new kS(_S,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=KS(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:hS.START_TAG,tagName:``,tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:hS.END_TAG,tagName:``,tagID:W.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:hS.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:hS.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(gS(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=PS(e.tagName),e.type===hS.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(V.endTagWithAttributes),e.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case hS.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case hS.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case hS.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:hS.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=WS(e)?hS.WHITESPACE_CHARACTER:e===B.NULL?hS.NULL_CHARACTER:hS.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(hS.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=K.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?OS.Attribute:OS.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===K.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===K.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case K.DATA:this._stateData(e);break;case K.RCDATA:this._stateRcdata(e);break;case K.RAWTEXT:this._stateRawtext(e);break;case K.SCRIPT_DATA:this._stateScriptData(e);break;case K.PLAINTEXT:this._statePlaintext(e);break;case K.TAG_OPEN:this._stateTagOpen(e);break;case K.END_TAG_OPEN:this._stateEndTagOpen(e);break;case K.TAG_NAME:this._stateTagName(e);break;case K.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case K.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case K.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case K.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case K.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case K.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case K.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case K.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case K.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case K.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case K.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case K.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case K.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case K.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case K.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case K.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case K.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case K.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case K.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case K.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case K.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case K.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case K.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case K.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case K.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case K.BOGUS_COMMENT:this._stateBogusComment(e);break;case K.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case K.COMMENT_START:this._stateCommentStart(e);break;case K.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case K.COMMENT:this._stateComment(e);break;case K.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case K.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case K.COMMENT_END:this._stateCommentEnd(e);break;case K.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case K.DOCTYPE:this._stateDoctype(e);break;case K.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case K.DOCTYPE_NAME:this._stateDoctypeName(e);break;case K.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case K.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case K.CDATA_SECTION:this._stateCdataSection(e);break;case K.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case K.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case K.CHARACTER_REFERENCE:this._stateCharacterReference();break;case K.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.TAG_OPEN;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitCodePoint(e);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case B.AMPERSAND:this._startCharacterReference();break;case B.LESS_THAN_SIGN:this.state=K.RCDATA_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.RAWTEXT_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(VS(e))this._createStartTagToken(),this.state=K.TAG_NAME,this._stateTagName(e);else switch(e){case B.EXCLAMATION_MARK:this.state=K.MARKUP_DECLARATION_OPEN;break;case B.SOLIDUS:this.state=K.END_TAG_OPEN;break;case B.QUESTION_MARK:this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e);break;case B.EOF:this._err(V.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=K.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(VS(e))this._createEndTagToken(),this.state=K.TAG_NAME,this._stateTagName(e);else switch(e){case B.GREATER_THAN_SIGN:this._err(V.missingEndTagName),this.state=K.DATA;break;case B.EOF:this._err(V.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.SOLIDUS:this.state=K.SELF_CLOSING_START_TAG;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentTagToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),t.tagName+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(zS(e)?US(e):e)}}_stateRcdataLessThanSign(e){e===B.SOLIDUS?this.state=K.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=K.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){VS(e)?(this.state=K.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=K.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=K.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=K.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=K.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===B.SOLIDUS?this.state=K.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){VS(e)?(this.state=K.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case B.SOLIDUS:this.state=K.SCRIPT_DATA_END_TAG_OPEN;break;case B.EXCLAMATION_MARK:this.state=K.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=K.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){VS(e)?(this.state=K.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===B.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===B.HYPHEN_MINUS?(this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=K.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case B.GREATER_THAN_SIGN:this.state=K.SCRIPT_DATA,this._emitChars(`>`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===B.SOLIDUS?this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:VS(e)?(this._emitChars(`<`),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){VS(e)?(this.state=K.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(sS.SCRIPT,!1)&&GS(this.preprocessor.peek(sS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<sS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case B.HYPHEN_MINUS:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:this._emitChars(`-`);break;case B.LESS_THAN_SIGN:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case B.GREATER_THAN_SIGN:this.state=K.SCRIPT_DATA,this._emitChars(`>`);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case B.EOF:this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===B.SOLIDUS?(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(sS.SCRIPT,!1)&&GS(this.preprocessor.peek(sS.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<sS.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=K.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=K.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case B.EQUALS_SIGN:this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=K.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:this._leaveAttrName(),this.state=K.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case B.EQUALS_SIGN:this._leaveAttrName(),this.state=K.BEFORE_ATTRIBUTE_VALUE;break;case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(zS(e)?US(e):e)}}_stateAfterAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:this.state=K.SELF_CLOSING_START_TAG;break;case B.EQUALS_SIGN:this.state=K.BEFORE_ATTRIBUTE_VALUE;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentTagToken();break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=K.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:this.state=K.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case B.APOSTROPHE:this.state=K.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingAttributeValue),this.state=K.DATA,this.emitCurrentTagToken();break;default:this.state=K.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case B.APOSTROPHE:this.state=K.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case B.AMPERSAND:this._startCharacterReference();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.AMPERSAND:this._startCharacterReference();break;case B.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this._leaveAttrValue(),this.state=K.BEFORE_ATTRIBUTE_NAME;break;case B.SOLIDUS:this._leaveAttrValue(),this.state=K.SELF_CLOSING_START_TAG;break;case B.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=K.DATA,this.emitCurrentTagToken();break;case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.missingWhitespaceBetweenAttributes),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case B.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=K.DATA,this.emitCurrentTagToken();break}case B.EOF:this._err(V.eofInTag),this._emitEOFToken();break;default:this._err(V.unexpectedSolidusInTag),this.state=K.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case B.NULL:this._err(V.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(sS.DASH_DASH,!0)?(this._createCommentToken(sS.DASH_DASH.length+1),this.state=K.COMMENT_START):this._consumeSequenceIfMatch(sS.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(sS.DOCTYPE.length+1),this.state=K.DOCTYPE):this._consumeSequenceIfMatch(sS.CDATA_START,!0)?this.inForeignNode?this.state=K.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(sS.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=K.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=K.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_START_DASH;break;case B.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=K.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=K.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END;break;case B.GREATER_THAN_SIGN:this._err(V.abruptClosingOfEmptyComment),this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=K.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END_DASH;break;case B.LESS_THAN_SIGN:t.data+=`<`,this.state=K.COMMENT_LESS_THAN_SIGN;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.data+=`�`;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case B.EXCLAMATION_MARK:t.data+=`!`,this.state=K.COMMENT_LESS_THAN_SIGN_BANG;break;case B.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=K.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===B.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=K.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===B.HYPHEN_MINUS?this.state=K.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=K.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==B.GREATER_THAN_SIGN&&e!==B.EOF&&this._err(V.nestedComment),this.state=K.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:this.state=K.COMMENT_END;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=K.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentComment(t);break;case B.EXCLAMATION_MARK:this.state=K.COMMENT_END_BANG;break;case B.HYPHEN_MINUS:t.data+=`-`;break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=K.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case B.HYPHEN_MINUS:t.data+=`--!`,this.state=K.COMMENT_END_DASH;break;case B.GREATER_THAN_SIGN:this._err(V.incorrectlyClosedComment),this.state=K.DATA,this.emitCurrentComment(t);break;case B.EOF:this._err(V.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=K.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case B.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=K.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(zS(e))this._createDoctypeToken(String.fromCharCode(US(e))),this.state=K.DOCTYPE_NAME;else switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:this._err(V.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=K.DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=K.DATA;break}case B.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=K.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.AFTER_DOCTYPE_NAME;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.NULL:this._err(V.unexpectedNullCharacter),t.name+=`�`;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(zS(e)?US(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(sS.PUBLIC,!1)?this.state=K.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(sS.SYSTEM,!1)?this.state=K.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.publicId=``,this.state=K.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.publicId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case B.APOSTROPHE:this.state=K.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.publicId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case B.GREATER_THAN_SIGN:this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.QUOTATION_MARK:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:this.state=K.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.QUOTATION_MARK:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case B.APOSTROPHE:t.systemId=``,this.state=K.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case B.GREATER_THAN_SIGN:this._err(V.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.DATA,this.emitCurrentDoctype(t);break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case B.QUOTATION_MARK:this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.systemId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case B.APOSTROPHE:this.state=K.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case B.NULL:this._err(V.unexpectedNullCharacter),t.systemId+=`�`;break;case B.GREATER_THAN_SIGN:this._err(V.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.EOF:this._err(V.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=K.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=K.DATA;break;case B.NULL:this._err(V.unexpectedNullCharacter);break;case B.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case B.RIGHT_SQUARE_BRACKET:this.state=K.CDATA_SECTION_BRACKET;break;case B.EOF:this._err(V.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===B.RIGHT_SQUARE_BRACKET?this.state=K.CDATA_SECTION_END:(this._emitChars(`]`),this.state=K.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case B.GREATER_THAN_SIGN:this.state=K.DATA;break;case B.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=K.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&HS(this.preprocessor.peek(1))?K.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){HS(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===B.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},JS=new Set([W.DD,W.DT,W.LI,W.OPTGROUP,W.OPTION,W.P,W.RB,W.RP,W.RT,W.RTC]),YS=new Set([...JS,W.CAPTION,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]),XS=new Set([W.APPLET,W.CAPTION,W.HTML,W.MARQUEE,W.OBJECT,W.TABLE,W.TD,W.TEMPLATE,W.TH]),ZS=new Set([...XS,W.OL,W.UL]),QS=new Set([...XS,W.BUTTON]),$S=new Set([W.ANNOTATION_XML,W.MI,W.MN,W.MO,W.MS,W.MTEXT]),eC=new Set([W.DESC,W.FOREIGN_OBJECT,W.TITLE]),tC=new Set([W.TR,W.TEMPLATE,W.HTML]),nC=new Set([W.TBODY,W.TFOOT,W.THEAD,W.TEMPLATE,W.HTML]),rC=new Set([W.TABLE,W.TEMPLATE,W.HTML]),iC=new Set([W.TD,W.TH]),aC=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=W.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===W.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===H.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==H.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(IS,H.HTML)}popUntilTableCellPopped(){this.popUntilPopped(iC,H.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(rC,H.HTML)}clearBackToTableBodyContext(){this.clearBackTo(nC,H.HTML)}clearBackToTableRowContext(){this.clearBackTo(tC,H.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===W.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===W.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case H.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case H.SVG:if(eC.has(r))return!1;break;case H.MATHML:if($S.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,XS)}hasInListItemScope(e){return this.hasInDynamicScope(e,ZS)}hasInButtonScope(e){return this.hasInDynamicScope(e,QS)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case H.HTML:if(IS.has(t))return!0;if(XS.has(t))return!1;break;case H.SVG:if(eC.has(t))return!1;break;case H.MATHML:if($S.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case e:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===H.HTML)switch(this.tagIDs[e]){case W.TBODY:case W.THEAD:case W.TFOOT:return!0;case W.TABLE:case W.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case e:return!0;case W.OPTION:case W.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&JS.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&YS.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&YS.has(this.currentTagId);)this.pop()}},oC=3,sC;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(sC||={});var cC={type:sC.Marker},lC=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===sC.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<oC)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<oC)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=oC&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(cC)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:sC.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:sC.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(cC);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===sC.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===sC.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===sC.Element&&t.element===e)}},uC={createDocument(){return{nodeName:`#document`,mode:MS.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};uC.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(uC.isTextNode(n)){n.value+=t;return}}uC.appendChild(e,uC.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&uC.isTextNode(r)?r.value+=t:uC.insertBefore(e,uC.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},dC=`html`,fC=`about:legacy-compat`,pC=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,mC=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),hC=[...mC,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],gC=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),_C=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],vC=[..._C,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function yC(e,t){return t.some(t=>e.startsWith(t))}function bC(e){return e.name===dC&&e.publicId===null&&(e.systemId===null||e.systemId===fC)}function xC(e){if(e.name!==dC)return MS.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===pC)return MS.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),gC.has(n))return MS.QUIRKS;let e=t===null?hC:mC;if(yC(n,e))return MS.QUIRKS;if(e=t===null?_C:vC,yC(n,e))return MS.LIMITED_QUIRKS}return MS.NO_QUIRKS}var SC={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},CC=`definitionurl`,wC=`definitionURL`,TC=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),EC=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:H.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:H.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:H.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:H.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:H.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:H.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:H.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:H.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:H.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:H.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:H.XMLNS}]]),DC=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),OC=new Set([W.B,W.BIG,W.BLOCKQUOTE,W.BODY,W.BR,W.CENTER,W.CODE,W.DD,W.DIV,W.DL,W.DT,W.EM,W.EMBED,W.H1,W.H2,W.H3,W.H4,W.H5,W.H6,W.HEAD,W.HR,W.I,W.IMG,W.LI,W.LISTING,W.MENU,W.META,W.NOBR,W.OL,W.P,W.PRE,W.RUBY,W.S,W.SMALL,W.SPAN,W.STRONG,W.STRIKE,W.SUB,W.SUP,W.TABLE,W.TT,W.U,W.UL,W.VAR]);function kC(e){let t=e.tagID;return t===W.FONT&&e.attrs.some(({name:e})=>e===jS.COLOR||e===jS.SIZE||e===jS.FACE)||OC.has(t)}function AC(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===CC){e.attrs[t].name=wC;break}}function jC(e){for(let t=0;t<e.attrs.length;t++){let n=TC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function MC(e){for(let t=0;t<e.attrs.length;t++){let n=EC.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function NC(e){let t=DC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=PS(e.tagName))}function PC(e,t){return t===H.MATHML&&(e===W.MI||e===W.MO||e===W.MN||e===W.MS||e===W.MTEXT)}function FC(e,t,n){if(t===H.MATHML&&e===W.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===jS.ENCODING){let t=n[e].value.toLowerCase();return t===SC.TEXT_HTML||t===SC.APPLICATION_XML}}return t===H.SVG&&(e===W.FOREIGN_OBJECT||e===W.DESC||e===W.TITLE)}function IC(e,t,n,r){return(!r||r===H.HTML)&&FC(e,t,n)||(!r||r===H.MATHML)&&PC(e,t)}var LC=`hidden`,RC=8,zC=3,q;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(q||={});var BC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},VC=new Set([W.TABLE,W.TBODY,W.TFOOT,W.THEAD,W.TR]),HC={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:uC,onParseError:null},UC=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...HC,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new qS(this.options,this),this.activeFormattingElements=new lC(this.treeAdapter),this.fragmentContextID=n?PS(this.treeAdapter.getTagName(n)):W.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new aC(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...HC,...t};e??=n.treeAdapter.createElement(U.TEMPLATE,H.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,H.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===W.TEMPLATE&&i.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??BC,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===H.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,H.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=LS.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===U.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==H.HTML))switch(this.fragmentContextID){case W.TITLE:case W.TEXTAREA:this.tokenizer.state=LS.RCDATA;break;case W.STYLE:case W.XMP:case W.IFRAME:case W.NOEMBED:case W.NOFRAMES:case W.NOSCRIPT:this.tokenizer.state=LS.RAWTEXT;break;case W.SCRIPT:this.tokenizer.state=LS.SCRIPT_DATA;break;case W.PLAINTEXT:this.tokenizer.state=LS.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,H.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,H.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(U.HTML,H.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,W.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===hS.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===W.SVG&&this.treeAdapter.getTagName(t)===U.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===H.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===W.MGLYPH||e.tagID===W.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,H.HTML)}_processToken(e){switch(e.type){case hS.CHARACTER:this.onCharacter(e);break;case hS.NULL_CHARACTER:this.onNullCharacter(e);break;case hS.COMMENT:this.onComment(e);break;case hS.DOCTYPE:this.onDoctype(e);break;case hS.START_TAG:this._processStartTag(e);break;case hS.END_TAG:this.onEndTag(e);break;case hS.EOF:this.onEof(e);break;case hS.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return IC(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===sC.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(W.P),this.openElements.popUntilTagNamePopped(W.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case W.TR:this.insertionMode=q.IN_ROW;return;case W.TBODY:case W.THEAD:case W.TFOOT:this.insertionMode=q.IN_TABLE_BODY;return;case W.CAPTION:this.insertionMode=q.IN_CAPTION;return;case W.COLGROUP:this.insertionMode=q.IN_COLUMN_GROUP;return;case W.TABLE:this.insertionMode=q.IN_TABLE;return;case W.BODY:this.insertionMode=q.IN_BODY;return;case W.FRAMESET:this.insertionMode=q.IN_FRAMESET;return;case W.SELECT:this._resetInsertionModeForSelect(e);return;case W.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case W.HTML:this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return;case W.TD:case W.TH:if(e>0){this.insertionMode=q.IN_CELL;return}break;case W.HEAD:if(e>0){this.insertionMode=q.IN_HEAD;return}break}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===W.TEMPLATE)break;if(e===W.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(e){return VC.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case W.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===H.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case W.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return FS[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sE(this,e);return}switch(this.insertionMode){case q.INITIAL:nw(this,e);break;case q.BEFORE_HTML:aw(this,e);break;case q.BEFORE_HEAD:cw(this,e);break;case q.IN_HEAD:fw(this,e);break;case q.IN_HEAD_NO_SCRIPT:hw(this,e);break;case q.AFTER_HEAD:vw(this,e);break;case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:xw(this,e);break;case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:gT(this,e);break;case q.IN_TABLE_TEXT:kT(this,e);break;case q.IN_COLUMN_GROUP:IT(this,e);break;case q.AFTER_BODY:QT(this,e);break;case q.AFTER_AFTER_BODY:iE(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){oE(this,e);return}switch(this.insertionMode){case q.INITIAL:nw(this,e);break;case q.BEFORE_HTML:aw(this,e);break;case q.BEFORE_HEAD:cw(this,e);break;case q.IN_HEAD:fw(this,e);break;case q.IN_HEAD_NO_SCRIPT:hw(this,e);break;case q.AFTER_HEAD:vw(this,e);break;case q.TEXT:this._insertCharacters(e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:gT(this,e);break;case q.IN_COLUMN_GROUP:IT(this,e);break;case q.AFTER_BODY:QT(this,e);break;case q.AFTER_AFTER_BODY:iE(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){ZC(this,e);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:ZC(this,e);break;case q.IN_TABLE_TEXT:AT(this,e);break;case q.AFTER_BODY:QC(this,e);break;case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:$C(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:tw(this,e);break;case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:this._err(e,V.misplacedDoctype);break;case q.IN_TABLE_TEXT:AT(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?lE(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:nw(this,e);break;case q.BEFORE_HTML:rw(this,e);break;case q.BEFORE_HEAD:ow(this,e);break;case q.IN_HEAD:lw(this,e);break;case q.IN_HEAD_NO_SCRIPT:pw(this,e);break;case q.AFTER_HEAD:gw(this,e);break;case q.IN_BODY:eT(this,e);break;case q.IN_TABLE:TT(this,e);break;case q.IN_TABLE_TEXT:AT(this,e);break;case q.IN_CAPTION:MT(this,e);break;case q.IN_COLUMN_GROUP:PT(this,e);break;case q.IN_TABLE_BODY:LT(this,e);break;case q.IN_ROW:zT(this,e);break;case q.IN_CELL:VT(this,e);break;case q.IN_SELECT:UT(this,e);break;case q.IN_SELECT_IN_TABLE:GT(this,e);break;case q.IN_TEMPLATE:qT(this,e);break;case q.AFTER_BODY:XT(this,e);break;case q.IN_FRAMESET:$T(this,e);break;case q.AFTER_FRAMESET:tE(this,e);break;case q.AFTER_AFTER_BODY:rE(this,e);break;case q.AFTER_AFTER_FRAMESET:aE(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?uE(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:nw(this,e);break;case q.BEFORE_HTML:iw(this,e);break;case q.BEFORE_HEAD:sw(this,e);break;case q.IN_HEAD:uw(this,e);break;case q.IN_HEAD_NO_SCRIPT:mw(this,e);break;case q.AFTER_HEAD:_w(this,e);break;case q.IN_BODY:fT(this,e);break;case q.TEXT:mT(this,e);break;case q.IN_TABLE:ET(this,e);break;case q.IN_TABLE_TEXT:AT(this,e);break;case q.IN_CAPTION:NT(this,e);break;case q.IN_COLUMN_GROUP:FT(this,e);break;case q.IN_TABLE_BODY:RT(this,e);break;case q.IN_ROW:BT(this,e);break;case q.IN_CELL:HT(this,e);break;case q.IN_SELECT:WT(this,e);break;case q.IN_SELECT_IN_TABLE:KT(this,e);break;case q.IN_TEMPLATE:JT(this,e);break;case q.AFTER_BODY:ZT(this,e);break;case q.IN_FRAMESET:eE(this,e);break;case q.AFTER_FRAMESET:nE(this,e);break;case q.AFTER_AFTER_BODY:iE(this,e);break;default:}}onEof(e){switch(this.insertionMode){case q.INITIAL:nw(this,e);break;case q.BEFORE_HTML:aw(this,e);break;case q.BEFORE_HEAD:cw(this,e);break;case q.IN_HEAD:fw(this,e);break;case q.IN_HEAD_NO_SCRIPT:hw(this,e);break;case q.AFTER_HEAD:vw(this,e);break;case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:pT(this,e);break;case q.TEXT:hT(this,e);break;case q.IN_TABLE_TEXT:AT(this,e);break;case q.IN_TEMPLATE:YT(this,e);break;case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:ew(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===B.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:this._insertCharacters(e);break;case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:bw(this,e);break;case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:gT(this,e);break;case q.IN_TABLE_TEXT:OT(this,e);break;default:}}};function WC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):dT(e,t),n}function GC(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function KC(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=zC;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=qC(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function qC(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function JC(e,t,n){let r=PS(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===W.TEMPLATE&&i===H.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function YC(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function XC(e,t){for(let n=0;n<RC;n++){let n=WC(e,t);if(!n)break;let r=GC(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=KC(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&JC(e,a,i),YC(e,r,n)}}function ZC(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function QC(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $C(e,t){e._appendCommentNode(t,e.document)}function ew(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function tw(e,t){e._setDocumentType(t);let n=t.forceQuirks?MS.QUIRKS:xC(t);bC(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=q.BEFORE_HTML}function nw(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,MS.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function rw(e,t){t.tagID===W.HTML?(e._insertElement(t,H.HTML),e.insertionMode=q.BEFORE_HEAD):aw(e,t)}function iw(e,t){let n=t.tagID;(n===W.HTML||n===W.HEAD||n===W.BODY||n===W.BR)&&aw(e,t)}function aw(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function ow(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.HEAD:e._insertElement(t,H.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break;default:cw(e,t)}}function sw(e,t){let n=t.tagID;n===W.HEAD||n===W.BODY||n===W.HTML||n===W.BR?cw(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function cw(e,t){e._insertFakeElement(U.HEAD,W.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function lw(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.TITLE:e._switchToTextParsing(t,LS.RCDATA);break;case W.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,LS.RAWTEXT):(e._insertElement(t,H.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break;case W.NOFRAMES:case W.STYLE:e._switchToTextParsing(t,LS.RAWTEXT);break;case W.SCRIPT:e._switchToTextParsing(t,LS.SCRIPT_DATA);break;case W.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break;case W.HEAD:e._err(t,V.misplacedStartTagForHeadElement);break;default:fw(e,t)}}function uw(e,t){switch(t.tagID){case W.HEAD:e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break;case W.BODY:case W.BR:case W.HTML:fw(e,t);break;case W.TEMPLATE:dw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function dw(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==W.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function fw(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function pw(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.BASEFONT:case W.BGSOUND:case W.HEAD:case W.LINK:case W.META:case W.NOFRAMES:case W.STYLE:lw(e,t);break;case W.NOSCRIPT:e._err(t,V.nestedNoscriptInHead);break;default:hw(e,t)}}function mw(e,t){switch(t.tagID){case W.NOSCRIPT:e.openElements.pop(),e.insertionMode=q.IN_HEAD;break;case W.BR:hw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function hw(e,t){let n=t.type===hS.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function gw(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.BODY:e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break;case W.FRAMESET:e._insertElement(t,H.HTML),e.insertionMode=q.IN_FRAMESET;break;case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,W.HEAD),lw(e,t),e.openElements.remove(e.headElement);break;case W.HEAD:e._err(t,V.misplacedStartTagForHeadElement);break;default:vw(e,t)}}function _w(e,t){switch(t.tagID){case W.BODY:case W.HTML:case W.BR:vw(e,t);break;case W.TEMPLATE:dw(e,t);break;default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function vw(e,t){e._insertFakeElement(U.BODY,W.BODY),e.insertionMode=q.IN_BODY,yw(e,t)}function yw(e,t){switch(t.type){case hS.CHARACTER:xw(e,t);break;case hS.WHITESPACE_CHARACTER:bw(e,t);break;case hS.COMMENT:ZC(e,t);break;case hS.START_TAG:eT(e,t);break;case hS.END_TAG:fT(e,t);break;case hS.EOF:pT(e,t);break;default:}}function bw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Sw(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Cw(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ww(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_FRAMESET)}function Tw(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function Ew(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&IS.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,H.HTML)}function Dw(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Ow(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),n||(e.formElement=e.openElements.current))}function kw(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===W.LI&&r===W.LI||(n===W.DD||n===W.DT)&&(r===W.DD||r===W.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==W.ADDRESS&&r!==W.DIV&&r!==W.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function Aw(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.tokenizer.state=LS.PLAINTEXT}function jw(e,t){e.openElements.hasInScope(W.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1}function Mw(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(U.A);n&&(XC(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Nw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Pw(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(W.NOBR)&&(XC(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Iw(e,t){e.treeAdapter.getDocumentMode(e.document)!==MS.QUIRKS&&e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function Lw(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Rw(e){let t=gS(e,jS.TYPE);return t!=null&&t.toLowerCase()===LC}function zw(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),Rw(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Bw(e,t){e._appendElement(t,H.HTML),t.ackSelfClosing=!0}function Vw(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hw(e,t){t.tagName=U.IMG,t.tagID=W.IMG,Lw(e,t)}function Uw(e,t){e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.tokenizer.state=LS.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function Ww(e,t){e.openElements.hasInButtonScope(W.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,LS.RAWTEXT)}function Gw(e,t){e.framesetOk=!1,e._switchToTextParsing(t,LS.RAWTEXT)}function Kw(e,t){e._switchToTextParsing(t,LS.RAWTEXT)}function qw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function Jw(e,t){e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function Yw(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,H.HTML)}function Xw(e,t){e.openElements.hasInScope(W.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(W.RTC),e._insertElement(t,H.HTML)}function Zw(e,t){e._reconstructActiveFormattingElements(),AC(t),MC(t),t.selfClosing?e._appendElement(t,H.MATHML):e._insertElement(t,H.MATHML),t.ackSelfClosing=!0}function Qw(e,t){e._reconstructActiveFormattingElements(),jC(t),MC(t),t.selfClosing?e._appendElement(t,H.SVG):e._insertElement(t,H.SVG),t.ackSelfClosing=!0}function $w(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function eT(e,t){switch(t.tagID){case W.I:case W.S:case W.B:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.SMALL:case W.STRIKE:case W.STRONG:Nw(e,t);break;case W.A:Mw(e,t);break;case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:Ew(e,t);break;case W.P:case W.DL:case W.OL:case W.UL:case W.DIV:case W.DIR:case W.NAV:case W.MAIN:case W.MENU:case W.ASIDE:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.DETAILS:case W.ADDRESS:case W.ARTICLE:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:Tw(e,t);break;case W.LI:case W.DD:case W.DT:kw(e,t);break;case W.BR:case W.IMG:case W.WBR:case W.AREA:case W.EMBED:case W.KEYGEN:Lw(e,t);break;case W.HR:Vw(e,t);break;case W.RB:case W.RTC:Yw(e,t);break;case W.RT:case W.RP:Xw(e,t);break;case W.PRE:case W.LISTING:Dw(e,t);break;case W.XMP:Ww(e,t);break;case W.SVG:Qw(e,t);break;case W.HTML:Sw(e,t);break;case W.BASE:case W.LINK:case W.META:case W.STYLE:case W.TITLE:case W.SCRIPT:case W.BGSOUND:case W.BASEFONT:case W.TEMPLATE:lw(e,t);break;case W.BODY:Cw(e,t);break;case W.FORM:Ow(e,t);break;case W.NOBR:Pw(e,t);break;case W.MATH:Zw(e,t);break;case W.TABLE:Iw(e,t);break;case W.INPUT:zw(e,t);break;case W.PARAM:case W.TRACK:case W.SOURCE:Bw(e,t);break;case W.IMAGE:Hw(e,t);break;case W.BUTTON:jw(e,t);break;case W.APPLET:case W.OBJECT:case W.MARQUEE:Fw(e,t);break;case W.IFRAME:Gw(e,t);break;case W.SELECT:qw(e,t);break;case W.OPTION:case W.OPTGROUP:Jw(e,t);break;case W.NOEMBED:case W.NOFRAMES:Kw(e,t);break;case W.FRAMESET:ww(e,t);break;case W.TEXTAREA:Uw(e,t);break;case W.NOSCRIPT:e.options.scriptingEnabled?Kw(e,t):$w(e,t);break;case W.PLAINTEXT:Aw(e,t);break;case W.COL:case W.TH:case W.TD:case W.TR:case W.HEAD:case W.FRAME:case W.TBODY:case W.TFOOT:case W.THEAD:case W.CAPTION:case W.COLGROUP:break;default:$w(e,t)}}function tT(e,t){if(e.openElements.hasInScope(W.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function nT(e,t){e.openElements.hasInScope(W.BODY)&&(e.insertionMode=q.AFTER_BODY,ZT(e,t))}function rT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iT(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(W.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(W.FORM):n&&e.openElements.remove(n))}function aT(e){e.openElements.hasInButtonScope(W.P)||e._insertFakeElement(U.P,W.P),e._closePElement()}function oT(e){e.openElements.hasInListItemScope(W.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(W.LI),e.openElements.popUntilTagNamePopped(W.LI))}function sT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function cT(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lT(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function uT(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(U.BR,W.BR),e.openElements.pop(),e.framesetOk=!1}function dT(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==W.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function fT(e,t){switch(t.tagID){case W.A:case W.B:case W.I:case W.S:case W.U:case W.EM:case W.TT:case W.BIG:case W.CODE:case W.FONT:case W.NOBR:case W.SMALL:case W.STRIKE:case W.STRONG:XC(e,t);break;case W.P:aT(e);break;case W.DL:case W.UL:case W.OL:case W.DIR:case W.DIV:case W.NAV:case W.PRE:case W.MAIN:case W.MENU:case W.ASIDE:case W.BUTTON:case W.CENTER:case W.FIGURE:case W.FOOTER:case W.HEADER:case W.HGROUP:case W.DIALOG:case W.ADDRESS:case W.ARTICLE:case W.DETAILS:case W.SEARCH:case W.SECTION:case W.SUMMARY:case W.LISTING:case W.FIELDSET:case W.BLOCKQUOTE:case W.FIGCAPTION:rT(e,t);break;case W.LI:oT(e);break;case W.DD:case W.DT:sT(e,t);break;case W.H1:case W.H2:case W.H3:case W.H4:case W.H5:case W.H6:cT(e);break;case W.BR:uT(e);break;case W.BODY:tT(e,t);break;case W.HTML:nT(e,t);break;case W.FORM:iT(e);break;case W.APPLET:case W.OBJECT:case W.MARQUEE:lT(e,t);break;case W.TEMPLATE:dw(e,t);break;default:dT(e,t)}}function pT(e,t){e.tmplInsertionModeStack.length>0?YT(e,t):ew(e,t)}function mT(e,t){var n;t.tagID===W.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hT(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function gT(e,t){if(e.openElements.currentTagId!==void 0&&VC.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case hS.CHARACTER:kT(e,t);break;case hS.WHITESPACE_CHARACTER:OT(e,t);break}else DT(e,t)}function _T(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_CAPTION}function vT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function yT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.COLGROUP,W.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,PT(e,t)}function bT(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_TABLE_BODY}function xT(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.TBODY,W.TBODY),e.insertionMode=q.IN_TABLE_BODY,LT(e,t)}function ST(e,t){e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function CT(e,t){Rw(t)?e._appendElement(t,H.HTML):DT(e,t),t.ackSelfClosing=!0}function wT(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,H.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function TT(e,t){switch(t.tagID){case W.TD:case W.TH:case W.TR:xT(e,t);break;case W.STYLE:case W.SCRIPT:case W.TEMPLATE:lw(e,t);break;case W.COL:yT(e,t);break;case W.FORM:wT(e,t);break;case W.TABLE:ST(e,t);break;case W.TBODY:case W.TFOOT:case W.THEAD:bT(e,t);break;case W.INPUT:CT(e,t);break;case W.CAPTION:_T(e,t);break;case W.COLGROUP:vT(e,t);break;default:DT(e,t)}}function ET(e,t){switch(t.tagID){case W.TABLE:e.openElements.hasInTableScope(W.TABLE)&&(e.openElements.popUntilTagNamePopped(W.TABLE),e._resetInsertionMode());break;case W.TEMPLATE:dw(e,t);break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:DT(e,t)}}function DT(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,yw(e,t),e.fosterParentingEnabled=n}function OT(e,t){e.pendingCharacterTokens.push(t)}function kT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function AT(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)DT(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var jT=new Set([W.CAPTION,W.COL,W.COLGROUP,W.TBODY,W.TD,W.TFOOT,W.TH,W.THEAD,W.TR]);function MT(e,t){let n=t.tagID;jT.has(n)?e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,TT(e,t)):eT(e,t)}function NT(e,t){let n=t.tagID;switch(n){case W.CAPTION:case W.TABLE:e.openElements.hasInTableScope(W.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(W.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,n===W.TABLE&&ET(e,t));break;case W.BODY:case W.COL:case W.COLGROUP:case W.HTML:case W.TBODY:case W.TD:case W.TFOOT:case W.TH:case W.THEAD:case W.TR:break;default:fT(e,t)}}function PT(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.COL:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.TEMPLATE:lw(e,t);break;default:IT(e,t)}}function FT(e,t){switch(t.tagID){case W.COLGROUP:e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break;case W.TEMPLATE:dw(e,t);break;case W.COL:break;default:IT(e,t)}}function IT(e,t){e.openElements.currentTagId===W.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function LT(e,t){switch(t.tagID){case W.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_ROW;break;case W.TH:case W.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(U.TR,W.TR),e.insertionMode=q.IN_ROW,zT(e,t);break;case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,TT(e,t));break;default:TT(e,t)}}function RT(e,t){let n=t.tagID;switch(t.tagID){case W.TBODY:case W.TFOOT:case W.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE);break;case W.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,ET(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:case W.TR:break;default:ET(e,t)}}function zT(e,t){switch(t.tagID){case W.TH:case W.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,H.HTML),e.insertionMode=q.IN_CELL,e.activeFormattingElements.insertMarker();break;case W.CAPTION:case W.COL:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,LT(e,t));break;default:TT(e,t)}}function BT(e,t){switch(t.tagID){case W.TR:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break;case W.TABLE:e.openElements.hasInTableScope(W.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,RT(e,t));break;case W.TBODY:case W.TFOOT:case W.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(W.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,RT(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:case W.TD:case W.TH:break;default:ET(e,t)}}function VT(e,t){let n=t.tagID;jT.has(n)?(e.openElements.hasInTableScope(W.TD)||e.openElements.hasInTableScope(W.TH))&&(e._closeTableCell(),zT(e,t)):eT(e,t)}function HT(e,t){let n=t.tagID;switch(n){case W.TD:case W.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_ROW);break;case W.TABLE:case W.TBODY:case W.TFOOT:case W.THEAD:case W.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),BT(e,t));break;case W.BODY:case W.CAPTION:case W.COL:case W.COLGROUP:case W.HTML:break;default:fT(e,t)}}function UT(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.OPTION:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e._insertElement(t,H.HTML);break;case W.OPTGROUP:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._insertElement(t,H.HTML);break;case W.HR:e.openElements.currentTagId===W.OPTION&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop(),e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.INPUT:case W.KEYGEN:case W.TEXTAREA:case W.SELECT:e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),t.tagID!==W.SELECT&&e._processStartTag(t));break;case W.SCRIPT:case W.TEMPLATE:lw(e,t);break;default:}}function WT(e,t){switch(t.tagID){case W.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===W.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===W.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===W.OPTGROUP&&e.openElements.pop();break;case W.OPTION:e.openElements.currentTagId===W.OPTION&&e.openElements.pop();break;case W.SELECT:e.openElements.hasInSelectScope(W.SELECT)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode());break;case W.TEMPLATE:dw(e,t);break;default:}}function GT(e,t){let n=t.tagID;n===W.CAPTION||n===W.TABLE||n===W.TBODY||n===W.TFOOT||n===W.THEAD||n===W.TR||n===W.TD||n===W.TH?(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e._processStartTag(t)):UT(e,t)}function KT(e,t){let n=t.tagID;n===W.CAPTION||n===W.TABLE||n===W.TBODY||n===W.TFOOT||n===W.THEAD||n===W.TR||n===W.TD||n===W.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(W.SELECT),e._resetInsertionMode(),e.onEndTag(t)):WT(e,t)}function qT(e,t){switch(t.tagID){case W.BASE:case W.BASEFONT:case W.BGSOUND:case W.LINK:case W.META:case W.NOFRAMES:case W.SCRIPT:case W.STYLE:case W.TEMPLATE:case W.TITLE:lw(e,t);break;case W.CAPTION:case W.COLGROUP:case W.TBODY:case W.TFOOT:case W.THEAD:e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,TT(e,t);break;case W.COL:e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,PT(e,t);break;case W.TR:e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,LT(e,t);break;case W.TD:case W.TH:e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,zT(e,t);break;default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,eT(e,t)}}function JT(e,t){t.tagID===W.TEMPLATE&&dw(e,t)}function YT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(W.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ew(e,t)}function XT(e,t){t.tagID===W.HTML?eT(e,t):QT(e,t)}function ZT(e,t){if(t.tagID===W.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===W.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else QT(e,t)}function QT(e,t){e.insertionMode=q.IN_BODY,yw(e,t)}function $T(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.FRAMESET:e._insertElement(t,H.HTML);break;case W.FRAME:e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break;case W.NOFRAMES:lw(e,t);break;default:}}function eE(e,t){t.tagID===W.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==W.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function tE(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.NOFRAMES:lw(e,t);break;default:}}function nE(e,t){t.tagID===W.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function rE(e,t){t.tagID===W.HTML?eT(e,t):iE(e,t)}function iE(e,t){e.insertionMode=q.IN_BODY,yw(e,t)}function aE(e,t){switch(t.tagID){case W.HTML:eT(e,t);break;case W.NOFRAMES:lw(e,t);break;default:}}function oE(e,t){t.chars=`�`,e._insertCharacters(t)}function sE(e,t){e._insertCharacters(t),e.framesetOk=!1}function cE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==H.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function lE(e,t){if(kC(t))cE(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===H.MATHML?AC(t):r===H.SVG&&(NC(t),jC(t)),MC(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function uE(e,t){if(t.tagID===W.P||t.tagID===W.BR){cE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===H.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([U.AREA,U.BASE,U.BASEFONT,U.BGSOUND,U.BR,U.COL,U.EMBED,U.FRAME,U.HR,U.IMG,U.INPUT,U.KEYGEN,U.LINK,U.META,U.PARAM,U.SOURCE,U.TRACK,U.WBR]);function dE(e,t){return UC.parse(e,t)}function fE(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=UC.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var pE={basename:mE,dirname:hE,extname:gE,join:_E,sep:`/`};function mE(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);bE(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function hE(e){if(bE(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function gE(e){bE(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function _E(...e){let t=-1,n;for(;++t<e.length;)bE(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:vE(n)}function vE(e){bE(e);let t=e.codePointAt(0)===47,n=yE(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function yE(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function bE(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var xE={cwd:SE};function SE(){return`/`}function CE(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function wE(e){if(typeof e==`string`)e=new URL(e);else if(!CE(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return TE(e)}function TE(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var EE=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],DE=class{constructor(e){let t;t=e?CE(e)?{path:e}:typeof e==`string`||jE(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:xE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<EE.length;){let e=EE[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)EE.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?pE.basename(this.path):void 0}set basename(e){kE(e,`basename`),OE(e,`basename`),this.path=pE.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?pE.dirname(this.path):void 0}set dirname(e){AE(this.basename,`dirname`),this.path=pE.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?pE.extname(this.path):void 0}set extname(e){if(OE(e,`extname`),AE(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=pE.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){CE(e)&&(e=wE(e)),kE(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?pE.basename(this.path,this.extname):void 0}set stem(e){kE(e,`stem`),OE(e,`stem`),this.path=pE.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new bm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function OE(e,t){if(e&&e.includes(pE.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+pE.sep+"`")}function kE(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function AE(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function jE(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ME={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},NE=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,PE=/-[a-z]/g,FE=/%c(?:([-+])(\d+))?/g,IE=/%x/g,LE={2:!0,1:!1,0:null},RE={};function zE(e,t){let n=t||RE,r=n.onerror,i=e instanceof DE?e:new DE(e),a=n.fragment?fE:dE,o=String(i);return Qx(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=BE(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=ME[a],o=new bm(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=LE[c],o.note=l(n.description),o.url=n.url===!1?void 0:NE+t,r(o)}function l(t){return t.replace(FE,n).replace(IE,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return HE(o.charAt(e.startOffset+i))}function r(){return UE(o.charCodeAt(e.startOffset))}}}}function BE(e){return e.replace(PE,VE)}function VE(e){return e.charAt(1).toUpperCase()}function HE(e){return e==="`"?"` ` `":e}function UE(e){return`0x`+e.toString(16).toUpperCase()}function WE(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return zE(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var GE=typeof self==`object`?self:globalThis,KE=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new GE[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new GE[a](o),i)};return r},qE=e=>KE(new Map,e)(0),JE=``,{toString:YE}={},{keys:XE}=Object,ZE=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=YE.call(e).slice(8,-1);switch(n){case`Array`:return[1,JE];case`Object`:return[2,JE];case`Date`:return[3,JE];case`RegExp`:return[4,JE];case`Map`:return[5,JE];case`Set`:return[6,JE];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},QE=([e,t])=>e===0&&(t===`function`||t===`symbol`),$E=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=ZE(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of XE(r))(e||!QE(ZE(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(QE(ZE(n))||QE(ZE(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!QE(ZE(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},eD=(e,{json:t,lossy:n}={})=>{let r=[];return $E(!(t||n),!!t,new Map,r)(e),r},tD=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?qE(eD(e,t)):structuredClone(e):(e,t)=>qE(eD(e,t)),nD=(function(e,t,n,r,i){let a=rD(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return cD(e)?a.call(i,e,n,r):!1}),rD=(function(e){if(e==null)return sD;if(typeof e==`string`)return aD(e);if(typeof e==`object`)return iD(e);if(typeof e==`function`)return oD(e);throw Error("Expected function, string, or array as `test`")});function iD(e){let t=[],n=-1;for(;++n<e.length;)t[n]=rD(e[n]);return oD(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function aD(e){return oD(t);function t(t){return t.tagName===e}}function oD(e){return t;function t(t,n,r){return!!(cD(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function sD(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function cD(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var lD=rD(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),uD=/[ \t\n\f\r]/g;function dD(e){return typeof e==`object`?e.type===`text`?fD(e.value):!1:fD(e)}function fD(e){return e.replace(uD,``)===``}var pD=(function(e,t,n,r,i){let a=mD(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!pD(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return bD(e)?a.call(i,e,n,r):!1}),mD=(function(e){if(e==null)return yD;if(typeof e==`function`)return vD(e);if(typeof e==`object`)return Array.isArray(e)?hD(e):gD(e);if(typeof e==`string`)return _D(e);throw Error(`Expected function, string, or object as test`)});function hD(e){let t=[],n=-1;for(;++n<e.length;)t[n]=mD(e[n]);return vD(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function gD(e){let t=e;return vD(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function _D(e){return vD(t);function t(t){return t&&t.type===e}}function vD(e){return t;function t(t,n,r){return!!(bD(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function yD(){return!0}function bD(e){return typeof e==`object`&&!!e&&`type`in e}var xD=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),SD=[`button`,`input`,`select`,`textarea`],CD=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],wD={},TD=mD([`comment`,`doctype`]);function ED(e,t){DD(e,{collapse:RD((t||wD).newlines?ID:LD),whitespace:`normal`})}function DD(e,t){if(`children`in e){let n={...t};return(e.type===`root`||ND(e))&&(n.before=!0,n.after=!0),n.whitespace=zD(e,t),kD(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return OD(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:TD(e),stripAtStart:!1,remove:!1}}function OD(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&FD(n.charAt(0))&&i++,i!==a&&FD(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function kD(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=DD(i[o],{...t,after:AD(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),MD(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function AD(e,t,n){for(;++t<e.length;){let n=e[t],r=jD(n);if(r===void 0&&`children`in n&&!PD(n)&&(r=AD(n.children,-1)),typeof r==`boolean`)return r}return n}function jD(e){if(e.type===`element`){if(MD(e))return!1;if(ND(e))return!0}else if(e.type===`text`){if(!dD(e))return!1}else if(!TD(e))return!1}function MD(e){return lD(e)||nD(e,SD)}function ND(e){return nD(e,xD)}function PD(e){return!!(e.type===`element`&&e.properties.hidden)||TD(e)||nD(e,CD)}function FD(e){return e===` `||e===`
148
+ `}function ID(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:` `}function LD(){return` `}function RD(e){return t;function t(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}function zD(e,t){if(`tagName`in e&&e.properties)switch(e.tagName){case`listing`:case`plaintext`:case`script`:case`style`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return e.properties.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return e.properties.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}return t.whitespace}function BD(e){return function(t){ED(t,e)}}function VD(e){return e}var HD=[],UD=`skip`;function WD(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=mD(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+VD(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=HD,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=GD(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function GD(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?HD:[e]}function KD(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),WD(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var qD=YD(`end`),JD=YD(`start`);function YD(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function XD(e){let t=JD(e),n=qD(e);if(t&&n)return{start:t,end:n}}function ZD(e,t){let n=t.properties||{},r=e.all(t),i={type:`link`,url:e.resolve(String(n.href||``)||null),title:n.title?String(n.title):null,children:r};return e.patch(t,i),i}function QD(e,t){e.baseFound||=(e.frozenBaseUrl=String(t.properties&&t.properties.href||``)||void 0,!0)}function $D(e,t){let n={type:`blockquote`,children:e.toFlow(e.all(t))};return e.patch(t,n),n}function eO(e,t){let n={type:`break`};return e.patch(t,n),n}var tO=(function(e,t,n){let r=mD(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),nO=/\n/g,rO=/[\t ]+/g,iO=rD(`br`),aO=rD(vO),oO=rD(`p`),sO=rD(`tr`),cO=rD([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,_O,yO]),lO=rD(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function uO(e,t){let n=t||{},r=`children`in e?e.children:[],i=lO(e),a=gO(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...pO(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...dO(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?iO(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
149
+ `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function dO(e,t,n){return e.type===`element`?fO(e,t,n):e.type===`text`?n.whitespace===`normal`?pO(e,n):mO(e):[]}function fO(e,t,n){let r=gO(e,n),i=e.children||[],a=-1,o=[];if(cO(e))return o;let s,c;for(iO(e)||sO(e)&&tO(t,e,sO)?c=`
150
+ `:oO(e)?(s=2,c=2):lO(e)&&(s=1,c=1);++a<i.length;)o=o.concat(dO(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?iO(i[a+1]):c}));return aO(e)&&tO(t,e,aO)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function pO(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){nO.lastIndex=a;let e=nO.exec(n),i=e&&`index`in e?e.index:n.length;r.push(hO(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function mO(e){return[String(e.value)]}function hO(e,t,n){let r=[],i=0,a;for(;i<e.length;){rO.lastIndex=i;let n=rO.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function gO(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function _O(e){return!!(e.properties||{}).hidden}function vO(e){return e.tagName===`td`||e.tagName===`th`}function yO(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function bO(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var xO=`language-`;function SO(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===xO){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:bO(uO(t))};return e.patch(t,o),o}function CO(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function wO(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function TO(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function EO(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...DO(e,r[i].titles),...DO(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:TO(o),children:o};return e.patch(t,n),n}}function DO(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,OO);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:TO(r),children:r}]}function OO(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function kO(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function AO(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function jO(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:AO(e.all(t))};return e.patch(t,n),n}function MO(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function NO(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function PO(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function FO(e,t){let n={type:`inlineCode`,value:uO(t)};return e.patch(t,n),n}function IO(e,t){let n=[],r=[],i=t||e.properties||{},a=LO(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=uO(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function LO(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...LO(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var RO=`[x]`,zO=`[ ]`;function BO(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||RO:e.options.unchecked||zO};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=IO(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var VO={}.hasOwnProperty;function HO(e,t){let n=e.type===`element`&&VO.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var UO=new Set([`pingback`,`prefetch`,`stylesheet`]);function WO(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!UO.has(String(t[n])))return!1;return!0}var GO=rD(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),KO=rD(`meta`);function qO(e){return!!(e.type===`text`||GO(e)||lD(e)||WO(e)||KO(e)&&HO(e,`itemProp`))}function JO(e,t){let{rest:n,checkbox:r}=XO(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:YO(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function YO(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if(qO(r))continue;if(r.tagName===`p`||n||YO(r))return!0;n=!0}}return!1}function XO(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=XO(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function ZO(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),QO),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:TO(r),children:r};return e.patch(t,a),a}function QO(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var $O={};function ek(e,t){let n=t||$O;return tk(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function tk(e,t,n){if(rk(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 nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):``}function nk(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=tk(e[i],t,n);return r.join(``)}function rk(e){return!!(e&&typeof e==`object`)}var ik=mD([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ak(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!uk(n)||`children`in n&&ak(n.children))return!0}return!1}function ok(e){return ck(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?dD(e.value):!1})?[]:[{type:`paragraph`,children:AO(e)}]}}function sk(e){return ck(e.children,t,n);function t(t){let n=dk(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=dk(e),r=dk(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function ck(e,t,n){let r=lk(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];uk(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function lk(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&ak(r.children)?t.push(...sk(r)):t.push(r)}return t}function uk(e){let t=e.data&&e.data.hName;return t?qO({type:`element`,tagName:t,properties:{},children:[]}):ik(e)}function dk(e){return tD({...e,children:[]})}function fk(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(KD({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||ak(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:ek(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function pk(e,t){let n=AO(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var mk=[`"`];function hk(e,t){let n=e.options.quotes||mk;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function gk(e,t){let n=e.all(t);(e.options.document||ak(n))&&(n=ok(n));let r={type:`root`,children:n};return e.patch(t,r),r}function _k(e,t){let n=IO(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function vk(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function yk(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function bk(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),xk)};return e.patch(t,n),n}function xk(){return{type:`tableCell`,children:[]}}function Sk(e,t){if(e.inTable){let n={type:`text`,value:uO(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=Ck(t),i=e.toSpecificContent(e.all(t),Tk);r&&i.unshift(Tk());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,wk)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function Ck(e){let t={align:[null],headless:!0},n=0,r=0;return KD(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return UD;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function wk(){return{type:`tableCell`,children:[]}}function Tk(){return{type:`tableRow`,children:[]}}function Ek(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function Dk(e,t){let n={type:`text`,value:uO(t)};return e.patch(t,n),n}function Ok(e,t){let n={type:`text`,value:`​`};return e.patch(t,n),n}var kk={comment:CO,doctype:Y,root:gk,text:Ek},Ak={applet:Y,area:Y,basefont:Y,bgsound:Y,caption:Y,col:Y,colgroup:Y,command:Y,content:Y,datalist:Y,dialog:Y,element:Y,embed:Y,frame:Y,frameset:Y,isindex:Y,keygen:Y,link:Y,math:Y,menu:Y,menuitem:Y,meta:Y,nextid:Y,noembed:Y,noframes:Y,optgroup:Y,option:Y,param:Y,script:Y,shadow:Y,source:Y,spacer:Y,style:Y,svg:Y,template:Y,title:Y,track:Y,abbr:J,acronym:J,bdi:J,bdo:J,big:J,blink:J,button:J,canvas:J,cite:J,data:J,details:J,dfn:J,font:J,ins:J,label:J,map:J,marquee:J,meter:J,nobr:J,noscript:J,object:J,output:J,progress:J,rb:J,rbc:J,rp:J,rt:J,rtc:J,ruby:J,slot:J,small:J,span:J,sup:J,sub:J,tbody:J,tfoot:J,thead:J,time:J,address:jk,article:jk,aside:jk,body:jk,center:jk,div:jk,fieldset:jk,figcaption:jk,figure:jk,form:jk,footer:jk,header:jk,hgroup:jk,html:jk,legend:jk,main:jk,multicol:jk,nav:jk,picture:jk,section:jk,a:ZD,audio:fk,b:vk,base:QD,blockquote:$D,br:eO,code:FO,dir:ZO,dl:EO,dt:JO,dd:JO,del:wO,em:kO,h1:jO,h2:jO,h3:jO,h4:jO,h5:jO,h6:jO,hr:MO,i:kO,iframe:NO,img:PO,image:PO,input:BO,kbd:FO,li:JO,listing:SO,mark:kO,ol:ZO,p:pk,plaintext:SO,pre:SO,q:hk,s:wO,samp:FO,select:_k,strike:wO,strong:vk,summary:pk,table:Sk,td:yk,textarea:Dk,th:yk,tr:bk,tt:FO,u:kO,ul:ZO,var:FO,video:fk,wbr:Ok,xmp:SO};function J(e,t){return e.all(t)}function jk(e,t){return e.toFlow(e.all(t))}function Y(){}var Mk={}.hasOwnProperty;function Nk(e){return{all:Pk,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...Ak,...e.handlers},inTable:!1,nodeHandlers:{...kk,...e.nodeHandlers},one:Fk,options:e,patch:Ik,qNesting:0,resolve:Lk,toFlow:Rk,toSpecificContent:zk}}function Pk(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function Fk(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(Mk.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(Mk.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function Ik(e,t){e.position&&(t.position=XD(e))}function Lk(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function Rk(e){return ok(e)}function zk(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var Bk={};function Vk(e,t){let n=tD(e),r=t||Bk,i=BD({newlines:r.newlines===!0}),a=Nk(r),o;i(n),KD(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},KD(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var Hk={document:!0};function Uk(e,t){return e&&`run`in e?async function(n,r){let i=Vk(n,{...Hk,...t});await e.run(i,r)}:function(t){return Vk(t,{...Hk,...e})}}function Wk(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var Gk=eA(/[A-Za-z]/),Kk=eA(/[\dA-Za-z]/),qk=eA(/[#-'*+\--9=?A-Z^-~]/);function Jk(e){return e!==null&&(e<32||e===127)}var Yk=eA(/\d/),Xk=eA(/[\dA-Fa-f]/),Zk=eA(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Z(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var Qk=eA(/\p{P}|\p{S}/u),$k=eA(/\s/);function eA(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function tA(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function nA(e,t,n){let r=mD((n||{}).ignore||[]),i=rA(t),a=-1;for(;++a<i.length;)WD(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function rA(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([iA(e[0]),aA(e[1])])}return t}function iA(e){return typeof e==`string`?new RegExp(tA(e),`g`):e}function aA(e){return typeof e==`function`?e:function(){return e}}var oA=`phrasing`,sA=[`autolink`,`link`,`image`,`label`];function cA(){return{transforms:[gA],enter:{literalAutolink:uA,literalAutolinkEmail:dA,literalAutolinkHttp:dA,literalAutolinkWww:dA},exit:{literalAutolink:hA,literalAutolinkEmail:mA,literalAutolinkHttp:fA,literalAutolinkWww:pA}}}function lA(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:oA,notInConstruct:sA},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:oA,notInConstruct:sA},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:oA,notInConstruct:sA}]}}function uA(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function dA(e){this.config.enter.autolinkProtocol.call(this,e)}function fA(e){this.config.exit.autolinkProtocol.call(this,e)}function pA(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function mA(e){this.config.exit.autolinkEmail.call(this,e)}function hA(e){this.exit(e)}function gA(e){nA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,_A],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,vA]],{ignore:[`link`,`linkReference`]})}function _A(e,t,n,r,i){let a=``;if(!xA(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!yA(n)))return!1;let o=bA(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function vA(e,t,n,r){return!xA(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function yA(e){let 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 bA(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Wk(e,`(`),a=Wk(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function xA(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||$k(n)||Qk(n))&&(!t||n!==47)}function SA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}MA.peek=jA;function CA(){this.buffer()}function wA(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function TA(){this.buffer()}function EA(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function DA(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=SA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function OA(e){this.exit(e)}function kA(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=SA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function AA(e){this.exit(e)}function jA(){return`[`}function MA(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function NA(){return{enter:{gfmFootnoteCallString:CA,gfmFootnoteCall:wA,gfmFootnoteDefinitionLabelString:TA,gfmFootnoteDefinition:EA},exit:{gfmFootnoteCallString:DA,gfmFootnoteCall:OA,gfmFootnoteDefinitionLabelString:kA,gfmFootnoteDefinition:AA}}}function PA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:MA},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
151
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?IA:FA))),s(),o}}function FA(e,t,n){return t===0?e:IA(e,t,n)}function IA(e,t,n){return(n?``:` `)+e}var LA=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];HA.peek=UA;function RA(){return{canContainEols:[`delete`],enter:{strikethrough:BA},exit:{strikethrough:VA}}}function zA(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:LA}],handlers:{delete:HA}}}function BA(e){this.enter({type:`delete`,children:[]},e)}function VA(e){this.exit(e)}function HA(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function UA(){return`~`}function WA(e){return e.length}function GA(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||WA,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=KA(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=qA(r[d]);else{let e=qA(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
152
+ `)}function KA(e){return e==null?``:String(e)}function qA(e){let 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}var JA={}.hasOwnProperty;function YA(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&JA.call(t,e)){let n=String(t[e]);i=JA.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var XA={}.hasOwnProperty;function ZA(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)ZA(e,t.extensions[n]);for(r in t)if(XA.call(t,r))switch(r){case`extensions`:break;case`unsafe`:QA(e[r],t[r]);break;case`join`:QA(e[r],t[r]);break;case`handlers`:$A(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function QA(e,t){t&&e.push(...t)}function $A(e,t){t&&Object.assign(e,t)}function ej(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),tj);return i(),o}function tj(e,t,n){return`>`+(n?``:` `)+e}function nj(e,t){return rj(e,t.inConstruct,!0)&&!rj(e,t.notInConstruct,!1)}function rj(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 ij(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
153
+ `&&nj(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
154
+ `}function aj(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function oj(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 sj(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cj(e,t,n,r){let i=sj(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(oj(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,lj);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(aj(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
155
155
  `,encode:["`"],...s.current()})),t()}return u+=s.move(`
156
156
  `),a&&(u+=s.move(a+`
157
- `)),u+=s.move(c),l(),u}function zj(e,t,n){return(n?``:` `)+e}function Bj(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Vj(e,t,n,r){let i=Bj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
158
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Hj(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Uj(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Wj(e){if(e===null||Z(e)||kA(e))return 1;if(OA(e))return 2}function Gj(e,t,n){let r=Wj(e),i=Wj(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Kj.peek=qj;function Kj(e,t,n,r){let i=Hj(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Gj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Uj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Gj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Uj(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function qj(e,t,n){return n.options.emphasis||`*`}function Jj(e,t){let n=!1;return SO(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ak(e)&&(t.options.setext||n))}function Yj(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Jj(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
157
+ `)),u+=s.move(c),l(),u}function lj(e,t,n){return(n?``:` `)+e}function uj(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dj(e,t,n,r){let i=uj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
158
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function fj(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function pj(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function mj(e){if(e===null||Z(e)||$k(e))return 1;if(Qk(e))return 2}function hj(e,t,n){let r=mj(e),i=mj(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gj.peek=_j;function gj(e,t,n,r){let i=fj(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=hj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=pj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=hj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+pj(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function _j(e,t,n){return n.options.emphasis||`*`}function vj(e,t){let n=!1;return KD(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ek(e)&&(t.options.setext||n))}function yj(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(vj(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
159
159
  `,after:`
160
160
  `});return r(),t(),o+`
161
161
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
162
162
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
163
- `,...a.current()});return/^[\t ]/.test(l)&&(l=Uj(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Xj.peek=Zj;function Xj(e){return e.value||``}function Zj(){return`<`}Qj.peek=$j;function Qj(e,t,n,r){let i=Bj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function $j(){return`!`}eM.peek=tM;function eM(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function tM(){return`!`}nM.peek=rM;function nM(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function rM(){return"`"}function iM(e,t){let n=Ak(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))}aM.peek=oM;function aM(e,t,n,r){let i=Bj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(iM(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function oM(e,t,n){return iM(e,n)?`<`:`[`}sM.peek=cM;function sM(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function cM(){return`[`}function lM(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uM(e){let t=lM(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function dM(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function fM(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function pM(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?dM(n):lM(n),s=e.ordered?o===`.`?`)`:`.`:uM(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),fM(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function mM(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hM(e,t,n,r){let i=mM(n),a=n.bulletCurrent||lM(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function gM(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function _M(e,t,n,r){return(e.children.some(function(e){return Pk(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vM(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yM.peek=bM;function yM(e,t,n,r){let i=vM(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Gj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Uj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Gj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Uj(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function bM(e,t,n){return n.options.strong||`*`}function xM(e,t,n,r){return n.safe(e.value,r)}function SM(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function CM(e,t,n){let r=(fM(n)+(n.options.ruleSpaces?` `:``)).repeat(SM(n));return n.options.ruleSpaces?r.slice(0,-1):r}var wM={blockquote:Aj,break:Pj,code:Rj,definition:Vj,emphasis:Kj,hardBreak:Pj,heading:Yj,html:Xj,image:Qj,imageReference:eM,inlineCode:nM,link:aM,linkReference:sM,list:pM,listItem:hM,paragraph:gM,root:_M,strong:yM,text:xM,thematicBreak:CM},TM=[EM];function EM(e,t,n,r){if(t.type===`code`&&Ij(t,r)&&(e.type===`list`||e.type===t.type&&Ij(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&Jj(t,r))?void 0:+!!n.spread}var DM=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],OM=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
164
- `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:DM},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
165
- ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:DM},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
166
- *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:DM},{atBreak:!0,character:`+`,after:`(?:[ \r
163
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=pj(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}bj.peek=xj;function bj(e){return e.value||``}function xj(){return`<`}Sj.peek=Cj;function Sj(e,t,n,r){let i=uj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Cj(){return`!`}wj.peek=Tj;function wj(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tj(){return`!`}Ej.peek=Dj;function Ej(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Dj(){return"`"}function Oj(e,t){let n=ek(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))}kj.peek=Aj;function kj(e,t,n,r){let i=uj(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Oj(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Aj(e,t,n){return Oj(e,n)?`<`:`[`}jj.peek=Mj;function jj(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Mj(){return`[`}function Nj(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Pj(e){let t=Nj(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Fj(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ij(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Lj(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Fj(n):Nj(n),s=e.ordered?o===`.`?`)`:`.`:Pj(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),Ij(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Rj(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zj(e,t,n,r){let i=Rj(n),a=n.bulletCurrent||Nj(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Bj(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Vj(e,t,n,r){return(e.children.some(function(e){return ik(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Hj(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Uj.peek=Wj;function Uj(e,t,n,r){let i=Hj(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=hj(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=pj(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=hj(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+pj(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Wj(e,t,n){return n.options.strong||`*`}function Gj(e,t,n,r){return n.safe(e.value,r)}function Kj(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function qj(e,t,n){let r=(Ij(n)+(n.options.ruleSpaces?` `:``)).repeat(Kj(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Jj={blockquote:ej,break:ij,code:cj,definition:dj,emphasis:gj,hardBreak:ij,heading:yj,html:bj,image:Sj,imageReference:wj,inlineCode:Ej,link:kj,linkReference:jj,list:Lj,listItem:zj,paragraph:Bj,root:Vj,strong:Uj,text:Gj,thematicBreak:qj},Yj=[Xj];function Xj(e,t,n,r){if(t.type===`code`&&oj(t,r)&&(e.type===`list`||e.type===t.type&&oj(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&vj(t,r))?void 0:+!!n.spread}var Zj=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],Qj=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
164
+ `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:Zj},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
165
+ ]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:Zj},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
166
+ *])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:Zj},{atBreak:!0,character:`+`,after:`(?:[ \r
167
167
  ])`},{atBreak:!0,character:`-`,after:`(?:[ \r
168
168
  -])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
169
- ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:DM},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:DM},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:DM},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:DM},{atBreak:!0,character:`~`}],kM=document.createElement(`i`);function AM(e){let t=`&`+e+`;`;kM.innerHTML=t;let n=kM.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function jM(e,t){let 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)}var MM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NM(e){return e.replace(MM,PM)}function PM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return jM(n.slice(t?2:1),t?16:10)}return AM(n)||e}function FM(e){return e.label||!e.identifier?e.label||``:NM(e.identifier)}function IM(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function LM(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
170
- `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=Uj(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Uj(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function RM(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
169
+ ]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:Zj},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:Zj},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:Zj},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:Zj},{atBreak:!0,character:`~`}],$j=document.createElement(`i`);function eM(e){let t=`&`+e+`;`;$j.innerHTML=t;let n=$j.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function tM(e,t){let 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)}var nM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rM(e){return e.replace(nM,iM)}function iM(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return tM(n.slice(t?2:1),t?16:10)}return eM(n)||e}function aM(e){return e.label||!e.identifier?e.label||``:rM(e.identifier)}function oM(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function sM(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
170
+ `)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=pj(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+pj(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function cM(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
171
171
  `,after:`
172
- `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(zM(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function zM(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
172
+ `,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(lM(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function lM(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
173
173
  `.repeat(1+a);if(a===!1)return`
174
174
 
175
175
  <!---->
176
176
 
177
177
  `}return`
178
178
 
179
- `}var BM=/\r?\n|\r/g;function VM(e,t){let n=[],r=0,i=0,a;for(;a=BM.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function HM(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!Mj(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(UM);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(WM(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(Uj(r.charCodeAt(e))),c++))}return a.push(WM(r.slice(c,l),n.after)),a.join(``)}function UM(e,t){return e-t}function WM(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function GM(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function KM(e,t){let n=t||{},r={associationId:FM,containerPhrasing:XM,containerFlow:ZM,createTracker:GM,compilePattern:IM,enter:a,handlers:{...wM},handle:void 0,indentLines:VM,indexStack:[],join:[...TM],options:{},safe:QM,stack:[],unsafe:[...OM]};Dj(r,n),r.options.tightDefinitions&&r.join.push(YM),r.handle=Tj(`type`,{invalid:qM,unknown:JM,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
179
+ `}var uM=/\r?\n|\r/g;function dM(e,t){let n=[],r=0,i=0,a;for(;a=uM.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function fM(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!nj(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(pM);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(mM(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(pj(r.charCodeAt(e))),c++))}return a.push(mM(r.slice(c,l),n.after)),a.join(``)}function pM(e,t){return e-t}function mM(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function hM(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function gM(e,t){let n=t||{},r={associationId:aM,containerPhrasing:bM,containerFlow:xM,createTracker:hM,compilePattern:oM,enter:a,handlers:{...Jj},handle:void 0,indentLines:dM,indexStack:[],join:[...Yj],options:{},safe:SM,stack:[],unsafe:[...Qj]};ZA(r,n),r.options.tightDefinitions&&r.join.push(yM),r.handle=YA(`type`,{invalid:_M,unknown:vM,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
180
180
  `,after:`
181
181
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
182
- `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function qM(e){throw Error("Cannot handle value `"+e+"`, expected node")}function JM(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function YM(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function XM(e,t){return LM(e,this,t)}function ZM(e,t){return RM(e,this,t)}function QM(e,t){return HM(this,e,t)}function $M(){return{enter:{table:eN,tableData:iN,tableHeader:iN,tableRow:nN},exit:{codeText:aN,table:tN,tableData:rN,tableHeader:rN,tableRow:rN}}}function eN(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function tN(e){this.exit(e),this.data.inTable=void 0}function nN(e){this.enter({type:`tableRow`,children:[]},e)}function rN(e){this.exit(e)}function iN(e){this.enter({type:`tableCell`,children:[]},e)}function aN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oN));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oN(e,t){return t===`|`?t:e}function sN(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
182
+ `),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function _M(e){throw Error("Cannot handle value `"+e+"`, expected node")}function vM(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function yM(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function bM(e,t){return sM(e,this,t)}function xM(e,t){return cM(e,this,t)}function SM(e,t){return fM(this,e,t)}function CM(){return{enter:{table:wM,tableData:OM,tableHeader:OM,tableRow:EM},exit:{codeText:kM,table:TM,tableData:DM,tableHeader:DM,tableRow:DM}}}function wM(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function TM(e){this.exit(e),this.data.inTable=void 0}function EM(e){this.enter({type:`tableRow`,children:[]},e)}function DM(e){this.exit(e)}function OM(e){this.enter({type:`tableCell`,children:[]},e)}function kM(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,AM));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function AM(e,t){return t===`|`?t:e}function jM(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
183
183
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
184
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return xj(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=wM.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cN(){return{exit:{taskListCheckValueChecked:uN,taskListCheckValueUnchecked:uN,paragraph:dN}}}function lN(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fN}}}function uN(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dN(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fN(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=wM.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function pN(){return[RA(),lj(),mj(),$M(),cN()]}function mN(e){return{extensions:[zA(),uj(e),hj(),sN(e),lN()]}}function hN(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function gN(e,t){return e.length>0?(hN(e,e.length,0,t),e):t}var _N={}.hasOwnProperty;function vN(e){let t={},n=-1;for(;++n<e.length;)yN(t,e[n]);return t}function yN(e,t){let n;for(n in t){let r=(_N.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){_N.call(r,a)||(r[a]=[]);let e=i[a];bN(r[a],Array.isArray(e)?e:e?[e]:[])}}}function bN(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);hN(e,0,0,r)}var xN={tokenize:FN,partial:!0},SN={tokenize:IN,partial:!0},CN={tokenize:LN,partial:!0},wN={tokenize:RN,partial:!0},TN={tokenize:zN,partial:!0},EN={name:`wwwAutolink`,tokenize:NN,previous:BN},DN={name:`protocolAutolink`,tokenize:PN,previous:VN},ON={name:`emailAutolink`,tokenize:MN,previous:HN},kN={};function AN(){return{text:kN}}for(var jN=48;jN<123;)kN[jN]=ON,jN++,jN===58?jN=65:jN===91&&(jN=97);kN[43]=ON,kN[45]=ON,kN[46]=ON,kN[95]=ON,kN[72]=[ON,DN],kN[104]=[ON,DN],kN[87]=[ON,EN],kN[119]=[ON,EN];function MN(e,t,n){let r=this,i,a;return o;function o(t){return!UN(t)||!HN.call(r,r.previous)||WN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return UN(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(TN,u,l)(t):t===45||t===95||SA(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&xA(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function NN(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!BN.call(r,r.previous)||WN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(xN,e.attempt(SN,e.attempt(CN,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function PN(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&VN.call(r,r.previous)&&!WN(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(xA(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||wA(t)||Z(t)||kA(t)||OA(t)?n(t):e.attempt(SN,e.attempt(CN,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function FN(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function IN(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(wN,c,s)(t):t===null||Z(t)||kA(t)||t!==45&&OA(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function LN(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(wN,t,a)(o):o===null||Z(o)||kA(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function RN(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Z(o)||kA(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Z(e)||kA(e)?t(e):r(e)}function a(e){return xA(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):xA(t)?(e.consume(t),o):n(t)}}function zN(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return SA(e)?n(e):t(e)}}function BN(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function VN(e){return!xA(e)}function HN(e){return!(e===47||UN(e))}function UN(e){return e===43||e===45||e===46||e===95||SA(e)}function WN(e){let t=e.length,n=!1;for(;t--;){let 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}function GN(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&SA(e.charCodeAt(n+1))&&SA(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function KN(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var qN={name:`attention`,resolveAll:JN,tokenize:YN};function JN(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};XN(d,-c),XN(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=gN(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=gN(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=gN(l,KN(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=gN(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=gN(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,hN(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function YN(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Wj(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Wj(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function XN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ZN={name:`autolink`,tokenize:QN};function QN(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return xA(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||SA(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||SA(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||wA(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):CA(t)?(e.consume(t),l):n(t)}function u(e){return SA(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||SA(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var $N={partial:!0,tokenize:eP};function eP(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var tP={continuation:{tokenize:rP},exit:iP,name:`blockQuote`,tokenize:nP};function nP(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function rP(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(tP,t,n)(r)}}function iP(e){e.exit(`blockQuote`)}var aP={name:`characterEscape`,tokenize:oP};function oP(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return DA(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var sP={name:`characterReference`,tokenize:cP};function cP(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=SA,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=EA,u):(e.enter(`characterReferenceValue`),a=7,o=TA,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===SA&&!AM(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var lP={partial:!0,tokenize:fP},uP={concrete:!0,name:`codeFenced`,tokenize:dP};function dP(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(lP,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(lP,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fP(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var pP={name:`codeIndented`,tokenize:hP},mP={partial:!0,tokenize:gP};function hP(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(mP,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function gP(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var _P={name:`codeText`,previous:yP,resolve:vP,tokenize:bP};function vP(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 yP(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function bP(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var xP=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&SP(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),SP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),SP(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);SP(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);SP(this.left,t.reverse())}}};function SP(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 CP(e){let t={},n=-1,r,i,a,o,s,c,l,u=new xP(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,wP(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return hN(e,0,1/0,u.slice(0)),!l}function wP(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var TP={resolve:DP,tokenize:OP},EP={partial:!0,tokenize:kP};function DP(e){return CP(e),e}function OP(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(EP,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function kP(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let 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(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function AP(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||wA(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Z(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||wA(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function jP(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function MP(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function NP(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var PP={name:`definition`,tokenize:IP},FP={partial:!0,tokenize:LP};function IP(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return jP.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=QA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Z(t)?NP(e,l)(t):l(t)}function l(t){return AP(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(FP,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function LP(e,t,n){return r;function r(t){return Z(t)?NP(e,i)(t):n(t)}function i(t){return MP(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var RP={name:`hardBreakEscape`,tokenize:zP};function zP(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var BP={name:`headingAtx`,resolve:VP,tokenize:HP};function VP(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},hN(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function HP(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Z(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Z(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var UP=`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`.split(`.`),WP=[`pre`,`script`,`style`,`textarea`],GP={concrete:!0,name:`htmlFlow`,resolveTo:JP,tokenize:YP},KP={partial:!0,tokenize:ZP},qP={partial:!0,tokenize:XP};function JP(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 YP(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):xA(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):xA(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return xA(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Z(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&WP.includes(l)?(i=1,r.interrupt?t(s):D(s)):UP.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||SA(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||xA(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||SA(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Z(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||X(t)?D(t):Q(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),oe):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(KP,le,te)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(qP,ne,le)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||X(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),se):D(t)}function O(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return WP.includes(n)?(e.consume(t),ce):D(t)}return xA(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),se):D(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):D(t)}function ce(t){return t===null||X(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function XP(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function ZP(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt($N,t,n)}}var QP={name:`htmlText`,tokenize:$P};function $P(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):xA(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):xA(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):X(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return xA(t)?(e.consume(t),S):n(t)}function S(t){return t===45||SA(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,O(t)):Q(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||SA(t)?(e.consume(t),w):t===47||t===62||Z(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||xA(t)?(e.consume(t),E):X(t)?(o=T,O(t)):Q(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||SA(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):X(t)?(o=ee,O(t)):Q(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):X(t)?(o=D,O(t)):Q(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):X(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Z(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Z(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return Q(t)?$(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var eF={name:`labelEnd`,resolveAll:iF,resolveTo:aF,tokenize:oF},tF={tokenize:sF},nF={tokenize:cF},rF={tokenize:lF};function iF(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&hN(e,0,e.length,n),e}function aF(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=gN(s,e.slice(a+1,a+r+3)),s=gN(s,[[`enter`,u,t]]),s=gN(s,KN(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=gN(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=gN(s,e.slice(o+1)),s=gN(s,[[`exit`,c,t]]),hN(e,a,e.length,s),e}function oF(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(QA(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(tF,u,o?u:d)(t):t===91?e.attempt(nF,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(rF,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function sF(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Z(t)?NP(e,a)(t):a(t)}function a(t){return t===41?u(t):AP(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Z(t)?NP(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?MP(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Z(t)?NP(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function cF(e,t,n){let r=this;return i;function i(t){return jP.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(QA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function lF(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var uF={name:`labelStartImage`,resolveAll:eF.resolveAll,tokenize:dF};function dF(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var fF={name:`labelStartLink`,resolveAll:eF.resolveAll,tokenize:pF};function pF(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var mF={name:`lineEnding`,tokenize:hF};function hF(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var gF={name:`thematicBreak`,tokenize:_F};function _F(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var vF={continuation:{tokenize:SF},exit:wF,name:`list`,tokenize:xF},yF={partial:!0,tokenize:TF},bF={partial:!0,tokenize:CF};function xF(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:TA(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(gF,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return TA(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check($N,r.interrupt?n:u,e.attempt(yF,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function SF(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check($N,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bF,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(vF,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function CF(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function wF(e){e.exit(this.containerState.type)}function TF(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var EF={name:`setextUnderline`,resolveTo:DF,tokenize:OF};function DF(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function OF(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var kF={tokenize:LF,partial:!0};function AF(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:PF,continuation:{tokenize:FF},exit:IF}},text:{91:{name:`gfmFootnoteCall`,tokenize:NF},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jF,resolveTo:MF}}}}function jF(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=QA(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function MF(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function NF(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Z(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(QA(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Z(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function PF(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Z(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=QA(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Z(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function FF(e,t,n){return e.check($N,t,e.attempt(kF,t,n))}function IF(e){e.exit(`gfmFootnoteDefinition`)}function LF(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function RF(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&hN(o,o.length,0,KN(s,e.slice(r+1,n),t)),hN(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),hN(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Wj(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Wj(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zF=class{constructor(){this.map=[]}add(e,t,n){BF(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function BF(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 VF(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 HF(){return{flow:{null:{name:`table`,tokenize:UF,resolveAll:WF}}}}function UF(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Z(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Z(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function WF(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zF;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(KF(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=GF(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=GF(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=GF(f,t,o,i,n,d)):(o[0]=o[1],d=GF(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&KF(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=VF(t.events,n))}return e}function GF(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},qF(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=qF(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=qF(t.events,n[2]),a=qF(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},qF(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function KF(e,t,n,r,i){let a=[],o=qF(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function qF(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var JF={name:`tasklistCheck`,tokenize:XF};function YF(){return{text:{91:JF}}}function XF(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Z(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Q(r)?e.check({tokenize:ZF},t,n)(r):n(r)}}function ZF(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function QF(e){return vN([AN(),AF(),RF(e),HF(),YF()])}var $F={};function eI(e){let t=this,n=e||$F,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QF(n)),a.push(pN()),o.push(mN(n))}function tI(e){let t=this;t.compiler=n;function n(n){return KM(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function nI(e){if(e)throw e}var rI=t(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function iI(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function aI(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?oI(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function oI(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var sI=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),cI={}.hasOwnProperty,lI=new class e extends sI{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=aI()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,rI.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(fI(`data`,this.frozen),this.namespace[e]=t,this):cI.call(this.namespace,e)&&this.namespace[e]||void 0:e?(fI(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=hI(e),n=this.parser||this.Parser;return uI(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),uI(`process`,this.parser||this.Parser),dI(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=hI(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);_I(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),uI(`processSync`,this.parser||this.Parser),dI(`processSync`,this.compiler||this.Compiler),this.process(e,r),mI(`processSync`,`process`,t),n;function r(e,r){t=!0,nI(e),n=r}}run(e,t,n){pI(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=hI(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),mI(`runSync`,`run`,n),r;function i(e,t){nI(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=hI(t),r=this.compiler||this.Compiler;return dI(`stringify`,r),pI(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(fI(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,rI.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];iI(o)&&iI(r)&&(r=(0,rI.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function uI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function dI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function fI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function pI(e){if(!iI(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function mI(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function hI(e){return gI(e)?e:new rD(e)}function gI(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function _I(e){return typeof e==`string`||vI(e)}function vI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var yI=/notionvc:/i,bI=()=>e=>{xI(e)&&(SI(e),CI(e))};function xI(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(yI.test(e))return!0}if(t.type===`element`&&xI(t))return!0}return!1}function SI(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&SI(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
185
- `)){t.push(n);continue}let r=e.split(`
186
- `);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function CI(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!yI.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&CI(t)}}var wI=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),TI=()=>e=>{EI(e)};function EI(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&EI(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return DI(t)?[]:OI(t)?t.children:[t]})}}function DI(e){if(e.tagName!==`meta`)return!1;let t=e.properties?.name,n=e.properties?.content;return t===`Generator`&&typeof n==`string`&&/Cocoa/i.test(n)}function OI(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>wI.has(String(e))):!1}var kI=`docs-internal-guid-`;function AI(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var jI=()=>e=>{MI(e)};function MI(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&MI(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(!n||n.type!==`element`){t++;continue}let r=n;if(NI(r)||PI(r)){AI(e,t);continue}t++}}function NI(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(kI)}function PI(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.children.filter(e=>e.type===`element`);return t.length===1?t[0]?.tagName===`table`:!1}var FI=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),II=()=>e=>{LI(e)};function LI(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&LI(t);for(let t of e.children)t.type===`element`&&RI(t)}}function RI(e){if(!e.properties)return;for(let t of Object.keys(e.properties))t.startsWith(`dataHovercard`)&&delete e.properties[t];let t=e.properties.className;if(Array.isArray(t)){let n=t.filter(e=>!FI.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var zI=/^gmail_/,BI=()=>e=>{VI(e)};function VI(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&VI(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(n.type!==`element`){t++;continue}let r=n;if(r.tagName===`div`&&HI(r,`gmail_quote`)&&(r.tagName=`blockquote`),UI(r),WI(r)){e.children.splice(t,1,...r.children);continue}t++}}function HI(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function UI(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!zI.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function WI(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.properties?.className;return t!=null&&!(Array.isArray(t)&&t.length===0)?!1:e.children.filter(e=>e.type===`element`).length<=1}var GI=()=>e=>{KI(e)};function KI(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&KI(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return t.tagName===`google-sheets-html-origin`?t.children:t.tagName===`style`?[]:(qI(t),[t])})}}function qI(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var JI=[`o:`,`w:`,`m:`,`v:`,`u1:`],YI=/^Mso[A-Z]/,XI=/^\s*\[if\s+[^\]]*\]/,ZI=()=>e=>{QI(e)};function QI(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&QI(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return XI.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return $I(t)?[]:(eL(t),[t])})}}function $I(e){return JI.some(t=>e.tagName.startsWith(t))}function eL(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!YI.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&YI.test(n)&&delete t.className;let r=t.style;typeof r==`string`&&/mso-/i.test(r)&&delete t.style;for(let e of Object.keys(t))if(e.startsWith(`xmlns:`)){let n=e.slice(6);JI.some(e=>e===`${n}:`)&&delete t[e]}}var tL=/^c-(message_kit__|message__|compose|timestamp)/,nL=()=>e=>{rL(e)};function rL(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&rL(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return iL(t)?[]:(aL(t),[t])})}}function iL(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function aL(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!tL.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var oL=()=>e=>{sL(e)};function sL(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&sL(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;cL(r)&&(e.children[t]=uL(r))}}}function cL(e){if(e.tagName!==`div`)return!1;let t=e.children.filter(e=>e.type===`element`&&e.tagName===`div`);return t.length<2?!1:t.some(e=>lL(e))}function lL(e){for(let t of e.children){if(t.type!==`element`)continue;let e=t,n=e.properties?.style;if(typeof n==`string`&&/color\s*:/i.test(n)||lL(e))return!0}return!1}function uL(e){return{type:`element`,tagName:`pre`,properties:{},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:e.children.filter(e=>e.type===`element`&&e.tagName===`div`).map(e=>dL(e)).join(`
187
- `)}]}]}}function dL(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=dL(n));return t}var fL=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},pL=[jI,ZI,TI,BI,bI,oL,GI,nL,II];function mL(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new fL(e.length,n);let r=lI().use(bD,{fragment:!0});for(let e of pL)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(yA);let i=r.parse(e);return r.runSync(i)}function hL(e){return String(lI().use(eI).use(tI).stringify(e))}var gL=9,_L=32;function vL(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(yL(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(yL(t.slice(i),i>0,!1)),a.join(``)}function yL(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===gL||t===_L;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===gL||t===_L;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function bL(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return SO(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return OL(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(wL(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(A.from(a.content).replaceChild(0,e.text(wL(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function xL(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function SL(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(A.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(A.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function CL(e){throw Error(`unknown markdown node: ${e.type}`)}function wL(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function TL(){}function EL(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function DL(e,t,n,r){return Tj(`tagName`,{handlers:e})(t,n,r)}function OL(e,t,n,r,i,a){return Tj(`type`,{invalid:EL,unknown:CL,handlers:{toml:TL,yaml:TL,definition:TL,footnoteDefinition:TL,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=hD(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?DL(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=xL(vL(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return SL(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function kL(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function AL(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var jL=function(e,t){let n=OL(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,bL(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},ML=function(e){this.compiler=function(t){return jL(t,e)}};function NL(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>UD(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function PL(e,t){return NL(t.nodeHandlers,t.markHandlers).one(e)}function FL(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function IL(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var LL={parseFallback:{blockLevel:0,wholeDoc:0}};function RL(){LL.parseFallback.blockLevel++}function zL(){LL.parseFallback.wholeDoc++}var BL=/^(`{3,}|~{3,})/gm;function VL(e){let t=[],n=null;for(let r of e.matchAll(BL)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function HL(e,t){return t.some(([t,n])=>e>=t&&e<n)}var UL=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function WL(e){let t=VL(e),n=[];for(let r of e.matchAll(UL))HL(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
188
- `)}\n\n`:``}function GL(e,t){return KL(e,t.parse,0)}function KL(e,t,n){if(n>20)return zL(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),eR(e);try{return t(e)}catch(r){let i=qL(r);if(i===void 0){if(n===0){let n=$L(e,t,r);if(n)return n}return zL(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:r?.message??`unknown error (no position)`})),eR(e)}RL(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:i,reason:r?.message??`parse error`}));try{let a=ZL(e,i),o=e.slice(0,a.start),s=e.slice(a.start,a.end),c=e.slice(a.end),l=o.trim()?KL(o,t,n+1):{type:`doc`,content:[]},u=c.trim()?KL(WL(o)+c,t,n+1):{type:`doc`,content:[]},d={type:`rawMdxFallback`,attrs:{reason:r?.message??`parse error`,originalSpan:{start:a.start,end:a.end}},content:s?[{type:`text`,text:s}]:[]},f=[...l.content??[],d,...u.content??[]];return{type:`doc`,content:f.length>0?f:[{type:`paragraph`,content:[]}]}}catch(t){return zL(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${t?.message??`unknown`}`})),eR(e)}}}function qL(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function JL(e,t){let n=VL(e);if(HL(t,n))return null;let r=/<([A-Z][A-Za-z0-9.]*)[\s/>]/g,i=/<\/([A-Z][A-Za-z0-9.]*)\s*>/g,a=null;for(let i of e.matchAll(r)){if(i.index>t)break;HL(i.index,n)||(a={name:i[1],start:i.index})}if(!a)return null;for(let r of e.matchAll(i))if(!(r.index<t)&&!HL(r.index,n)&&r[1]===a.name)return{start:a.start,end:r.index+r[0].length};let o=XL(e,t);return{start:a.start,end:o??e.length}}function YL(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function XL(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function ZL(e,t){return JL(e,t)||{start:YL(e,t)??0,end:XL(e,t)??e.length}}function QL(e){let t=VL(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;HL(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function $L(e,t,n){let r=QL(e);if(r.length<2)return null;let i=[],a=!1,o=``;for(let e of r){let r=o+e.src;try{let n=t(r).content??[];o+=WL(e.src);let s=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(s.length===0&&n.length>0){a=!0;continue}i.push(...s),a=!0}catch(t){RL();let r=t?.message?.slice(0,200)??`unknown block error`,a=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${a}`,blockError:r,blockErrorName:t?.name})),i.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return a?{type:`doc`,content:i.length>0?i:[{type:`paragraph`,content:[]}]}:null}function eR(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}var tR=t(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),nR=Object.assign(rR(Error),{eval:rR(EvalError),range:rR(RangeError),reference:rR(ReferenceError),syntax:rR(SyntaxError),type:rR(TypeError),uri:rR(URIError)});function rR(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,tR.default)(t,...n))}}var iR={}.hasOwnProperty,aR={yaml:`-`,toml:`+`};function oR(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=sR(r[n]);return t}function sR(e){let t=e;if(typeof t==`string`){if(!iR.call(aR,t))throw nR("Missing matter definition for `%s`",t);t={type:t,marker:aR[t]}}else if(typeof t!=`object`)throw nR("Expected matter to be an object, not `%j`",t);if(!iR.call(t,`type`))throw nR("Missing `type` in matter `%j`",t);if(!iR.call(t,`fence`)&&!iR.call(t,`marker`))throw nR("Missing `marker` or `fence` in matter `%j`",t);return t}function cR(e){let t=oR(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=uR(e,`open`).charCodeAt(0),a=lR(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function lR(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=uR(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Q(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Q(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return X(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=uR(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||X(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||X(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Q(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Q(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||X(i)?(e.exit(r),t(i)):n(i)}}}function uR(e,t){return e.marker?dR(e.marker,t).repeat(3):dR(e.fence,t)}function dR(e,t){return typeof e==`string`?e:e[t]}function fR(e){let t=oR(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=pR(e),r[e.type]=mR,r[e.type+`Value`]=hR}return{enter:n,exit:r}}function pR(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function mR(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function hR(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function gR(e){let t=[],n={},r=oR(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=_R(e);let a=vR(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:jA(a.charAt(1))})}return{unsafe:t,handlers:n}}function _R(e){let t=vR(e,`open`),n=vR(e,`close`);return r;function r(e){return t+(e.value?`
184
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return GA(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Jj.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function MM(){return{exit:{taskListCheckValueChecked:PM,taskListCheckValueUnchecked:PM,paragraph:FM}}}function NM(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:IM}}}function PM(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function FM(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function IM(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Jj.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function LM(){return[cA(),NA(),RA(),CM(),MM()]}function RM(e){return{extensions:[lA(),PA(e),zA(),jM(e),NM()]}}function zM(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function BM(e,t){return e.length>0?(zM(e,e.length,0,t),e):t}var VM={}.hasOwnProperty;function HM(e){let t={},n=-1;for(;++n<e.length;)UM(t,e[n]);return t}function UM(e,t){let n;for(n in t){let r=(VM.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){VM.call(r,a)||(r[a]=[]);let e=i[a];WM(r[a],Array.isArray(e)?e:e?[e]:[])}}}function WM(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);zM(e,0,0,r)}var GM={tokenize:aN,partial:!0},KM={tokenize:oN,partial:!0},qM={tokenize:sN,partial:!0},JM={tokenize:cN,partial:!0},YM={tokenize:lN,partial:!0},XM={name:`wwwAutolink`,tokenize:rN,previous:uN},ZM={name:`protocolAutolink`,tokenize:iN,previous:dN},QM={name:`emailAutolink`,tokenize:nN,previous:fN},$M={};function eN(){return{text:$M}}for(var tN=48;tN<123;)$M[tN]=QM,tN++,tN===58?tN=65:tN===91&&(tN=97);$M[43]=QM,$M[45]=QM,$M[46]=QM,$M[95]=QM,$M[72]=[QM,ZM],$M[104]=[QM,ZM],$M[87]=[QM,XM],$M[119]=[QM,XM];function nN(e,t,n){let r=this,i,a;return o;function o(t){return!pN(t)||!fN.call(r,r.previous)||mN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return pN(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(YM,u,l)(t):t===45||t===95||Kk(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Gk(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function rN(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!uN.call(r,r.previous)||mN(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(GM,e.attempt(KM,e.attempt(qM,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function iN(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&dN.call(r,r.previous)&&!mN(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Gk(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Jk(t)||Z(t)||$k(t)||Qk(t)?n(t):e.attempt(KM,e.attempt(qM,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function aN(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function oN(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(JM,c,s)(t):t===null||Z(t)||$k(t)||t!==45&&Qk(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function sN(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(JM,t,a)(o):o===null||Z(o)||$k(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function cN(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Z(o)||$k(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Z(e)||$k(e)?t(e):r(e)}function a(e){return Gk(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Gk(t)?(e.consume(t),o):n(t)}}function lN(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Kk(e)?n(e):t(e)}}function uN(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Z(e)}function dN(e){return!Gk(e)}function fN(e){return!(e===47||pN(e))}function pN(e){return e===43||e===45||e===46||e===95||Kk(e)}function mN(e){let t=e.length,n=!1;for(;t--;){let 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}function hN(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Kk(e.charCodeAt(n+1))&&Kk(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function gN(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var _N={name:`attention`,resolveAll:vN,tokenize:yN};function vN(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};bN(d,-c),bN(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=BM(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=BM(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=BM(l,gN(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=BM(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=BM(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,zM(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function yN(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mj(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=mj(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function bN(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var xN={name:`autolink`,tokenize:SN};function SN(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Gk(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Kk(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Kk(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Jk(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qk(t)?(e.consume(t),l):n(t)}function u(e){return Kk(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Kk(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var CN={partial:!0,tokenize:wN};function wN(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||X(e)?t(e):n(e)}}var TN={continuation:{tokenize:DN},exit:ON,name:`blockQuote`,tokenize:EN};function EN(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function DN(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(TN,t,n)(r)}}function ON(e){e.exit(`blockQuote`)}var kN={name:`characterEscape`,tokenize:AN};function AN(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Zk(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var jN={name:`characterReference`,tokenize:MN};function MN(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Kk,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Xk,u):(e.enter(`characterReferenceValue`),a=7,o=Yk,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Kk&&!eM(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var NN={partial:!0,tokenize:IN},PN={concrete:!0,name:`codeFenced`,tokenize:FN};function FN(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||X(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(NN,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||X(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||X(t)?e.check(NN,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||X(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||X(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function IN(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var LN={name:`codeIndented`,tokenize:zN},RN={partial:!0,tokenize:BN};function zN(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):X(t)?e.attempt(RN,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||X(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function BN(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):X(e)?i(e):n(e)}}var VN={name:`codeText`,previous:UN,resolve:HN,tokenize:WN};function HN(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 UN(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function WN(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||X(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var GN=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&KN(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),KN(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),KN(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);KN(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);KN(this.left,t.reverse())}}};function KN(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 qN(e){let t={},n=-1,r,i,a,o,s,c,l,u=new GN(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,JN(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return zM(e,0,1/0,u.slice(0)),!l}function JN(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var YN={resolve:ZN,tokenize:QN},XN={partial:!0,tokenize:$N};function ZN(e){return qN(e),e}function QN(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):X(t)?e.check(XN,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function $N(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||X(i))return n(i);let 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(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function eP(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Jk(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||X(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Z(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Jk(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function tP(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):X(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||X(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function nP(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||X(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function rP(e,t){let n;return r;function r(i){return X(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var iP={name:`definition`,tokenize:oP},aP={partial:!0,tokenize:sP};function oP(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return tP.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=SA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Z(t)?rP(e,l)(t):l(t)}function l(t){return eP(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(aP,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||X(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function sP(e,t,n){return r;function r(t){return Z(t)?rP(e,i)(t):n(t)}function i(t){return nP(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||X(e)?t(e):n(e)}}var cP={name:`hardBreakEscape`,tokenize:lP};function lP(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return X(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var uP={name:`headingAtx`,resolve:dP,tokenize:fP};function dP(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},zM(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function fP(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Z(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||X(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Z(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var pP=`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`.split(`.`),mP=[`pre`,`script`,`style`,`textarea`],hP={concrete:!0,name:`htmlFlow`,resolveTo:vP,tokenize:yP},gP={partial:!0,tokenize:xP},_P={partial:!0,tokenize:bP};function vP(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 yP(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:se):Gk(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Gk(a)?(e.consume(a),i=4,r.interrupt?t:se):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:se):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Gk(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Z(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&mP.includes(l)?(i=1,r.interrupt?t(s):D(s)):pP.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Kk(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Gk(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Kk(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||X(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Z(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||X(t)?D(t):Q(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),ce):t===63&&i===3?(e.consume(t),se):t===93&&i===5?(e.consume(t),oe):X(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(gP,le,te)(t)):t===null||X(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(_P,ne,le)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||X(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),se):D(t)}function O(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return mP.includes(n)?(e.consume(t),ce):D(t)}return Gk(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),se):D(t)}function se(t){return t===62?(e.consume(t),ce):t===45&&i===2?(e.consume(t),se):D(t)}function ce(t){return t===null||X(t)?(e.exit(`htmlFlowData`),le(t)):(e.consume(t),ce)}function le(n){return e.exit(`htmlFlow`),t(n)}}function bP(e,t,n){let r=this;return i;function i(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function xP(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(CN,t,n)}}var SP={name:`htmlText`,tokenize:CP};function CP(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Gk(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Gk(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):X(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):X(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):X(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):X(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return Gk(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Kk(t)?(e.consume(t),S):C(t)}function C(t){return X(t)?(o=C,O(t)):Q(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||Kk(t)?(e.consume(t),w):t===47||t===62||Z(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||Gk(t)?(e.consume(t),E):X(t)?(o=T,O(t)):Q(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||Kk(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):X(t)?(o=ee,O(t)):Q(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):X(t)?(o=D,O(t)):Q(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):X(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Z(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Z(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return Q(t)?$(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var wP={name:`labelEnd`,resolveAll:OP,resolveTo:kP,tokenize:AP},TP={tokenize:jP},EP={tokenize:MP},DP={tokenize:NP};function OP(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&zM(e,0,e.length,n),e}function kP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=BM(s,e.slice(a+1,a+r+3)),s=BM(s,[[`enter`,u,t]]),s=BM(s,gN(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=BM(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=BM(s,e.slice(o+1)),s=BM(s,[[`exit`,c,t]]),zM(e,a,e.length,s),e}function AP(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(SA(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(TP,u,o?u:d)(t):t===91?e.attempt(EP,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(DP,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function jP(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Z(t)?rP(e,a)(t):a(t)}function a(t){return t===41?u(t):eP(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Z(t)?rP(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?nP(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Z(t)?rP(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function MP(e,t,n){let r=this;return i;function i(t){return tP.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(SA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function NP(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var PP={name:`labelStartImage`,resolveAll:wP.resolveAll,tokenize:FP};function FP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var IP={name:`labelStartLink`,resolveAll:wP.resolveAll,tokenize:LP};function LP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var RP={name:`lineEnding`,tokenize:zP};function zP(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var BP={name:`thematicBreak`,tokenize:VP};function VP(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||X(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var HP={continuation:{tokenize:KP},exit:JP,name:`list`,tokenize:GP},UP={partial:!0,tokenize:YP},WP={partial:!0,tokenize:qP};function GP(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Yk(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(BP,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Yk(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(CN,r.interrupt?n:u,e.attempt(UP,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function KP(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(CN,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(WP,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(HP,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function qP(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function JP(e){e.exit(this.containerState.type)}function YP(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var XP={name:`setextUnderline`,resolveTo:ZP,tokenize:QP};function ZP(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function QP(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||X(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var $P={tokenize:sF,partial:!0};function eF(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:iF,continuation:{tokenize:aF},exit:oF}},text:{91:{name:`gfmFootnoteCall`,tokenize:rF},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:tF,resolveTo:nF}}}}function tF(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=SA(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function nF(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function rF(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Z(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(SA(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Z(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function iF(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Z(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=SA(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Z(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function aF(e,t,n){return e.check(CN,t,e.attempt($P,t,n))}function oF(e){e.exit(`gfmFootnoteDefinition`)}function sF(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function cF(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&zM(o,o.length,0,gN(s,e.slice(r+1,n),t)),zM(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),zM(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=mj(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=mj(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var lF=class{constructor(){this.map=[]}add(e,t,n){uF(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function uF(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 dF(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 fF(){return{flow:{null:{name:`table`,tokenize:pF,resolveAll:mF}}}}function pF(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Z(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Z(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function mF(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new lF;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(gF(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=hF(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=hF(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=hF(f,t,o,i,n,d)):(o[0]=o[1],d=hF(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&gF(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=dF(t.events,n))}return e}function hF(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},_F(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=_F(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=_F(t.events,n[2]),a=_F(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},_F(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function gF(e,t,n,r,i){let a=[],o=_F(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function _F(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var vF={name:`tasklistCheck`,tokenize:bF};function yF(){return{text:{91:vF}}}function bF(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Z(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Q(r)?e.check({tokenize:xF},t,n)(r):n(r)}}function xF(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function SF(e){return HM([eN(),eF(),cF(e),fF(),yF()])}var CF={};function wF(e){let t=this,n=e||CF,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(SF(n)),a.push(LM()),o.push(RM(n))}function TF(e){let t=this;t.compiler=n;function n(n){return gM(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function EF(e){if(e)throw e}var DF=t(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function OF(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kF(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?AF(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function AF(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var jF=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),MF={}.hasOwnProperty,NF=new class e extends jF{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=kF()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,DF.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(IF(`data`,this.frozen),this.namespace[e]=t,this):MF.call(this.namespace,e)&&this.namespace[e]||void 0:e?(IF(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=zF(e),n=this.parser||this.Parser;return PF(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),PF(`process`,this.parser||this.Parser),FF(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=zF(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);VF(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),PF(`processSync`,this.parser||this.Parser),FF(`processSync`,this.compiler||this.Compiler),this.process(e,r),RF(`processSync`,`process`,t),n;function r(e,r){t=!0,EF(e),n=r}}run(e,t,n){LF(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=zF(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),RF(`runSync`,`run`,n),r;function i(e,t){EF(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=zF(t),r=this.compiler||this.Compiler;return FF(`stringify`,r),LF(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(IF(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,DF.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];OF(o)&&OF(r)&&(r=(0,DF.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function PF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function FF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function IF(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function LF(e){if(!OF(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function RF(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function zF(e){return BF(e)?e:new DE(e)}function BF(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function VF(e){return typeof e==`string`||HF(e)}function HF(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var UF=9,WF=32;function GF(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(KF(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(KF(t.slice(i),i>0,!1)),a.join(``)}function KF(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===UF||t===WF;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===UF||t===WF;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function qF(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return KD(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return tI(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(ZF(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(A.from(a.content).replaceChild(0,e.text(ZF(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function JF(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function YF(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(A.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(A.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function XF(e){throw Error(`unknown markdown node: ${e.type}`)}function ZF(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function QF(){}function $F(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function eI(e,t,n,r){return YA(`tagName`,{handlers:e})(t,n,r)}function tI(e,t,n,r,i,a){return YA(`type`,{invalid:$F,unknown:XF,handlers:{toml:QF,yaml:QF,definition:QF,footnoteDefinition:QF,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=zE(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?eI(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=JF(GF(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return YF(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function nI(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function rI(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var iI=function(e,t){let n=tI(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,qF(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},aI=function(e){this.compiler=function(t){return iI(t,e)}};function oI(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>pD(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function sI(e,t){return oI(t.nodeHandlers,t.markHandlers).one(e)}function cI(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function lI(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var uI=t(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),dI=Object.assign(fI(Error),{eval:fI(EvalError),range:fI(RangeError),reference:fI(ReferenceError),syntax:fI(SyntaxError),type:fI(TypeError),uri:fI(URIError)});function fI(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,uI.default)(t,...n))}}var pI={}.hasOwnProperty,mI={yaml:`-`,toml:`+`};function hI(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=gI(r[n]);return t}function gI(e){let t=e;if(typeof t==`string`){if(!pI.call(mI,t))throw dI("Missing matter definition for `%s`",t);t={type:t,marker:mI[t]}}else if(typeof t!=`object`)throw dI("Expected matter to be an object, not `%j`",t);if(!pI.call(t,`type`))throw dI("Missing `type` in matter `%j`",t);if(!pI.call(t,`fence`)&&!pI.call(t,`marker`))throw dI("Missing `marker` or `fence` in matter `%j`",t);return t}function _I(e){let t=hI(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=yI(e,`open`).charCodeAt(0),a=vI(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function vI(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=yI(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Q(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Q(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return X(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=yI(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||X(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||X(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Q(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Q(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||X(i)?(e.exit(r),t(i)):n(i)}}}function yI(e,t){return e.marker?bI(e.marker,t).repeat(3):bI(e.fence,t)}function bI(e,t){return typeof e==`string`?e:e[t]}function xI(e){let t=hI(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=SI(e),r[e.type]=CI,r[e.type+`Value`]=wI}return{enter:n,exit:r}}function SI(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function CI(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function wI(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function TI(e){let t=[],n={},r=hI(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=EI(e);let a=DI(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:tA(a.charAt(1))})}return{unsafe:t,handlers:n}}function EI(e){let t=DI(e,`open`),n=DI(e,`close`);return r;function r(e){return t+(e.value?`
189
185
  `+e.value:``)+`
190
- `+n}}function vR(e,t){return e.marker?yR(e.marker,t).repeat(3):yR(e.fence,t)}function yR(e,t){return typeof e==`string`?e:e[t]}var bR=`yaml`;function xR(e){let t=this,n=e||bR,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cR(n)),a.push(fR(n)),o.push(gR(n))}var SR={tokenize:CR};function CR(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var wR={tokenize:ER},TR={tokenize:DR};function ER(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return hN(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(TR,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(TR,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;hN(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function DR(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var OR={tokenize:kR};function kR(e){let t=this,n=e.attempt($N,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(TP,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var AR={resolveAll:PR()},jR=NR(`string`),MR=NR(`text`);function NR(e){return{resolveAll:PR(e===`text`?FR:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function PR(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function FR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var IR=e({attentionMarkers:()=>WR,contentInitial:()=>RR,disable:()=>GR,document:()=>LR,flow:()=>BR,flowInitial:()=>zR,insideSpan:()=>UR,string:()=>VR,text:()=>HR}),LR={42:vF,43:vF,45:vF,48:vF,49:vF,50:vF,51:vF,52:vF,53:vF,54:vF,55:vF,56:vF,57:vF,62:tP},RR={91:PP},zR={[-2]:pP,[-1]:pP,32:pP},BR={35:BP,42:gF,45:[EF,gF],60:GP,61:EF,95:gF,96:uP,126:uP},VR={38:sP,92:aP},HR={[-5]:mF,[-4]:mF,[-3]:mF,33:uF,38:sP,42:qN,60:[ZN,QP],91:fF,92:[RP,aP],93:eF,95:qN,96:_P},UR={null:[qN,AR]},WR={null:[42,95]},GR={null:[]};function KR(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=gN(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=KN(a,l.events,l),l.events):[]}function f(e,t){return JR(p(e),t)}function p(e){return qR(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&hN(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qR(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function JR(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
186
+ `+n}}function DI(e,t){return e.marker?OI(e.marker,t).repeat(3):OI(e.fence,t)}function OI(e,t){return typeof e==`string`?e:e[t]}var kI=`yaml`;function AI(e){let t=this,n=e||kI,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(_I(n)),a.push(xI(n)),o.push(TI(n))}var jI={tokenize:MI};function MI(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return X(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var NI={tokenize:FI},PI={tokenize:II};function FI(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return zM(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PI,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(PI,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return X(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;zM(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function II(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var LI={tokenize:RI};function RI(e){let t=this,n=e.attempt(CN,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(YN,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var zI={resolveAll:UI()},BI=HI(`string`),VI=HI(`text`);function HI(e){return{resolveAll:UI(e===`text`?WI:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function UI(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function WI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var GI=e({attentionMarkers:()=>$I,contentInitial:()=>qI,disable:()=>eL,document:()=>KI,flow:()=>YI,flowInitial:()=>JI,insideSpan:()=>QI,string:()=>XI,text:()=>ZI}),KI={42:HP,43:HP,45:HP,48:HP,49:HP,50:HP,51:HP,52:HP,53:HP,54:HP,55:HP,56:HP,57:HP,62:TN},qI={91:iP},JI={[-2]:LN,[-1]:LN,32:LN},YI={35:uP,42:BP,45:[XP,BP],60:hP,61:XP,95:BP,96:PN,126:PN},XI={38:jN,92:kN},ZI={[-5]:RP,[-4]:RP,[-3]:RP,33:PP,38:jN,42:_N,60:[xN,SP],91:IP,92:[cP,kN],93:wP,95:_N,96:VN},QI={null:[_N,zI]},$I={null:[42,95]},eL={null:[]};function tL(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=BM(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=gN(a,l.events,l),l.events):[]}function f(e,t){return rL(p(e),t)}function p(e){return nL(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){X(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&zM(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function nL(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function rL(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
191
187
  `;break;case-3:o=`\r
192
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function YR(e){let t={constructs:vN([IR,...(e||{}).extensions||[]]),content:n(SR),defined:[],document:n(wR),flow:n(OR),lazy:{},string:n(jR),text:n(MR)};return t;function n(e){return n;function n(n){return KR(t,e,n)}}}function XR(e){for(;!CP(e););return e}var ZR=/[\0\t\n\r]/g;function QR(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(ZR.lastIndex=u,c=ZR.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var $R={}.hasOwnProperty;function ez(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),tz(n)(XR(YR(n).document().write(QR()(e,t,!0))))}function tz(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ee),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Se),blockQuote:a(_e),characterEscape:T,characterReference:T,codeFenced:a(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ve,o),codeText:a(ye,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(be),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(xe),hardBreakEscape:a(Ce),hardBreakTrailing:a(Ce),htmlFlow:a(we,o),htmlFlowData:T,htmlText:a(we,o),htmlTextData:T,image:a(Te),label:o,link:a(Ee),listItem:a(Oe),listItemValue:f,listOrdered:a(De,d),listUnordered:a(De),paragraph:a(ke),reference:ue,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Se),strong:a(Ae),thematicBreak:a(je)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:oe,labelText:ae,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};rz(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];$R.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||az).call(a,void 0,e[0])}for(r.position={start:nz(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nz(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:nz(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||az).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+gm({start:e.start,end:e.end})+`): it’s not open`);n.position.end=nz(e.end)}function u(){return Ak(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=QA(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=k(),n.position={start:nz(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=nz(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=nz(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=NM(t),n.identifier=QA(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=QA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=jM(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=AM(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=nz(e.end)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[]}}function ve(){return{type:`code`,lang:null,meta:null,value:``}}function ye(){return{type:`inlineCode`,value:``}}function be(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function xe(){return{type:`emphasis`,children:[]}}function Se(){return{type:`heading`,depth:0,children:[]}}function Ce(){return{type:`break`}}function we(){return{type:`html`,value:``}}function Te(){return{type:`image`,title:null,url:``,alt:null}}function Ee(){return{type:`link`,title:null,url:``,children:[]}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ke(){return{type:`paragraph`,children:[]}}function Ae(){return{type:`strong`,children:[]}}function k(){return{type:`text`,value:``}}function je(){return{type:`thematicBreak`}}}function nz(e){return{line:e.line,column:e.column,offset:e.offset}}function rz(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?rz(e,r):iz(e,r)}}function iz(e,t){let n;for(n in t)if($R.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function az(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+gm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+gm({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+gm({start:t.start,end:t.end})+`) is still open`)}function oz(e){let t=this;t.parser=n;function n(n){return ez(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var sz=``,cz=``,lz=``,uz=``,dz=``,fz=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,pz=/<!--[\s\S]*?-->/g,mz=/<\/([a-z][a-z0-9]*)\s*>/g,hz=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,gz=/<\/([A-Z][A-Za-z0-9.]*)>/g;function _z(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function vz(e){let t=new Map,n=new RegExp(gz.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function yz(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function bz(e){let t=[],n=e.indexOf(`/>`);for(;n!==-1;)t.push(n),n=e.indexOf(`/>`,n+2);return t}function xz(e){let t=e;t=t.replace(pz,e=>e.replace(/</g,sz).replace(/>/g,cz)),t=t.replace(fz,(e,t)=>`${sz}${t.replaceAll(`:`,lz).replaceAll(`@`,uz)}${cz}`),t=t.replace(mz,e=>e.replace(/</g,sz).replace(/>/g,cz)),t=t.replace(hz,(e,t)=>t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,sz).replace(/>/g,cz):e),t=t.replace(/<>/g,`${sz}${cz}`);let n=vz(t),r=yz(t),i=bz(t);t=t.replace(/</g,(e,a)=>{let o=t.slice(a,a+256);if(o[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(o)?e:sz;let s=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(o);if(!s)return sz;let c=s[1],l=_z(r,a),u=_z(i,l<r.length?r[l]:t.length);if(u>0){let n=i[u-1];if(n>a){let r=a+s[0].length-1;if(!t.slice(r,n).replace(/"[^"]*"|'[^']*'/g,``).includes(`/`))return e}}let d=n.get(c);return d&&_z(d,a)<d.length?e:sz});{let e=[],n=[];for(let r=0;r<t.length;r++){if(t[r]===`
193
- `){let i=t[r+1];if(i===`
194
- `||i===`>`){if(e.push(...n),n.length=0,i===`
195
- `)for(;t[r+1]===`
196
- `;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=[...t];for(let t of e)n[t]=dz;t=n.join(``)}}return t}function Sz(e){return e.includes(``)||e.includes(``)||e.includes(``)||e.includes(``)||e.includes(``)}function Cz(){return e=>{SO(e,e=>{let t=e;typeof t.value==`string`&&Sz(t.value)&&(t.value=wz(t.value)),typeof t.url==`string`&&Sz(t.url)&&(t.url=wz(t.url)),typeof t.title==`string`&&Sz(t.title)&&(t.title=wz(t.title)),typeof t.alt==`string`&&Sz(t.alt)&&(t.alt=wz(t.alt))})}}function wz(e){return e.replaceAll(sz,`<`).replaceAll(cz,`>`).replaceAll(lz,`:`).replaceAll(uz,`@`).replaceAll(dz,`{`)}var Tz=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function Ez(e){let t=[],n=!1;for(let r of e.children){if(r.type!==`text`){t.push(r);continue}let e=r.value;Tz.lastIndex=0;let i=[],a=0;for(;;){let t=Tz.exec(e);if(t===null)break;let r=t[0],o=t[1],s=t.index;s>a&&i.push({type:`text`,value:e.slice(a,s)});let c={type:`link`,url:o,title:null,children:[{type:`text`,value:o}],data:{sourceStyle:`autolink`}};i.push(c),a=s+r.length,n=!0}i.length===0?t.push(r):(a<e.length&&i.push({type:`text`,value:e.slice(a)}),t.push(...i))}n&&(e.children=t)}function Dz(e,t){if(e.children.length===0)return;let n=e.children[0];if(n.type!==`yaml`||(n.value??``).trim()!==``)return;let r=n.position?.start?.offset;if(r!==0)return;let i=n.position?.end?.offset;if(typeof i!=`number`)return;let a=typeof t.value==`string`?t.value:``;if(!a)return;let o=a.slice(r,i).split(`
197
- `),s=/^-{3,}\s*$/,c=o.filter(e=>s.test(e));if(c.length===0)return;let l=c.map(e=>({type:`thematicBreak`,data:{sourceRaw:e.replace(/\s+$/,``)}}));if(l.length>0){let e=c[0].length;l[0].position={start:{line:1,column:1,offset:0},end:{line:1,column:e+1,offset:e}}}e.children.splice(0,1,...l)}var Oz=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function kz(e,t,n=!1){if(!t)return;let r=e.position;if(!r||typeof r.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let i=r.start.offset,a=r.end?.offset??i;if(i<0||a>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${i} end=${a} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(i,a),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&Oz.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}break}case`emphasis`:{let n=t[i];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(i,i+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:if(t[i]===`#`)e.data.sourceStyle=`atx`;else{let n=t.slice(i,a);/\n[=]+\s*$/.test(n)||/\n[-]+\s*$/.test(n)?e.data.sourceStyle=`setext`:e.data.sourceStyle=`atx`}break;case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`code`:{let n=t[i];if(n==="`"||n===`~`){e.data.sourceFenceChar=n;let r=0;for(;i+r<t.length&&t[i+r]===n;)r++;r>=3&&(e.data.sourceFenceLength=r)}break}case`thematicBreak`:e.data.sourceRaw=t.slice(i,a);break;case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(i,a);break;case`break`:t.slice(i,a).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}var Az=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.math.inlineMath.rawMdxFallbackMdast`.split(`.`));function jz(e,t){let n=e.position?.start?.offset??0,r=e.position?.end?.offset??0,i=r>n?t.slice(n,r):``;return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:i||(e.type??`unknown`),position:e.position}}function Mz(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;Dz(e,t);let r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;SO(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!Az.has(e.type)){let r=jz(e,n);return i.children[t]=r,yO}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&Ez(t)}kz(e,n,r)})}}function Nz(){return{enter:{mdxFlowExpression:Fz,mdxTextExpression:Iz},exit:{mdxFlowExpression:Lz,mdxFlowExpressionChunk:Rz,mdxTextExpression:Lz,mdxTextExpressionChunk:Rz}}}function Pz(){return{handlers:{mdxFlowExpression:zz,mdxTextExpression:zz},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function Fz(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function Iz(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function Lz(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function Rz(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function zz(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var Bz=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Vz={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function Hz(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Uz(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Wz(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function Gz(e){return Wz(e)||Hz(e)}var Kz=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function qz(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?Gz:u===`decimal`?Hz:Uz;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&Bz.includes(y)&&(_=y,v=AM(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?AM(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):Gz(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(Jz(e))h(7,S),C=`�`;else if(e in Vz)h(6,S),C=Vz[e];else{let t=``;Yz(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,Kz[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Jz(e){return e>=55296&&e<=57343||e>1114111}function Yz(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var Xz=/["&'<>`]/g,Zz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qz=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$z=/[|\\{}()[\]^$+*?.]/g,eB=new WeakMap;function tB(e,t){if(e=e.replace(t.subset?nB(t.subset):Xz,r),t.subset||t.escapeOnly)return e;return e.replace(Zz,n).replace(Qz,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function nB(e){let t=eB.get(e);return t||(t=rB(e),eB.set(e,t)),t}function rB(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace($z,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var iB=/[\dA-Fa-f]/;function aB(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!iB.test(String.fromCharCode(t))?r:r+`;`}var oB=/\d/;function sB(e,t,n){let r=`&#`+String(e);return n&&t&&!oB.test(String.fromCharCode(t))?r:r+`;`}var cB={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},lB=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],uB={}.hasOwnProperty,dB={},fB;for(fB in cB)uB.call(cB,fB)&&(dB[cB[fB]]=fB);var pB=/[^\dA-Za-z]/;function mB(e,t,n,r){let i=String.fromCharCode(e);if(uB.call(dB,i)){let e=dB[i],a=`&`+e;return n&&Bz.includes(e)&&!lB.includes(e)&&(!r||t&&t!==61&&pB.test(String.fromCharCode(t)))?a:a+`;`}return``}function hB(e,t,n){let r=aB(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=mB(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=sB(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function gB(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function _B(e,t){return tB(e,Object.assign({format:hB},t))}function vB(e,t){return tB(e,Object.assign({format:gB},t))}var yB=` `;function bB(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new bm("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new bm(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new bm("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=qz(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new bm("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+gm(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new bm("Expected a closing tag for `"+S(r)+"` ("+gm({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new bm("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+gm(t.end)+") or another opening tag after the start of `"+t.type+"` ("+gm(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function xB(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=TB,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=wB(CB(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&bA(e,n)>bA(e,o)?o:n;s=t+vB(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+yB+m[e];b+=y.move(`
188
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function iL(e){let t={constructs:HM([GI,...(e||{}).extensions||[]]),content:n(jI),defined:[],document:n(NI),flow:n(LI),lazy:{},string:n(BI),text:n(VI)};return t;function n(e){return n;function n(n){return tL(t,e,n)}}}function aL(e){for(;!qN(e););return e}var oL=/[\0\t\n\r]/g;function sL(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(oL.lastIndex=u,c=oL.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var cL={}.hasOwnProperty;function lL(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),uL(n)(aL(iL(n).document().write(sL()(e,t,!0))))}function uL(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ee),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Se),blockQuote:a(_e),characterEscape:T,characterReference:T,codeFenced:a(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ve,o),codeText:a(ye,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(be),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(xe),hardBreakEscape:a(Ce),hardBreakTrailing:a(Ce),htmlFlow:a(we,o),htmlFlowData:T,htmlText:a(we,o),htmlTextData:T,image:a(Te),label:o,link:a(Ee),listItem:a(Oe),listItemValue:f,listOrdered:a(De,d),listUnordered:a(De),paragraph:a(ke),reference:ue,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Se),strong:a(Ae),thematicBreak:a(je)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ge,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:me,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:oe,labelText:ae,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:de,resourceDestinationString:se,resourceTitleString:ce,resource:le,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};fL(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];cL.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||mL).call(a,void 0,e[0])}for(r.position={start:dL(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:dL(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:dL(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||mL).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+gm({start:e.start,end:e.end})+`): it’s not open`);n.position.end=dL(e.end)}function u(){return ek(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=SA(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=k(),n.position={start:dL(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=dL(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=dL(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=rM(t),n.identifier=SA(t).toLowerCase()}function oe(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function le(){this.data.inReference=void 0}function ue(){this.data.referenceType=`collapsed`}function de(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=SA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function fe(e){this.data.characterReferenceType=e.type}function pe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=tM(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=eM(t);let i=this.stack[this.stack.length-1];i.value+=r}function me(e){let t=this.stack.pop();t.position.end=dL(e.end)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ge(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function _e(){return{type:`blockquote`,children:[]}}function ve(){return{type:`code`,lang:null,meta:null,value:``}}function ye(){return{type:`inlineCode`,value:``}}function be(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function xe(){return{type:`emphasis`,children:[]}}function Se(){return{type:`heading`,depth:0,children:[]}}function Ce(){return{type:`break`}}function we(){return{type:`html`,value:``}}function Te(){return{type:`image`,title:null,url:``,alt:null}}function Ee(){return{type:`link`,title:null,url:``,children:[]}}function De(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Oe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ke(){return{type:`paragraph`,children:[]}}function Ae(){return{type:`strong`,children:[]}}function k(){return{type:`text`,value:``}}function je(){return{type:`thematicBreak`}}}function dL(e){return{line:e.line,column:e.column,offset:e.offset}}function fL(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?fL(e,r):pL(e,r)}}function pL(e,t){let n;for(n in t)if(cL.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function mL(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+gm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+gm({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+gm({start:t.start,end:t.end})+`) is still open`)}function hL(e){let t=this;t.parser=n;function n(n){return lL(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function gL(){return{enter:{mdxFlowExpression:vL,mdxTextExpression:yL},exit:{mdxFlowExpression:bL,mdxFlowExpressionChunk:xL,mdxTextExpression:bL,mdxTextExpressionChunk:xL}}}function _L(){return{handlers:{mdxFlowExpression:SL,mdxTextExpression:SL},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function vL(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function yL(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function bL(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function xL(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function SL(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var CL=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),wL={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function TL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function EL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function DL(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function OL(e){return DL(e)||TL(e)}var kL=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function AL(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?OL:u===`decimal`?TL:EL;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&CL.includes(y)&&(_=y,v=eM(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?eM(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):OL(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(jL(e))h(7,S),C=`�`;else if(e in wL)h(6,S),C=wL[e];else{let t=``;ML(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,kL[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function jL(e){return e>=55296&&e<=57343||e>1114111}function ML(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var NL=/["&'<>`]/g,PL=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,FL=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,IL=/[|\\{}()[\]^$+*?.]/g,LL=new WeakMap;function RL(e,t){if(e=e.replace(t.subset?zL(t.subset):NL,r),t.subset||t.escapeOnly)return e;return e.replace(PL,n).replace(FL,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function zL(e){let t=LL.get(e);return t||(t=BL(e),LL.set(e,t)),t}function BL(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(IL,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var VL=/[\dA-Fa-f]/;function HL(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!VL.test(String.fromCharCode(t))?r:r+`;`}var UL=/\d/;function WL(e,t,n){let r=`&#`+String(e);return n&&t&&!UL.test(String.fromCharCode(t))?r:r+`;`}var GL={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},KL=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],qL={}.hasOwnProperty,JL={},YL;for(YL in GL)qL.call(GL,YL)&&(JL[GL[YL]]=YL);var XL=/[^\dA-Za-z]/;function ZL(e,t,n,r){let i=String.fromCharCode(e);if(qL.call(JL,i)){let e=JL[i],a=`&`+e;return n&&CL.includes(e)&&!KL.includes(e)&&(!r||t&&t!==61&&XL.test(String.fromCharCode(t)))?a:a+`;`}return``}function QL(e,t,n){let r=HL(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ZL(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=WL(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function $L(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function eR(e,t){return RL(e,Object.assign({format:QL},t))}function tR(e,t){return RL(e,Object.assign({format:$L},t))}var nR=` `;function rR(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new bm("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new bm(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new bm("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=AL(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new bm("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+gm(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new bm("Expected a closing tag for `"+S(r)+"` ("+gm({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new bm("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+gm(t.end)+") or another opening tag after the start of `"+t.type+"` ("+gm(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function iR(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=cR,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=sR(oR(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&Wk(e,n)>Wk(e,o)?o:n;s=t+tR(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+nR+m[e];b+=y.move(`
198
189
  `+m.join(`
199
190
  `)+`
200
191
  `+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
201
- `),b+=y.move(SB(e,s,y.current())),b+=y.move(`
202
- `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function SB(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=wB(CB(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
192
+ `),b+=y.move(aR(e,s,y.current())),b+=y.move(`
193
+ `))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function aR(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=sR(oR(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
203
194
  `,after:`
204
195
  `,...a.current()},u=t.handle(n,e,t,l),d=n.type===`mdxJsxFlowElement`?u:t.indentLines(u,function(e,t,n){return(n?``:o)+e});s.push(a.move(d)),n.type!==`list`&&(t.bulletLastUsed=void 0),c<i.length-1&&s.push(a.move(`
205
196
 
206
- `))}return r.pop(),s.join(``)}function CB(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function wB(e){return yB.repeat(e)}function TB(){return`<`}function EB(){return{enter:{mdxjsEsm:OB},exit:{mdxjsEsm:kB,mdxjsEsmData:AB}}}function DB(){return{handlers:{mdxjsEsm:jB}}}function OB(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function kB(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function AB(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function jB(e){return e.value||``}function MB(){return[Nz(),bB(),EB()]}function NB(e){return{extensions:[Pz(),xB(e),DB()]}}function PB(e){return e}var FB={}.hasOwnProperty,IB=Symbol(`continue`),LB=Symbol(`exit`),RB=Symbol(`skip`);function zB(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return VB(e)&&(s.displayName=`node (`+PB(e.type)+`)`),s;function s(){let s=n?BB(n(e,t,a,o)):[];if(s[0]===LB)return s;if(s[0]!==RB){let t;for(t in e)if(FB.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(VB(r)){let e=i(r,t,a,n)();if(e[0]===LB)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(VB(r)){let e=i(r,t,void 0,n)();if(e[0]===LB)return e}}}return r?BB(r(e,t,a,o)):s}}}function BB(e){return Array.isArray(e)?e:typeof e==`number`?[IB,e]:[e]}function VB(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function HB(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=WB(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&UB(m);if(g&&!t.allowEmpty)throw new bm(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(UB(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,zB(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=GB(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function UB(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function WB(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=KB(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function GB(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function KB(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
197
+ `))}return r.pop(),s.join(``)}function oR(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function sR(e){return nR.repeat(e)}function cR(){return`<`}function lR(){return{enter:{mdxjsEsm:dR},exit:{mdxjsEsm:fR,mdxjsEsmData:pR}}}function uR(){return{handlers:{mdxjsEsm:mR}}}function dR(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function fR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function pR(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function mR(e){return e.value||``}function hR(){return[gL(),rR(),lR()]}function gR(e){return{extensions:[_L(),iR(e),uR()]}}function _R(e){return e}var vR={}.hasOwnProperty,yR=Symbol(`continue`),bR=Symbol(`exit`),xR=Symbol(`skip`);function SR(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return wR(e)&&(s.displayName=`node (`+_R(e.type)+`)`),s;function s(){let s=n?CR(n(e,t,a,o)):[];if(s[0]===bR)return s;if(s[0]!==xR){let t;for(t in e)if(vR.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(wR(r)){let e=i(r,t,a,n)();if(e[0]===bR)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(wR(r)){let e=i(r,t,void 0,n)();if(e[0]===bR)return e}}}return r?CR(r(e,t,a,o)):s}}}function CR(e){return Array.isArray(e)?e:typeof e==`number`?[yR,e]:[e]}function wR(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function TR(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=DR(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&ER(m);if(g&&!t.allowEmpty)throw new bm(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(ER(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,SR(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=OR(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function ER(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function DR(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=kR(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function OR(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function kR(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
207
198
  `;break;case-3:a=`\r
208
- `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function qB(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=JB(n.start,r[0]||t.start),a=JB(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function JB(e,t){if(e&&typeof e==`object`){let n=`line`in e?YB(e.line):void 0,r=`column`in e?YB(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:YB(t)}}}function YB(e){return typeof e==`number`&&e>-1?e:void 0}var XB=2,ZB=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,QB=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,$B=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,eV=`#unexpected-type-in-code-expected-an-object-spread-spread`,tV=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,nV=`#could-not-parse-expression-with-acorn`;function rV(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new bm("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=ZB+QB,e}if(X(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?iV.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||X(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new bm("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=ZB+$B,e}return Q(t)?$(e,_,`linePrefix`,XB+1)(t):_(t)}}function iV(e,t,n,r,i,a,o){let s=HB(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=qB(e),n=new bm("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=ZB+eV,n}if(e.expression.properties[1]){let t=new bm(`Unexpected extra content in spread: only a single spread is supported`,{place:qB(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=ZB+tV,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=qB(e.expression.properties[0]),n=new bm("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=ZB+eV,n}}if(s.error){let e=new bm(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=ZB+nV,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function aV(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return rV.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||X(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return rV.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var oV=/[$_\p{ID_Start}]/u,sV=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,cV=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,lV={};function uV(e){return e?oV.test(String.fromCodePoint(e)):!1}function dV(e,t){let n=(t||lV).jsx?cV:sV;return e?n.test(String.fromCodePoint(e)):!1}var fV=`https://github.com/micromark/micromark-extension-mdx-jsx`;function pV(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,te,ne,re){let ie=this,O,ae;return oe;function oe(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),se}function se(e){return Z(e)?n(e):(O=ce,k(e))}function ce(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),O=le,k;if(t===62)return Ae(t);if(t!==null&&t>=0&&uV(t))return e.enter(d),e.enter(f),e.consume(t),ue;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function le(t){if(t===62)return Ae(t);if(t!==null&&t>=0&&uV(t))return e.enter(d),e.enter(f),e.consume(t),ue;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ue(t){if(t!==null&&t>=0&&dV(t,{jsx:!0}))return e.consume(t),ue;if(t===46||t===47||t===58||t===62||t===123||Z(t)||kA(t))return e.exit(f),O=de,k(t);Ne(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function de(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,k;if(t===58)return e.enter(h),e.consume(t),e.exit(h),O=he,k;if(t===47||t===62||t===123||t!==null&&t>=0&&uV(t))return e.exit(d),ve(t);Ne(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(t){if(t!==null&&t>=0&&uV(t))return e.enter(m),e.consume(t),pe;Ne(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(t){if(t!==null&&t>=0&&dV(t,{jsx:!0}))return e.consume(t),pe;if(t===46||t===47||t===62||t===123||Z(t)||kA(t))return e.exit(m),O=me,k(t);Ne(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,k;if(t===47||t===62||t===123||t!==null&&t>=0&&uV(t))return e.exit(d),ve(t);Ne(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&uV(t))return e.enter(g),e.consume(t),ge;Ne(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&dV(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||Z(t)||kA(t))return e.exit(g),O=_e,k(t);Ne(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&uV(t))return e.exit(d),ve(t);Ne(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),O=ke,k;if(t===62)return Ae(t);if(t===123)return rV.call(ie,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&uV(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Ne(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return O=ve,k(e)}function be(t){if(t!==null&&t>=0&&dV(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||Z(t)||kA(t))return e.exit(S),O=xe,k(t);Ne(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),O=Se,k;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),O=Te,k;if(t===47||t===62||t===123||Z(t)||kA(t)||t!==null&&t>=0&&uV(t))return e.exit(x),e.exit(b),O=ve,k(t);Ne(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&uV(t))return e.enter(w),e.consume(t),Ce;Ne(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&dV(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||Z(t)||kA(t))return e.exit(w),e.exit(x),O=we,k(t);Ne(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),O=Te,k;if(t===47||t===62||t===123||t!==null&&t>=0&&uV(t))return e.exit(b),ve(t);Ne(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),ae=t,De;if(t===123)return rV.call(ie,e,Ee,te,ne,re,r,i,a,!1,!1,o)(t);Ne(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Ee(t){return e.exit(b),O=ve,k(t)}function De(t){return t===null&&Ne(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ae)+"`"),t===ae?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),ae=void 0,O=ve,k):X(t)?(O=De,k(t)):(e.enter(D),Oe(t))}function Oe(t){return t===null||t===ae||X(t)?(e.exit(D),De(t)):(e.consume(t),Oe)}function ke(e){if(e===62)return Ae(e);Ne(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ae(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function k(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Me):Q(t)||kA(t)?(e.enter(`esWhitespace`),je(t)):O(t)}function je(t){return X(t)?(e.exit(`esWhitespace`),k(t)):Q(t)||kA(t)?(e.consume(t),je):(e.exit(`esWhitespace`),O(t))}function Me(e){if(!o&&ie.parser.lazy[ie.now().line]){let e=new bm("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ie.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=fV+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return k(e)}function Ne(e,t,n){let r=new bm(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+mV(e)+`)`)+` `+t+`, expected `+n,ie.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=fV+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function mV(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function hV(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return pV.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function gV(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return pV.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Q(e)?$(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||X(e)?r(e):i(e)}}}function _V(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:gV(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:hV(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function vV(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function yV(){return vN([aV(),_V(),vV()])}var bV=yV(),xV=MB(),SV=NB();function CV(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===bV)||t.push(bV);let n=e.fromMarkdownExtensions;n.some(e=>e===xV)||n.push(xV);let r=e.toMarkdownExtensions;r.some(e=>e===SV)||r.push(SV)}var wV=91,TV=93,EV=124,DV=35,OV={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===wV?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===wV?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===wV?n(t):t===TV?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===DV?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===EV?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===wV?n(t):t===TV?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===EV?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===wV?n(t):t===TV?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===TV?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===TV?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}};function kV(){return{text:{[wV]:OV}}}function AV(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function jV(e){return e.stack[e.stack.length-1]}function MV(e){let t=jV(this);t.data.target=this.sliceSerialize(e).trim()}function NV(e){let t=jV(this),n=this.sliceSerialize(e).trim();t.data.anchor=n.length?n:null}function PV(e){let t=jV(this),n=this.sliceSerialize(e).trim();t.data.alias=n.length?n:null}function FV(e){let t=jV(this),{target:n,anchor:r,alias:i}=t.data,a=i||(r?`${n}#${r}`:n);t.value=a,t.children=[{type:`text`,value:a}],this.exit(e)}var IV={enter:{wikiLink:AV},exit:{wikiLinkTarget:MV,wikiLinkAnchor:NV,wikiLinkAlias:PV,wikiLink:FV}},LV={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},RV=kV();function zV(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===RV)||e.micromarkExtensions.push(RV),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===IV)||e.fromMarkdownExtensions.push(IV),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===LV)||e.toMarkdownExtensions.push(LV)}function BV(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`&&t!==`footnoteDefinition`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}function VV(e){let t=lI().use(oz).use(xR,[`yaml`]).use(CV).use(eI).use(zV).use(Cz).use(Mz).use(()=>BV).use(ML,{schema:e.schema,handlers:e.handlers});return t.freeze(),t}function HV(e){let t=lI().use(xR,[`yaml`]).use(eI).use(CV).use(zV).use(tI,{bullet:`-`,fences:!0,rule:`-`,...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function UV(e,t){let n=new rD(xz(e)),r=t.parse(n);n.value=e;let i=t.runSync(r,n);return t.stringify(i)}function WV(e,t){let n=new rD(xz(e)),r=t.parse(n);return n.value=e,t.runSync(r,n)}function GV(e,t,n){let r=PL(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});return String(t.stringify(r))}var KV={text(e,t,n,r){if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=YV(n,t.slice(o,e),r)),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=YV(n,t.slice(o),r)),a}return YV(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=n.containerPhrasing(e,{before:s,after:i,...a.current()}),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=n.containerPhrasing(e,{before:s,after:i,...a.current()}),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(qV(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`![`);s+=i.move(n.safe(e.alt??``,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(qV(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},thematicBreak(e,t,n){let r=e.data?.sourceRaw;return Array.isArray(n?.indexStack)&&n.indexStack.length===1&&n.indexStack[0]===0&&(!r||/^-[-\s]*-\s*$/.test(r))?`***`:r??`---`},break(e){return e.data?.sourceStyle===`backslash`?`\\
209
- `:`
210
- `},code(e){let t=e.data?.sourceFenceChar===`~`?`~`:"`",n=Math.max(3,e.data?.sourceFenceLength??3),r=t.repeat(n);return`${r}${e.lang??``}${e.meta?` ${e.meta}`:``}\n${e.value??``}\n${r}`},heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
211
- `,after:`
212
- `});return`${t}\n${(a===1?`=`:`-`).repeat(Math.max(t.length,3))}`}let o=`#`.repeat(a),s=n.containerPhrasing(e,{...r,before:`${o} `,after:`
213
- `});return s?`${o} ${s}`:o},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=a?`${d+t}${u}`:e.data?.bulletMarker??i,f=s;o.checked===!0?f+=` [x]`:o.checked===!1&&(f+=` [ ]`);let p=` `.repeat(s.length+1),m=n.containerFlow(o,r).split(`
214
- `).map((e,t)=>t===0?`${f} ${e}`:e&&`${p}${e}`).join(`
215
- `);l.push(m)}n.bulletCurrent=o,n.bulletLastUsed=s;let f=e.spread?`
216
-
217
- `:`
218
- `;return l.join(f)},mdxJsxFlowElement(e){let t=e.data?.sourceRaw;return typeof t==`string`?t:`<${e.name??``}/>`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;return typeof t==`string`?t:`<${e.name??``}/>`},rawMdxFallback(e){return e.value??``}};function qV(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function JV(e){return e.replace(/(?<!\\)&(?=[A-Za-z][A-Za-z0-9]*;|#[0-9]+;|#[xX][0-9A-Fa-f]+;)/g,`\\&`)}function YV(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return JV(i)}var XV=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;constructor(e){this.schema=$d(e.extensions),this.handlers=eH(this.schema);let{nodeHandlers:t,markHandlers:n}=tH(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=VV({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=HV({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers,toMarkdownHandlers:KV})}parse(e){return e.trim()?UV(e,this.parseProcessor).toJSON():{type:`doc`,content:[{type:`paragraph`,content:[]}]}}parseToMdast(e){return e.trim()?WV(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e){return e.trim()?GL(e,{parse:e=>this.parse(e)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return GV(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}};function ZV(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function QV(e){if(e.length===0)return{type:`inlineCode`,value:``};if(e.every(e=>e.type===`text`))return{type:`inlineCode`,value:e.map(e=>e.value).join(``)};if(e.length===1&&`children`in e[0]){let t=e[0];return{...t,children:[QV(t.children)]}}return{type:`inlineCode`,value:$V(e)}}function $V(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=$V(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}function eH(e){let t=e.nodes,n=e.marks,r={};t.paragraph&&(r.paragraph=(e,n,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),n=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=t.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...n),r.length===1?r[0]:r}return t.paragraph.createAndFill(null,i.length>0?i:null)}),t.blockquote&&(r.blockquote=kL(t.blockquote)),t.table&&(r.table=kL(t.table)),t.tableRow&&(r.tableRow=kL(t.tableRow)),t.tableCell&&(r.tableCell=(e=>(n,r,i)=>{let a=i.all(n).flat();if(a.length>0&&t.paragraph){let n=t.paragraph.create(null,a);return e.createAndFill(null,[n])}return e.createAndFill(null,null)})(t.tableCell),t.tableHeader),t.image&&(r.image=e=>t.image.createAndFill({src:e.url??``,alt:e.alt??null,title:e.title??null}),r.imageReference=e=>t.image.createAndFill({src:``,alt:e.alt??null,title:null})),n.escapeMark&&(r.text=t=>{let r=t.value??``;if(!r)return null;let i=t.data?.escapedChars;if(!i?.length)return e.text(r.replaceAll(`\xA0`,` `));let a=[],o=0;for(let{offset:t}of i){if(t>o){let n=r.slice(o,t).replaceAll(`\xA0`,` `);n&&a.push(e.text(n))}if(t<r.length){let i=r[t].replaceAll(`\xA0`,` `);a.push(e.text(i,[n.escapeMark.create()])),o=t+1}}if(o<r.length){let t=r.slice(o).replaceAll(`\xA0`,` `);t&&a.push(e.text(t))}return a.length===1?a[0]:a}),n.code&&(r.inlineCode=t=>e.text(t.value,[n.code.create()]));let i=n.strike??n.delete;i&&(r.delete=AL(i)),n.emphasis&&(r.emphasis=AL(n.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),n.strong&&(r.strong=AL(n.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),t.heading&&(r.heading=kL(t.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`}))),t.codeBlock&&(r.code=n=>{let r=n.value?[e.text(n.value)]:[];return t.codeBlock.createAndFill({language:n.lang??null,meta:n.meta??null,fenceDelimiter:n.data?.sourceFenceChar??"`",fenceLength:n.data?.sourceFenceLength??3},r)}),t.thematicBreak&&(r.thematicBreak=e=>t.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),t.hardBreak&&(r.break=e=>t.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),t.list&&(r.list=kL(t.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),t.listItem&&(r.listItem=kL(t.listItem,e=>({checked:e.checked??null,spread:!!e.spread}))),n.link&&(r.link=AL(n.link,e=>({href:e.url??``,title:e.title??null,linkStyle:e.data?.sourceStyle??`inline`,refLabel:null})),r.linkReference=AL(n.link,e=>({href:``,title:null,linkStyle:e.referenceType??`shortcut`,refLabel:e.label??e.identifier??null}))),t.htmlBlock&&(r.html=e=>t.htmlBlock.createAndFill({content:e.value??``}));let a=t.linkDefinition??t.linkRefDef;if(a){let e=!!a.spec.attrs?.url,t=!!a.spec.attrs?.href,n=!!a.spec.attrs?.identifier;r.definition=r=>{let i={title:r.title??null};return n&&(i.identifier=r.identifier??``),i.label=r.label??r.identifier??``,e?i.url=r.url??``:t&&(i.href=r.url??``),a.createAndFill(i)}}if(t.jsxComponent){let n=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};r.mdxJsxFlowElement=e=>t.jsxComponent.createAndFill({content:n(e.data)??``}),t.jsxInline?r.mdxJsxTextElement=(e,r,i)=>{let a=i.all(e).flat(),o={sourceRaw:n(e.data)??``,attributes:(e.attributes??[]).map(e=>`type`in e&&e.type===`mdxJsxExpressionAttribute`?{type:`spread`,value:e.value}:{type:`attr`,name:e.name,value:e.value})};return t.jsxInline.createAndFill(o,a.length>0?a:null)}:r.mdxJsxTextElement=e=>t.jsxComponent.createAndFill({content:n(e.data)??``}),r.mdxFlowExpression=e=>t.jsxComponent.createAndFill({content:n(e.data)??`{${e.value??``}}`}),r.mdxTextExpression=t=>{let r=n(t.data)??`{${t.value??``}}`;return e.text(r)}}t.wikiLink&&(r.wikiLink=e=>t.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null}));let o=n=>{let r=n.value??n.type;return t.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:n.type,reason:`Unhandled block mdast: ${n.type}`})),t.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${n.type}`},r?[e.text(r)]:null)):null},s=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),e.text(t.value??t.type));return r.math||=o,r.inlineMath||=s,r.footnoteReference||=s,r.rawMdxFallbackMdast=n=>{if(!t.rawMdxFallback)return null;let r=n.position?{start:n.position.start?.offset??0,end:n.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:n.originalType,reason:`Unhandled mdast: ${n.originalType}`})),t.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${n.originalType}`,originalSpan:r},n.value?[e.text(n.value)]:null)},r}function tH(e){let t={},n={},r=e.nodes,i=e.marks;if(r.paragraph&&(t.paragraph=FL(`paragraph`)),r.blockquote&&(t.blockquote=FL(`blockquote`)),r.heading&&(t.heading=FL(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle}}))),r.codeBlock&&(t.codeBlock=e=>({type:`code`,lang:e.attrs.language??null,meta:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength}})),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=FL(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&ZV(r[0])?r.slice(1):r;return{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,children:i}}),r.table&&(t.table=FL(`table`)),r.tableRow&&(t.tableRow=FL(`tableRow`)),r.tableCell&&(t.tableCell=FL(`tableCell`)),r.tableHeader&&(t.tableHeader=FL(`tableCell`)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>({type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title})}if(r.jsxComponent&&(t.jsxComponent=e=>({type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(e.attrs.content??``)}})),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=IL(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=IL(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>QV(n)),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=IL(`delete`)}return i.link&&(n.link=(e,t,n)=>{let r=e.attrs.linkStyle;return r===`autolink`?{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}}:r===`inline`||!r?{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n}:{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data=t.data??{},t.data.escapedChars=t.data.escapedChars??[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),{nodeHandlers:t,markHandlers:n}}var nH=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],rH=/^>|^->|<!--|-->|--!>|<!-$/g,iH=[`>`],aH=[`<`,`>`];function oH(e,t,n,r){return r.settings.bogusComments?`<?`+_B(e.value,Object.assign({},r.settings.characterReferences,{subset:iH}))+`>`:`<!--`+e.value.replace(rH,i)+`-->`;function i(e){return _B(e,Object.assign({},r.settings.characterReferences,{subset:aH}))}}function sH(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var cH=dH(1),lH=dH(-1),uH=[];function dH(e){return t;function t(t,n,r){let i=t?t.children:uH,a=(n||0)+e,o=i[a];if(!r)for(;o&&VD(o);)a+=e,o=i[a];return o}}var fH={}.hasOwnProperty;function pH(e){return t;function t(t,n,r){return fH.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var mH=pH({body:_H,caption:hH,colgroup:hH,dd:xH,dt:bH,head:hH,html:gH,li:yH,optgroup:CH,option:wH,p:vH,rp:SH,rt:SH,tbody:EH,td:kH,tfoot:DH,th:kH,thead:TH,tr:OH});function hH(e,t,n){let r=cH(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&VD(r.value.charAt(0)))}function gH(e,t,n){let r=cH(n,t);return!r||r.type!==`comment`}function _H(e,t,n){let r=cH(n,t);return!r||r.type!==`comment`}function vH(e,t,n){let r=cH(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function yH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&r.tagName===`li`}function bH(e,t,n){let r=cH(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function xH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function SH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function CH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function wH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function TH(e,t,n){let r=cH(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function EH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function DH(e,t,n){return!cH(n,t)}function OH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function kH(e,t,n){let r=cH(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var AH=pH({body:NH,colgroup:PH,head:MH,html:jH,tbody:FH});function jH(e){let t=cH(e,-1);return!t||t.type!==`comment`}function MH(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function NH(e){let t=cH(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&VD(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function PH(e,t,n){let r=lH(n,t),i=cH(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&mH(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function FH(e,t,n){let r=lH(n,t),i=cH(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&mH(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var IH={name:[[`
199
+ `;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function AR(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=jR(n.start,r[0]||t.start),a=jR(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function jR(e,t){if(e&&typeof e==`object`){let n=`line`in e?MR(e.line):void 0,r=`column`in e?MR(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:MR(t)}}}function MR(e){return typeof e==`number`&&e>-1?e:void 0}var NR=2,PR=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,FR=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,IR=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,LR=`#unexpected-type-in-code-expected-an-object-spread-spread`,RR=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,zR=`#could-not-parse-expression-with-acorn`;function BR(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new bm("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=PR+FR,e}if(X(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?VR.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||X(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new bm("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=PR+IR,e}return Q(t)?$(e,_,`linePrefix`,NR+1)(t):_(t)}}function VR(e,t,n,r,i,a,o){let s=TR(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=AR(e),n=new bm("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=PR+LR,n}if(e.expression.properties[1]){let t=new bm(`Unexpected extra content in spread: only a single spread is supported`,{place:AR(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=PR+RR,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=AR(e.expression.properties[0]),n=new bm("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=PR+LR,n}}if(s.error){let e=new bm(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=PR+zR,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function HR(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return BR.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||X(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return BR.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var UR=/[$_\p{ID_Start}]/u,WR=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,GR=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,KR={};function qR(e){return e?UR.test(String.fromCodePoint(e)):!1}function JR(e,t){let n=(t||KR).jsx?GR:WR;return e?n.test(String.fromCodePoint(e)):!1}var YR=`https://github.com/micromark/micromark-extension-mdx-jsx`;function XR(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,D,te,ne,re){let ie=this,O,ae;return oe;function oe(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),se}function se(e){return Z(e)?n(e):(O=ce,k(e))}function ce(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),O=le,k;if(t===62)return Ae(t);if(t!==null&&t>=0&&qR(t))return e.enter(d),e.enter(f),e.consume(t),ue;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function le(t){if(t===62)return Ae(t);if(t!==null&&t>=0&&qR(t))return e.enter(d),e.enter(f),e.consume(t),ue;Ne(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function ue(t){if(t!==null&&t>=0&&JR(t,{jsx:!0}))return e.consume(t),ue;if(t===46||t===47||t===58||t===62||t===123||Z(t)||$k(t))return e.exit(f),O=de,k(t);Ne(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function de(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,k;if(t===58)return e.enter(h),e.consume(t),e.exit(h),O=he,k;if(t===47||t===62||t===123||t!==null&&t>=0&&qR(t))return e.exit(d),ve(t);Ne(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(t){if(t!==null&&t>=0&&qR(t))return e.enter(m),e.consume(t),pe;Ne(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function pe(t){if(t!==null&&t>=0&&JR(t,{jsx:!0}))return e.consume(t),pe;if(t===46||t===47||t===62||t===123||Z(t)||$k(t))return e.exit(m),O=me,k(t);Ne(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function me(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),O=fe,k;if(t===47||t===62||t===123||t!==null&&t>=0&&qR(t))return e.exit(d),ve(t);Ne(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function he(t){if(t!==null&&t>=0&&qR(t))return e.enter(g),e.consume(t),ge;Ne(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function ge(t){if(t!==null&&t>=0&&JR(t,{jsx:!0}))return e.consume(t),ge;if(t===47||t===62||t===123||Z(t)||$k(t))return e.exit(g),O=_e,k(t);Ne(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t===47||t===62||t===123||t!==null&&t>=0&&qR(t))return e.exit(d),ve(t);Ne(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ve(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),O=ke,k;if(t===62)return Ae(t);if(t===123)return BR.call(ie,e,ye,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&qR(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),be;Ne(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(e){return O=ve,k(e)}function be(t){if(t!==null&&t>=0&&JR(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===58||t===61||t===62||t===123||Z(t)||$k(t))return e.exit(S),O=xe,k(t);Ne(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function xe(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),O=Se,k;if(t===61)return e.exit(x),e.enter(T),e.consume(t),e.exit(T),O=Te,k;if(t===47||t===62||t===123||Z(t)||$k(t)||t!==null&&t>=0&&qR(t))return e.exit(x),e.exit(b),O=ve,k(t);Ne(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Se(t){if(t!==null&&t>=0&&qR(t))return e.enter(w),e.consume(t),Ce;Ne(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ce(t){if(t!==null&&t>=0&&JR(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===61||t===62||t===123||Z(t)||$k(t))return e.exit(w),e.exit(x),O=we,k(t);Ne(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===61)return e.enter(T),e.consume(t),e.exit(T),O=Te,k;if(t===47||t===62||t===123||t!==null&&t>=0&&qR(t))return e.exit(b),ve(t);Ne(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t===34||t===39)return e.enter(E),e.enter(ee),e.consume(t),e.exit(ee),ae=t,De;if(t===123)return BR.call(ie,e,Ee,te,ne,re,r,i,a,!1,!1,o)(t);Ne(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function Ee(t){return e.exit(b),O=ve,k(t)}function De(t){return t===null&&Ne(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(ae)+"`"),t===ae?(e.enter(ee),e.consume(t),e.exit(ee),e.exit(E),e.exit(b),ae=void 0,O=ve,k):X(t)?(O=De,k(t)):(e.enter(D),Oe(t))}function Oe(t){return t===null||t===ae||X(t)?(e.exit(D),De(t)):(e.consume(t),Oe)}function ke(e){if(e===62)return Ae(e);Ne(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ae(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function k(t){return X(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Me):Q(t)||$k(t)?(e.enter(`esWhitespace`),je(t)):O(t)}function je(t){return X(t)?(e.exit(`esWhitespace`),k(t)):Q(t)||$k(t)?(e.consume(t),je):(e.exit(`esWhitespace`),O(t))}function Me(e){if(!o&&ie.parser.lazy[ie.now().line]){let e=new bm("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",ie.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=YR+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return k(e)}function Ne(e,t,n){let r=new bm(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+ZR(e)+`)`)+` `+t+`, expected `+n,ie.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=YR+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function ZR(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function QR(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return XR.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function $R(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return XR.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Q(e)?$(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||X(e)?r(e):i(e)}}}function ez(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:$R(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:QR(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function tz(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function nz(){return HM([HR(),ez(),tz()])}var rz=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],iz=/^>|^->|<!--|-->|--!>|<!-$/g,az=[`>`],oz=[`<`,`>`];function sz(e,t,n,r){return r.settings.bogusComments?`<?`+eR(e.value,Object.assign({},r.settings.characterReferences,{subset:az}))+`>`:`<!--`+e.value.replace(iz,i)+`-->`;function i(e){return eR(e,Object.assign({},r.settings.characterReferences,{subset:oz}))}}function cz(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var lz=fz(1),uz=fz(-1),dz=[];function fz(e){return t;function t(t,n,r){let i=t?t.children:dz,a=(n||0)+e,o=i[a];if(!r)for(;o&&dD(o);)a+=e,o=i[a];return o}}var pz={}.hasOwnProperty;function mz(e){return t;function t(t,n,r){return pz.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var hz=mz({body:vz,caption:gz,colgroup:gz,dd:Sz,dt:xz,head:gz,html:_z,li:bz,optgroup:wz,option:Tz,p:yz,rp:Cz,rt:Cz,tbody:Dz,td:Az,tfoot:Oz,th:Az,thead:Ez,tr:kz});function gz(e,t,n){let r=lz(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&dD(r.value.charAt(0)))}function _z(e,t,n){let r=lz(n,t);return!r||r.type!==`comment`}function vz(e,t,n){let r=lz(n,t);return!r||r.type!==`comment`}function yz(e,t,n){let r=lz(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function bz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&r.tagName===`li`}function xz(e,t,n){let r=lz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Sz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Cz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function wz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Tz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Ez(e,t,n){let r=lz(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Dz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Oz(e,t,n){return!lz(n,t)}function kz(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Az(e,t,n){let r=lz(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var jz=mz({body:Pz,colgroup:Fz,head:Nz,html:Mz,tbody:Iz});function Mz(e){let t=lz(e,-1);return!t||t.type!==`comment`}function Nz(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Pz(e){let t=lz(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&dD(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Fz(e,t,n){let r=uz(n,t),i=lz(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&hz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Iz(e,t,n){let r=uz(n,t),i=lz(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&hz(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Lz={name:[[`
219
200
  \f\r &/=>`.split(``),`
220
201
  \f\r "&'/=>\``.split(``)],[`\0
221
202
  \f\r "&'/<=>`.split(``),`\0
@@ -223,18 +204,37 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
223
204
  \f\r &>`.split(``),`\0
224
205
  \f\r "&'<=>\``.split(``)],[`\0
225
206
  \f\r "&'<=>\``.split(``),`\0
226
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function LH(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=oS);let l=RH(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!AH(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!mH(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function RH(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=zH(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function zH(e,t,n){let r=nS(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=_B(r.attribute,Object.assign({},e.settings.characterReferences,{subset:IH.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?cS:fS)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=_B(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:IH.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&bA(n,o)>bA(n,e.alternative)&&(o=e.alternative),s=o+_B(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?IH.single:IH.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var BH=[`<`,`&`];function VH(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:_B(e.value,Object.assign({},r.settings.characterReferences,{subset:BH}))}function HH(e,t,n,r){return r.settings.allowDangerousHtml?e.value:VH(e,t,n,r)}function UH(e,t,n,r){return r.all(e)}var WH=Tj(`type`,{invalid:GH,unknown:KH,handlers:{comment:oH,doctype:sH,element:LH,raw:HH,root:UH,text:VH}});function GH(e){throw Error("Expected node, not `"+e+"`")}function KH(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var qH={},JH={},YH=[];function XH(e,t){let n=t||qH,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ZH,all:QH,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||nH,characterReferences:n.characterReferences||JH,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?oS:aS,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ZH(e,t,n){return WH(e,t,n,this)}function QH(e){let t=[],n=e&&e.children||YH,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function $H(e){let t=this,n={...t.data(`settings`),...e};t.compiler=r;function r(e){return XH(e,n)}}function eU(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function tU(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
227
- `}]}function nU(e,t){let n=t.value?t.value+`
228
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function rU(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iU(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aU(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=GN(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function oU(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sU(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cU(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function lU(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cU(e,t);let i={src:GN(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function uU(e,t){let n={src:GN(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function dU(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function fU(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cU(e,t);let i={href:GN(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function pU(e,t){let n={href:GN(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mU(e,t,n){let r=e.all(t),i=n?hU(n):gU(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
207
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Rz(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Ax);let l=zz(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!jz(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!hz(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function zz(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Bz(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Bz(e,t,n){let r=Ex(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=eR(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Lz.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Mx:Ix)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=eR(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Lz.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Wk(n,o)>Wk(n,e.alternative)&&(o=e.alternative),s=o+eR(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Lz.single:Lz.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Vz=[`<`,`&`];function Hz(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:eR(e.value,Object.assign({},r.settings.characterReferences,{subset:Vz}))}function Uz(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Hz(e,t,n,r)}function Wz(e,t,n,r){return r.all(e)}var Gz=YA(`type`,{invalid:Kz,unknown:qz,handlers:{comment:sz,doctype:cz,element:Rz,raw:Uz,root:Wz,text:Hz}});function Kz(e){throw Error("Expected node, not `"+e+"`")}function qz(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Jz={},Yz={},Xz=[];function Zz(e,t){let n=t||Jz,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Qz,all:$z,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||rz,characterReferences:n.characterReferences||Yz,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Ax:kx,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Qz(e,t,n){return Gz(e,t,n,this)}function $z(e){let t=[],n=e&&e.children||Xz,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function eB(e){let t=this,n={...t.data(`settings`),...e};t.compiler=r;function r(e){return Zz(e,n)}}function tB(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nB(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
208
+ `}]}function rB(e,t){let n=t.value?t.value+`
209
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function iB(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aB(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oB(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=hN(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function sB(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cB(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function lB(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function uB(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lB(e,t);let i={src:hN(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function dB(e,t){let n={src:hN(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function fB(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function pB(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return lB(e,t);let i={href:hN(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function mB(e,t){let n={href:hN(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hB(e,t,n){let r=e.all(t),i=n?gB(n):_B(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
229
210
  `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
230
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function hU(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=gU(n[r])}return t}function gU(e){return e.spread??e.children.length>1}function _U(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function vU(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yU(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bU(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xU(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=wO(t.children[1]),o=CO(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function SU(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function CU(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wU(e,t){let n={type:`text`,value:vL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function TU(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var EU={blockquote:eU,break:tU,code:nU,delete:rU,emphasis:iU,footnoteReference:aU,heading:oU,html:sU,imageReference:lU,image:uU,inlineCode:dU,linkReference:fU,link:pU,listItem:mU,list:_U,paragraph:vU,root:yU,strong:bU,table:xU,tableCell:CU,tableRow:SU,text:wU,thematicBreak:TU,toml:DU,yaml:DU,definition:DU,footnoteDefinition:DU};function DU(){}function OU(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function kU(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function AU(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||OU,r=e.options.footnoteBackLabel||kU,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=GN(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...jD(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
211
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function gB(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=_B(n[r])}return t}function _B(e){return e.spread??e.children.length>1}function vB(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function yB(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bB(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xB(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SB(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=JD(t.children[1]),o=qD(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function CB(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function wB(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TB(e,t){let n={type:`text`,value:GF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function EB(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var DB={blockquote:tB,break:nB,code:rB,delete:iB,emphasis:aB,footnoteReference:oB,heading:sB,html:cB,imageReference:uB,image:dB,inlineCode:fB,linkReference:pB,link:mB,listItem:hB,list:vB,paragraph:yB,root:bB,strong:xB,table:SB,tableCell:wB,tableRow:CB,text:TB,thematicBreak:EB,toml:OB,yaml:OB,definition:OB,footnoteDefinition:OB};function OB(){}function kB(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function AB(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function jB(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||kB,r=e.options.footnoteBackLabel||AB,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=hN(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...tD(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
231
212
  `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
232
- `}]}}var jU={}.hasOwnProperty,MU={};function NU(e,t){let n=t||MU,r=new Map,i=new Map,a={all:s,applyData:FU,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...EU,...n.handlers},one:o,options:n,patch:PU,wrap:LU};return SO(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(jU.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=jD(n);return r.children=a.all(e),r}return jD(e)}return(a.options.unknownHandler||IU)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=RU(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=RU(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function PU(e,t){e.position&&(t.position=EO(e))}function FU(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,jD(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function IU(e,t){let n=t.data||{},r=`value`in t&&!(jU.call(n,`hProperties`)||jU.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 LU(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
213
+ `}]}}var MB={}.hasOwnProperty,NB={};function PB(e,t){let n=t||NB,r=new Map,i=new Map,a={all:s,applyData:IB,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...DB,...n.handlers},one:o,options:n,patch:FB,wrap:RB};return KD(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(MB.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=tD(n);return r.children=a.all(e),r}return tD(e)}return(a.options.unknownHandler||LB)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=zB(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=zB(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function FB(e,t){e.position&&(t.position=XD(e))}function IB(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,tD(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function LB(e,t){let n=t.data||{},r=`value`in t&&!(MB.call(n,`hProperties`)||MB.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 RB(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
233
214
  `});++r<e.length;)r&&n.push({type:`text`,value:`
234
215
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
235
- `}),n}function RU(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function zU(e,t){let n=NU(e,t),r=n.one(e,void 0),i=AU(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
236
- `},i)),a}function BU(e,t){return e&&`run`in e?async function(n,r){let i=zU(n,{file:r,...t});await e.run(i,r)}:function(n,r){return zU(n,{file:r,...e||t})}}var VU=/\p{M}+/gu,HU=/[^\p{L}\p{N}]+/gu,UU=/^-+|-+$/g;function WU(e){return e.trim().normalize(`NFKD`).replace(VU,``).toLowerCase().replace(HU,`-`).replace(UU,``)}function GU(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function KU(e,t){let n=WU(e);return n?GU(n,t):``}function qU(e,t){let n=WU(e);return t?`#${n}-${WU(t)}`:`#${n}`}var JU={wikiLink:(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:qU(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},mdxJsxFlowElement:(e,t)=>{let n=t,r={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,r),e.applyData(t,r)},mdxJsxTextElement:(e,t)=>{let n=t,r={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`]},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,r),e.applyData(t,r)},rawMdxFallback:(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a={type:`comment`,value:` Parse error: ${r.replace(/--/g,`—`)} `},o={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,o),[a,e.applyData(t,o)]}},YU=/^(https?:|mailto:|tel:|ftp:|sms:|\/|#|\?|\.\/|\.\.\/)/i;function XU(e){let t=e.trim();return t===``?!0:YU.test(t)}var ZU=()=>e=>{SO(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(n){if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!XU(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!XU(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!XU(e)&&delete n.action}}})};function QU(e){let t=lI().use(oz).use(xR,[`yaml`]).use(CV).use(eI).use(zV).use(BU,{handlers:JU}).use(ZU).use($H);return String(t.processSync(e))}var $U=t(n(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var ee=-b+v;ee<=b-y;ee+=2){for(var T=l+ee,E=ee==-b||ee!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,D=E-ee;E<o&&D<s&&e.charAt(o-E-1)==t.charAt(s-D-1);)E++,D++;if(f[T]=E,E>o)y+=2;else if(D>s)v+=2;else if(!h){var S=l+m-ee;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
216
+ `}),n}function zB(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function BB(e,t){let n=PB(e,t),r=n.one(e,void 0),i=jB(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
217
+ `},i)),a}function VB(e,t){return e&&`run`in e?async function(n,r){let i=BB(n,{file:r,...t});await e.run(i,r)}:function(n,r){return BB(n,{file:r,...e||t})}}var HB=t(n(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var ee=-b+v;ee<=b-y;ee+=2){for(var T=l+ee,E=ee==-b||ee!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,D=E-ee;E<o&&D<s&&e.charAt(o-E-1)==t.charAt(s-D-1);)E++,D++;if(f[T]=E,E>o)y+=2;else if(D>s)v+=2;else if(!h){var S=l+m-ee;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
237
218
  `,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``;break}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&amp;`).replace(o,`&lt;`).replace(s,`&gt;`).replace(c,`&para;<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`;break}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0;break}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length;break}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p);break}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
238
219
  `),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
239
220
  `],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `;break}n[s+1]=o+encodeURI(this.diffs[s][1])+`
240
- `}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}))(),1);new $U.default,new $U.default;var eW=new $U.default;eW.Match_Threshold=.5;var tW=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function nW(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??rW,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new tW(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function rW(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function iW(){let e=!1,t=``,n=0;return r=>{let i=aW(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function aW(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var oW=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],sW={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},cW={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},lW=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function uW(e){let t=0;for(let n of e)t=(t<<5)-t+n.charCodeAt(0)|0;return oW[Math.abs(t)%oW.length]}var dW={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,copilot:`github`,cline:`cline`};function fW(e){return e?dW[e]??`bot`:`bot`}function pW(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function mW(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function hW(e){let[t]=pW(e);return mW(t,45,32)}var gW=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],_W=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],vW=`ok-user-name-v2`,yW=`ok-user-color-v2`;function bW(e){return e[Math.floor(Math.random()*e.length)]}function xW(){return`${bW(gW)} ${bW(_W)}`}function SW(){return bW(lW)}function CW(e){try{return localStorage.getItem(e)}catch{return null}}function wW(e,t){try{localStorage.setItem(e,t)}catch{}}function TW(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=CW(vW),r=CW(yW);return n||(n=xW(),wW(vW,n)),r||(r=SW(),wW(yW,r)),{name:n,color:r,coeditor:e,tabId:t}}function EW(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`/`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=o.endsWith(`.md`)?o.slice(0,-3):o,c=t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(e);return c.length===0?null:{docName:c.join(`/`),anchor:a||null}}var DW=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function OW(e){return e.split(`/`).filter(Boolean)}function kW(e){let t=e.trim();return DW.test(t)||t.startsWith(`//`)}function AW(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}let r=EW(n,t);return r?{kind:`doc`,docName:r.docName,anchor:r.anchor}:n.startsWith(`/`)||kW(n)?{kind:`external`,url:n}:null}function jW(e,t){let n=e.trim();return n?kW(n)?{kind:`external`,url:t?`${n}#${t}`:n}:{kind:`doc`,docName:n,anchor:t?.trim()||null}:null}function MW(e,t,n=null){let r=OW(e);r.pop();let i=OW(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function NW(e){if(!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`?`),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function PW(e,t){let n=`#/${e}`;return t?`${n}?anchor=${encodeURIComponent(t)}`:n}var FW=null,IW=new Set;function LW(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function RW(e,t){return e===null?!1:e===t?!0:LW(e.pages,t.pages)&&LW(e.folderPaths,t.folderPaths)}function zW(){return FW}function BW(e){if(!RW(FW,e)){FW=e;for(let t of[...IW])try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function VW(e){if(IW.add(e),FW!==null)try{e(FW)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{IW.delete(e)}}var HW=`open-knowledge:documents-changed`;function UW(e){return[...new Set(e)]}function WW(e=[`files`]){window.dispatchEvent(new CustomEvent(HW,{detail:{channels:UW(e)}}))}function GW(e){let t=t=>{e((t instanceof CustomEvent?t.detail?.channels:void 0)??[`files`])};return window.addEventListener(HW,t),()=>window.removeEventListener(HW,t)}var KW=i(),qW=(0,nm.createContext)(null);function JW(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function YW(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function XW(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function ZW(){let e=await fetch(`/api/pages`);if(!e.ok)throw Error(`/api/pages responded with ${e.status}`);let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}function QW(e){console.error(`[PageListContext] Failed to load pages:`,e)}function $W(e){let t=(0,rm.c)(33),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,nm.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,nm.useState)(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Map,t[2]=l):l=t[2];let[u,d]=(0,nm.useState)(l),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,nm.useState)(f),[h,g]=(0,nm.useState)(!0),[_,v]=(0,nm.useState)(null),y=(0,nm.useRef)(0),b;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(){let e=y.current+=1;g(!0),ZW().then(t=>{if(e!==y.current)return;let n=new Set(t.map(nG));a(n),c(new Map(t.map(tG))),d(new Map(t.map(eG))),m(e=>YW(e,n)),v(null)}).catch(t=>{e===y.current&&(QW(t),v(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===y.current&&g(!1)})},t[4]=b):b=t[4];let x=b,S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=function(e){m(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),v(null)},t[5]=S):S=t[5];let C=S,w,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{x();let e=()=>{document.visibilityState===`visible`&&x()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=GW(e=>{e.includes(`files`)&&x()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},T=[],t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,nm.useEffect)(w,T);let E,ee,D,te;if(t[8]!==p||t[9]!==u||t[10]!==s||t[11]!==i){D=JW(i,p);let e;t[16]!==p||t[17]!==s?(e=XW(s,p),t[16]=p,t[17]=s,t[18]=e):e=t[18],ee=e,E=u,te=pm(D),t[8]=p,t[9]=u,t[10]=s,t[11]=i,t[12]=E,t[13]=ee,t[14]=D,t[15]=te}else E=t[12],ee=t[13],D=t[14],te=t[15];let ne=te,re,ie;t[19]!==ne||t[20]!==D?(re=()=>{BW({pages:D,folderPaths:ne})},ie=[D,ne],t[19]=ne,t[20]=D,t[21]=re,t[22]=ie):(re=t[21],ie=t[22]),(0,nm.useEffect)(re,ie);let O;t[23]!==_||t[24]!==ne||t[25]!==h||t[26]!==E||t[27]!==ee||t[28]!==D?(O={pages:D,pageTitles:ee,pageMeta:E,folderPaths:ne,loading:h,error:_,refetch:x,addPage:C},t[23]=_,t[24]=ne,t[25]=h,t[26]=E,t[27]=ee,t[28]=D,t[29]=O):O=t[29];let ae;return t[30]!==n||t[31]!==O?(ae=(0,KW.jsx)(qW,{value:O,children:n}),t[30]=n,t[31]=O,t[32]=ae):ae=t[32],ae}function eG(e){return[e.docName,{size:e.size,modified:e.modified}]}function tG(e){return[e.docName,e.title]}function nG(e){return e.docName}function rG(){let e=(0,nm.use)(qW);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}export{cm as $,Dx as A,j as At,Tm as B,jt as Bt,KU as C,Wi as Ct,mL as D,tr as Dt,fL as E,N as Et,D_ as F,Mt as Ft,Cm as G,wm as H,__ as I,Pt as It,dm as J,hm as K,th as L,It as Lt,Tx as M,At as Mt,vx as N,Ot as Nt,hL as O,A as Ot,ev as P,Rt as Pt,om as Q,Ym as R,Lt as Rt,QU as S,Vi as St,XV as T,Si as Tt,xm as U,Em as V,Nt as Vt,Sm as W,lm as X,sm as Y,um as Z,TW as _,Xp as _t,zW as a,em as at,tW as b,Di as bt,PW as c,Wd as ct,jW as d,nf as dt,am as et,kW as f,Cf as ft,hW as g,Tf as gt,uW as h,Ud as ht,GW as i,Sf as it,Ex as j,Ft as jt,Ox as k,un as kt,MW as l,$d as lt,cW as m,zu as mt,rG as n,Ap as nt,VW as o,Zp as ot,sW as p,zp as pt,mm as q,WW as r,hp as rt,NW as s,Rp as st,$W as t,im as tt,AW as u,tf as ut,fW as v,hl as vt,WU as w,M as wt,nW as x,P as xt,iW as y,vl as yt,Dm as z,kt as zt};
221
+ `}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}))(),1),UB=2e3;function WB(e){let t=Date.now();for(let[n,r]of e.entries()){let i=r;i.timestamp&&t-i.timestamp>3e4&&e.delete(n)}}function GB(e,t){for(let[,n]of e.entries()){let e=n;if(e.timestamp&&e.timestamp>t)return!0}return!1}var KB=`__system__`,qB=[`incoming`,`outgoing`,`both`];function JB(e){return qB.includes(e)}var YB=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],XB=Tm.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3}}}}),ZB=Rm.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}}}),QB=Mm.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}}}),$B=op.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),eV=/^---\r?\n([\s\S]*?\r?\n)?---(\r?\n|$)/;function tV(e){let t=e.match(eV);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}var nV=Bm.extend({priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`}}}}),rV=Hm.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`}}}}),iV=$p.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}}),aV=$p.create({name:`jsxComponent`,group:`block`,atom:!0,isolating:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e==`string`?!1:{content:e.getAttribute(`data-content`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-content":e.content}]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{content:e}})}}}),oV=$p.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`inline*`,isolating:!0,selectable:!0,priority:60,addAttributes(){return{attributes:{default:[]},sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-jsx-inline]`,getAttrs:e=>typeof e==`string`?!1:{sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-jsx-inline":``,"data-source-raw":e.sourceRaw,contenteditable:`false`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`span`);t.setAttribute(`data-jsx-inline`,``),t.setAttribute(`contenteditable`,`false`),t.classList.add(`jsx-inline`),e.sourceRaw&&t.setAttribute(`data-source-raw`,e.sourceRaw);let n=document.createElement(`span`);return n.classList.add(`jsx-inline-content`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),sV=r_.extend({priority:60,addOptions(){return{openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:e=>{try{let t=new URL(e,`https://placeholder.invalid`).protocol.toLowerCase();return![`javascript:`,`data:`,`vbscript:`].includes(t)}catch{return!1}},validate:()=>!0,shouldAutoLink:()=>!0}},addAttributes(){return{...this.parent?.(),linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1}}}}),cV=$p.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function lV(e){return e.type.name===`list`&&!e.attrs.ordered}function uV(e){return e.type.name===`list`&&!!e.attrs.ordered}function dV(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function fV(e,t,n,r,i,a,o){let s=Nd(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?ja(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o??{}})}}),t(n),!0}return Oa(n,a)(e,void 0)?t?Oa(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!0:!1}var pV=$p.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,Ud(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:fV(e,t,n,r,e=>lV(e)&&!dV(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:fV(e,t,n,r,e=>uV(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:fV(e,t,n,r,e=>lV(e)&&dV(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[Pp({find:/^\s*([-+*])(?!\s*\[[ xX]\])\s$/,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]})}),Pp({find:/^\s*(\d+)([.)])\s$/,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]})}),new Qf({find:/^\s*[-*+]\s\[([ xX])\]\s$/,handler:({state:e,range:t,match:n})=>{let r=e.schema.nodes.list;if(!r)return null;let i=n[1]!==` `,a=e.tr.delete(t.from,t.to),o=a.doc.resolve(t.from).blockRange();if(!o)return null;let s=Lr(o,r,{ordered:!1});if(!s)return null;a.wrap(o,s);let c=a.doc.resolve(a.mapping.map(t.from));for(let e=c.depth;e>0;e--){let t=c.node(e);if(t.type.name===`listItem`){a.setNodeMarkup(c.before(e),void 0,{...t.attrs,checked:i});break}}}})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),mV=$p.create({name:`listItem`,content:`paragraph block*`,defining:!0,priority:60,addAttributes(){return{checked:{default:null},spread:{default:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,Ud(t),0]:[`li`,Ud(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(Ud(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`);return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,n.isEditable||(o.disabled=!0),o.addEventListener(`change`,()=>{let r=t();r===void 0||typeof r!=`number`||n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),hV=pV,gV=mV,_V=$p.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e=>typeof e==`string`?!1:{reason:e.getAttribute(`data-reason`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),vV=yy.extend({excludes:``}),yV=Sy.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}}});function bV(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function xV(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var SV=$p.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:bV(e.getAttribute(`data-alias`)),anchor:bV(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:bV(e.getAttribute(`data-alias`)),anchor:bV(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=bV(e.attrs.alias),i=bV(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},xV({target:n,alias:r,anchor:i})]}}),CV=[aV,_V,oV,SV,hV,gV,ZB,QB,vV,XB,rV,yV,sV,iV,cV,nV,$B,Qb.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,italic:!1,bold:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1}),py.configure({resizable:!0}),ey,$v,Qv,c_.configure({inline:!0}),o_];function wV(e,t){let n=encodeURIComponent(t.prompt),r=encodeURIComponent(t.projectDir),i=encodeURIComponent(t.docPath);return`claude://${e.mode}/new?q=${n}&folder=${r}&file=${i}`}function TV(e){return`codex://new?prompt=${encodeURIComponent(e.prompt)}&path=${encodeURIComponent(e.projectDir)}`}function EV(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t<0?e:e.substring(t+1)}function DV(e){return`cursor://anysphere.cursor-deeplink/prompt?text=${encodeURIComponent(encodeURIComponent(e.prompt))}&workspace=${encodeURIComponent(EV(e.projectDir))}&mode=agent`}function OV(e){return`Open Knowledge doc: ${e.relativePath}. Use the open-knowledge MCP tool for backlinks and related context.`}function kV(e){return`https://claude.ai/new?q=${encodeURIComponent(e)}`}var AV=/notionvc:/i,jV=()=>e=>{MV(e)&&(NV(e),PV(e))};function MV(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(AV.test(e))return!0}if(t.type===`element`&&MV(t))return!0}return!1}function NV(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&NV(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
222
+ `)){t.push(n);continue}let r=e.split(`
223
+ `);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function PV(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!AV.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&PV(t)}}var FV=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),IV=()=>e=>{LV(e)};function LV(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&LV(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return RV(t)?[]:zV(t)?t.children:[t]})}}function RV(e){if(e.tagName!==`meta`)return!1;let t=e.properties?.name,n=e.properties?.content;return t===`Generator`&&typeof n==`string`&&/Cocoa/i.test(n)}function zV(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>FV.has(String(e))):!1}var BV=`docs-internal-guid-`;function VV(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var HV=()=>e=>{UV(e)};function UV(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&UV(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(!n||n.type!==`element`){t++;continue}let r=n;if(WV(r)||GV(r)){VV(e,t);continue}t++}}function WV(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(BV)}function GV(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.children.filter(e=>e.type===`element`);return t.length===1?t[0]?.tagName===`table`:!1}var KV=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),qV=()=>e=>{JV(e)};function JV(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&JV(t);for(let t of e.children)t.type===`element`&&YV(t)}}function YV(e){if(!e.properties)return;for(let t of Object.keys(e.properties))t.startsWith(`dataHovercard`)&&delete e.properties[t];let t=e.properties.className;if(Array.isArray(t)){let n=t.filter(e=>!KV.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var XV=/^gmail_/,ZV=()=>e=>{QV(e)};function QV(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&QV(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(n.type!==`element`){t++;continue}let r=n;if(r.tagName===`div`&&$V(r,`gmail_quote`)&&(r.tagName=`blockquote`),eH(r),tH(r)){e.children.splice(t,1,...r.children);continue}t++}}function $V(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function eH(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!XV.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function tH(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.properties?.className;return t!=null&&!(Array.isArray(t)&&t.length===0)?!1:e.children.filter(e=>e.type===`element`).length<=1}var nH=()=>e=>{rH(e)};function rH(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&rH(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return t.tagName===`google-sheets-html-origin`?t.children:t.tagName===`style`?[]:(iH(t),[t])})}}function iH(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var aH=[`o:`,`w:`,`m:`,`v:`,`u1:`],oH=/^Mso[A-Z]/,sH=/^\s*\[if\s+[^\]]*\]/,cH=()=>e=>{lH(e)};function lH(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&lH(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return sH.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return uH(t)?[]:(dH(t),[t])})}}function uH(e){return aH.some(t=>e.tagName.startsWith(t))}function dH(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!oH.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&oH.test(n)&&delete t.className;let r=t.style;typeof r==`string`&&/mso-/i.test(r)&&delete t.style;for(let e of Object.keys(t))if(e.startsWith(`xmlns:`)){let n=e.slice(6);aH.some(e=>e===`${n}:`)&&delete t[e]}}var fH=/^c-(message_kit__|message__|compose|timestamp)/,pH=()=>e=>{mH(e)};function mH(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&mH(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return hH(t)?[]:(gH(t),[t])})}}function hH(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function gH(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!fH.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var _H=()=>e=>{vH(e)};function vH(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&vH(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;yH(r)&&(e.children[t]=xH(r))}}}function yH(e){if(e.tagName!==`div`)return!1;let t=e.children.filter(e=>e.type===`element`&&e.tagName===`div`);return t.length<2?!1:t.some(e=>bH(e))}function bH(e){for(let t of e.children){if(t.type!==`element`)continue;let e=t,n=e.properties?.style;if(typeof n==`string`&&/color\s*:/i.test(n)||bH(e))return!0}return!1}function xH(e){return{type:`element`,tagName:`pre`,properties:{},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:e.children.filter(e=>e.type===`element`&&e.tagName===`div`).map(e=>SH(e)).join(`
224
+ `)}]}]}}function SH(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=SH(n));return t}var CH=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},wH=[HV,cH,IV,ZV,jV,_H,nH,pH,qV];function TH(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new CH(e.length,n);let r=NF().use(WE,{fragment:!0});for(let e of wH)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(Uk);let i=r.parse(e);return r.runSync(i)}function EH(e){return String(NF().use(wF).use(TF).stringify(e))}var DH={parseFallback:{blockLevel:0,wholeDoc:0}};function OH(){DH.parseFallback.blockLevel++}function kH(){DH.parseFallback.wholeDoc++}var AH=/^(`{3,}|~{3,})/gm;function jH(e){let t=[],n=null;for(let r of e.matchAll(AH)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function MH(e,t){return t.some(([t,n])=>e>=t&&e<n)}var NH=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function PH(e){let t=jH(e),n=[];for(let r of e.matchAll(NH))MH(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
225
+ `)}\n\n`:``}function FH(e,t){return IH(e,t.parse,0)}function IH(e,t,n){if(n>20)return kH(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),WH(e);try{return t(e)}catch(r){let i=LH(r);if(i===void 0){if(n===0){let n=UH(e,t,r);if(n)return n}return kH(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:r?.message??`unknown error (no position)`})),WH(e)}OH(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:i,reason:r?.message??`parse error`}));try{let a=VH(e,i),o=e.slice(0,a.start),s=e.slice(a.start,a.end),c=e.slice(a.end),l=o.trim()?IH(o,t,n+1):{type:`doc`,content:[]},u=c.trim()?IH(PH(o)+c,t,n+1):{type:`doc`,content:[]},d={type:`rawMdxFallback`,attrs:{reason:r?.message??`parse error`,originalSpan:{start:a.start,end:a.end}},content:s?[{type:`text`,text:s}]:[]},f=[...l.content??[],d,...u.content??[]];return{type:`doc`,content:f.length>0?f:[{type:`paragraph`,content:[]}]}}catch(t){return kH(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${t?.message??`unknown`}`})),WH(e)}}}function LH(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function RH(e,t){let n=jH(e);if(MH(t,n))return null;let r=/<([A-Z][A-Za-z0-9.]*)[\s/>]/g,i=/<\/([A-Z][A-Za-z0-9.]*)\s*>/g,a=null;for(let i of e.matchAll(r)){if(i.index>t)break;MH(i.index,n)||(a={name:i[1],start:i.index})}if(!a)return null;for(let r of e.matchAll(i))if(!(r.index<t)&&!MH(r.index,n)&&r[1]===a.name)return{start:a.start,end:r.index+r[0].length};let o=BH(e,t);return{start:a.start,end:o??e.length}}function zH(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function BH(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function VH(e,t){return RH(e,t)||{start:zH(e,t)??0,end:BH(e,t)??e.length}}function HH(e){let t=jH(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;MH(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function UH(e,t,n){let r=HH(e);if(r.length<2)return null;let i=[],a=!1,o=``;for(let e of r){let r=o+e.src;try{let n=t(r).content??[];o+=PH(e.src);let s=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(s.length===0&&n.length>0){a=!0;continue}i.push(...s),a=!0}catch(t){OH();let r=t?.message?.slice(0,200)??`unknown block error`,a=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${a}`,blockError:r,blockErrorName:t?.name})),i.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return a?{type:`doc`,content:i.length>0?i:[{type:`paragraph`,content:[]}]}:null}function WH(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}var GH=``,KH=``,qH=``,JH=``,YH=``,XH=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,ZH=/<!--[\s\S]*?-->/g,QH=/<\/([a-z][a-z0-9]*)\s*>/g,$H=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,eU=/<\/([A-Z][A-Za-z0-9.]*)>/g;function tU(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function nU(e){let t=new Map,n=new RegExp(eU.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function rU(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function iU(e){let t=[],n=e.indexOf(`/>`);for(;n!==-1;)t.push(n),n=e.indexOf(`/>`,n+2);return t}function aU(e){let t=e;t=t.replace(ZH,e=>e.replace(/</g,GH).replace(/>/g,KH)),t=t.replace(XH,(e,t)=>`${GH}${t.replaceAll(`:`,qH).replaceAll(`@`,JH)}${KH}`),t=t.replace(QH,e=>e.replace(/</g,GH).replace(/>/g,KH)),t=t.replace($H,(e,t)=>t[0]===t[0].toLowerCase()&&t[0]!==t[0].toUpperCase()?e.replace(/</g,GH).replace(/>/g,KH):e),t=t.replace(/<>/g,`${GH}${KH}`);let n=nU(t),r=rU(t),i=iU(t);t=t.replace(/</g,(e,a)=>{let o=t.slice(a,a+256);if(o[1]===`/`)return/^<\/[a-zA-Z][a-zA-Z0-9.]*[ \t]*>/.test(o)?e:GH;let s=/^<([A-Z][a-zA-Z0-9.]*)[\s/>]/.exec(o);if(!s)return GH;let c=s[1],l=tU(r,a),u=tU(i,l<r.length?r[l]:t.length);if(u>0){let n=i[u-1];if(n>a){let r=a+s[0].length-1;if(!t.slice(r,n).replace(/"[^"]*"|'[^']*'/g,``).includes(`/`))return e}}let d=n.get(c);return d&&tU(d,a)<d.length?e:GH});{let e=[],n=[];for(let r=0;r<t.length;r++){if(t[r]===`
226
+ `){let i=t[r+1];if(i===`
227
+ `||i===`>`){if(e.push(...n),n.length=0,i===`
228
+ `)for(;t[r+1]===`
229
+ `;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=[...t];for(let t of e)n[t]=YH;t=n.join(``)}}return t}function oU(e){return e.includes(``)||e.includes(``)||e.includes(``)||e.includes(``)||e.includes(``)}function sU(){return e=>{KD(e,e=>{let t=e;typeof t.value==`string`&&oU(t.value)&&(t.value=cU(t.value)),typeof t.url==`string`&&oU(t.url)&&(t.url=cU(t.url)),typeof t.title==`string`&&oU(t.title)&&(t.title=cU(t.title)),typeof t.alt==`string`&&oU(t.alt)&&(t.alt=cU(t.alt))})}}function cU(e){return e.replaceAll(GH,`<`).replaceAll(KH,`>`).replaceAll(qH,`:`).replaceAll(JH,`@`).replaceAll(YH,`{`)}var lU=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function uU(e){let t=[],n=!1;for(let r of e.children){if(r.type!==`text`){t.push(r);continue}let e=r.value;lU.lastIndex=0;let i=[],a=0;for(;;){let t=lU.exec(e);if(t===null)break;let r=t[0],o=t[1],s=t.index;s>a&&i.push({type:`text`,value:e.slice(a,s)});let c={type:`link`,url:o,title:null,children:[{type:`text`,value:o}],data:{sourceStyle:`autolink`}};i.push(c),a=s+r.length,n=!0}i.length===0?t.push(r):(a<e.length&&i.push({type:`text`,value:e.slice(a)}),t.push(...i))}n&&(e.children=t)}function dU(e,t){if(e.children.length===0)return;let n=e.children[0];if(n.type!==`yaml`||(n.value??``).trim()!==``)return;let r=n.position?.start?.offset;if(r!==0)return;let i=n.position?.end?.offset;if(typeof i!=`number`)return;let a=typeof t.value==`string`?t.value:``;if(!a)return;let o=a.slice(r,i).split(`
230
+ `),s=/^-{3,}\s*$/,c=o.filter(e=>s.test(e));if(c.length===0)return;let l=c.map(e=>({type:`thematicBreak`,data:{sourceRaw:e.replace(/\s+$/,``)}}));if(l.length>0){let e=c[0].length;l[0].position={start:{line:1,column:1,offset:0},end:{line:1,column:e+1,offset:e}}}e.children.splice(0,1,...l)}var fU=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function pU(e,t,n=!1){if(!t)return;let r=e.position;if(!r||typeof r.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let i=r.start.offset,a=r.end?.offset??i;if(i<0||a>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${i} end=${a} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(i,a),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&fU.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}break}case`emphasis`:{let n=t[i];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(i,i+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:if(t[i]===`#`)e.data.sourceStyle=`atx`;else{let n=t.slice(i,a);/\n[=]+\s*$/.test(n)||/\n[-]+\s*$/.test(n)?e.data.sourceStyle=`setext`:e.data.sourceStyle=`atx`}break;case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`code`:{let n=t[i];if(n==="`"||n===`~`){e.data.sourceFenceChar=n;let r=0;for(;i+r<t.length&&t[i+r]===n;)r++;r>=3&&(e.data.sourceFenceLength=r)}break}case`thematicBreak`:e.data.sourceRaw=t.slice(i,a);break;case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(i,a);break;case`break`:t.slice(i,a).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}var mU=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.math.inlineMath.rawMdxFallbackMdast`.split(`.`));function hU(e,t){let n=e.position?.start?.offset??0,r=e.position?.end?.offset??0,i=r>n?t.slice(n,r):``;return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:i||(e.type??`unknown`),position:e.position}}function gU(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;dU(e,t);let r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;KD(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!mU.has(e.type)){let r=hU(e,n);return i.children[t]=r,UD}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&uU(t)}pU(e,n,r)})}}var _U=nz(),vU=hR(),yU=gR();function bU(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===_U)||t.push(_U);let n=e.fromMarkdownExtensions;n.some(e=>e===vU)||n.push(vU);let r=e.toMarkdownExtensions;r.some(e=>e===yU)||r.push(yU)}var xU=91,SU=93,CU=124,wU=35,TU={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===xU?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===xU?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===xU?n(t):t===SU?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===wU?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===CU?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===xU?n(t):t===SU?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===CU?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===xU?n(t):t===SU?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===SU?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===SU?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}};function EU(){return{text:{[xU]:TU}}}function DU(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function OU(e){return e.stack[e.stack.length-1]}function kU(e){let t=OU(this);t.data.target=this.sliceSerialize(e).trim()}function AU(e){let t=OU(this),n=this.sliceSerialize(e).trim();t.data.anchor=n.length?n:null}function jU(e){let t=OU(this),n=this.sliceSerialize(e).trim();t.data.alias=n.length?n:null}function MU(e){let t=OU(this),{target:n,anchor:r,alias:i}=t.data,a=i||(r?`${n}#${r}`:n);t.value=a,t.children=[{type:`text`,value:a}],this.exit(e)}var NU={enter:{wikiLink:DU},exit:{wikiLinkTarget:kU,wikiLinkAnchor:AU,wikiLinkAlias:jU,wikiLink:MU}},PU={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},FU=EU();function IU(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===FU)||e.micromarkExtensions.push(FU),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===NU)||e.fromMarkdownExtensions.push(NU),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===PU)||e.toMarkdownExtensions.push(PU)}function LU(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`&&t!==`footnoteDefinition`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}function RU(e){let t=NF().use(hL).use(AI,[`yaml`]).use(bU).use(wF).use(IU).use(sU).use(gU).use(()=>LU).use(aI,{schema:e.schema,handlers:e.handlers});return t.freeze(),t}function zU(e){let t=NF().use(AI,[`yaml`]).use(wF).use(bU).use(IU).use(TF,{bullet:`-`,fences:!0,rule:`-`,...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function BU(e,t){let n=new DE(aU(e)),r=t.parse(n);n.value=e;let i=t.runSync(r,n);return t.stringify(i)}function VU(e,t){let n=new DE(aU(e)),r=t.parse(n);return n.value=e,t.runSync(r,n)}function HU(e,t,n){let r=sI(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers});return String(t.stringify(r))}var UU={text(e,t,n,r){if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=KU(n,t.slice(o,e),r)),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=KU(n,t.slice(o),r)),a}return KU(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=n.containerPhrasing(e,{before:s,after:i,...a.current()}),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=n.containerPhrasing(e,{before:s,after:i,...a.current()}),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(WU(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`![`);s+=i.move(n.safe(e.alt??``,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move(WU(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},thematicBreak(e,t,n){let r=e.data?.sourceRaw;return Array.isArray(n?.indexStack)&&n.indexStack.length===1&&n.indexStack[0]===0&&(!r||/^-[-\s]*-\s*$/.test(r))?`***`:r??`---`},break(e){return e.data?.sourceStyle===`backslash`?`\\
231
+ `:`
232
+ `},code(e){let t=e.data?.sourceFenceChar===`~`?`~`:"`",n=Math.max(3,e.data?.sourceFenceLength??3),r=t.repeat(n);return`${r}${e.lang??``}${e.meta?` ${e.meta}`:``}\n${e.value??``}\n${r}`},heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
233
+ `,after:`
234
+ `});return`${t}\n${(a===1?`=`:`-`).repeat(Math.max(t.length,3))}`}let o=`#`.repeat(a),s=n.containerPhrasing(e,{...r,before:`${o} `,after:`
235
+ `});return s?`${o} ${s}`:o},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=a?`${d+t}${u}`:e.data?.bulletMarker??i,f=s;o.checked===!0?f+=` [x]`:o.checked===!1&&(f+=` [ ]`);let p=` `.repeat(s.length+1),m=n.containerFlow(o,r).split(`
236
+ `).map((e,t)=>t===0?`${f} ${e}`:e&&`${p}${e}`).join(`
237
+ `);l.push(m)}n.bulletCurrent=o,n.bulletLastUsed=s;let f=e.spread?`
238
+
239
+ `:`
240
+ `;return l.join(f)},mdxJsxFlowElement(e){let t=e.data?.sourceRaw;return typeof t==`string`?t:`<${e.name??``}/>`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;return typeof t==`string`?t:`<${e.name??``}/>`},rawMdxFallback(e){return e.value??``}};function WU(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function GU(e){return e.replace(/(?<!\\)&(?=[A-Za-z][A-Za-z0-9]*;|#[0-9]+;|#[xX][0-9A-Fa-f]+;)/g,`\\&`)}function KU(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return GU(i)}var qU=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;constructor(e){this.schema=$d(e.extensions),this.handlers=ZU(this.schema);let{nodeHandlers:t,markHandlers:n}=QU(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=RU({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=zU({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers,toMarkdownHandlers:UU})}parse(e){return e.trim()?BU(e,this.parseProcessor).toJSON():{type:`doc`,content:[{type:`paragraph`,content:[]}]}}parseToMdast(e){return e.trim()?VU(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e){return e.trim()?FH(e,{parse:e=>this.parse(e)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return HU(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}};function JU(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function YU(e){if(e.length===0)return{type:`inlineCode`,value:``};if(e.every(e=>e.type===`text`))return{type:`inlineCode`,value:e.map(e=>e.value).join(``)};if(e.length===1&&`children`in e[0]){let t=e[0];return{...t,children:[YU(t.children)]}}return{type:`inlineCode`,value:XU(e)}}function XU(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=XU(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}function ZU(e){let t=e.nodes,n=e.marks,r={};t.paragraph&&(r.paragraph=(e,n,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),n=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=t.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...n),r.length===1?r[0]:r}return t.paragraph.createAndFill(null,i.length>0?i:null)}),t.blockquote&&(r.blockquote=nI(t.blockquote)),t.table&&(r.table=nI(t.table)),t.tableRow&&(r.tableRow=nI(t.tableRow)),t.tableCell&&(r.tableCell=(e=>(n,r,i)=>{let a=i.all(n).flat();if(a.length>0&&t.paragraph){let n=t.paragraph.create(null,a);return e.createAndFill(null,[n])}return e.createAndFill(null,null)})(t.tableCell),t.tableHeader),t.image&&(r.image=e=>t.image.createAndFill({src:e.url??``,alt:e.alt??null,title:e.title??null}),r.imageReference=e=>t.image.createAndFill({src:``,alt:e.alt??null,title:null})),n.escapeMark&&(r.text=t=>{let r=t.value??``;if(!r)return null;let i=t.data?.escapedChars;if(!i?.length)return e.text(r.replaceAll(`\xA0`,` `));let a=[],o=0;for(let{offset:t}of i){if(t>o){let n=r.slice(o,t).replaceAll(`\xA0`,` `);n&&a.push(e.text(n))}if(t<r.length){let i=r[t].replaceAll(`\xA0`,` `);a.push(e.text(i,[n.escapeMark.create()])),o=t+1}}if(o<r.length){let t=r.slice(o).replaceAll(`\xA0`,` `);t&&a.push(e.text(t))}return a.length===1?a[0]:a}),n.code&&(r.inlineCode=t=>e.text(t.value,[n.code.create()]));let i=n.strike??n.delete;i&&(r.delete=rI(i)),n.emphasis&&(r.emphasis=rI(n.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),n.strong&&(r.strong=rI(n.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),t.heading&&(r.heading=nI(t.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`}))),t.codeBlock&&(r.code=n=>{let r=n.value?[e.text(n.value)]:[];return t.codeBlock.createAndFill({language:n.lang??null,meta:n.meta??null,fenceDelimiter:n.data?.sourceFenceChar??"`",fenceLength:n.data?.sourceFenceLength??3},r)}),t.thematicBreak&&(r.thematicBreak=e=>t.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),t.hardBreak&&(r.break=e=>t.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),t.list&&(r.list=nI(t.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),t.listItem&&(r.listItem=nI(t.listItem,e=>({checked:e.checked??null,spread:!!e.spread}))),n.link&&(r.link=rI(n.link,e=>({href:e.url??``,title:e.title??null,linkStyle:e.data?.sourceStyle??`inline`,refLabel:null})),r.linkReference=rI(n.link,e=>({href:``,title:null,linkStyle:e.referenceType??`shortcut`,refLabel:e.label??e.identifier??null}))),t.htmlBlock&&(r.html=e=>t.htmlBlock.createAndFill({content:e.value??``}));let a=t.linkDefinition??t.linkRefDef;if(a){let e=!!a.spec.attrs?.url,t=!!a.spec.attrs?.href,n=!!a.spec.attrs?.identifier;r.definition=r=>{let i={title:r.title??null};return n&&(i.identifier=r.identifier??``),i.label=r.label??r.identifier??``,e?i.url=r.url??``:t&&(i.href=r.url??``),a.createAndFill(i)}}if(t.jsxComponent){let n=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};r.mdxJsxFlowElement=e=>t.jsxComponent.createAndFill({content:n(e.data)??``}),t.jsxInline?r.mdxJsxTextElement=(e,r,i)=>{let a=i.all(e).flat(),o={sourceRaw:n(e.data)??``,attributes:(e.attributes??[]).map(e=>`type`in e&&e.type===`mdxJsxExpressionAttribute`?{type:`spread`,value:e.value}:{type:`attr`,name:e.name,value:e.value})};return t.jsxInline.createAndFill(o,a.length>0?a:null)}:r.mdxJsxTextElement=e=>t.jsxComponent.createAndFill({content:n(e.data)??``}),r.mdxFlowExpression=e=>t.jsxComponent.createAndFill({content:n(e.data)??`{${e.value??``}}`}),r.mdxTextExpression=t=>{let r=n(t.data)??`{${t.value??``}}`;return e.text(r)}}t.wikiLink&&(r.wikiLink=e=>t.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null}));let o=n=>{let r=n.value??n.type;return t.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:n.type,reason:`Unhandled block mdast: ${n.type}`})),t.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${n.type}`},r?[e.text(r)]:null)):null},s=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),e.text(t.value??t.type));return r.math||=o,r.inlineMath||=s,r.footnoteReference||=s,r.rawMdxFallbackMdast=n=>{if(!t.rawMdxFallback)return null;let r=n.position?{start:n.position.start?.offset??0,end:n.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:n.originalType,reason:`Unhandled mdast: ${n.originalType}`})),t.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${n.originalType}`,originalSpan:r},n.value?[e.text(n.value)]:null)},r}function QU(e){let t={},n={},r=e.nodes,i=e.marks;if(r.paragraph&&(t.paragraph=cI(`paragraph`)),r.blockquote&&(t.blockquote=cI(`blockquote`)),r.heading&&(t.heading=cI(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle}}))),r.codeBlock&&(t.codeBlock=e=>({type:`code`,lang:e.attrs.language??null,meta:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength}})),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=cI(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&JU(r[0])?r.slice(1):r;return{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,children:i}}),r.table&&(t.table=cI(`table`)),r.tableRow&&(t.tableRow=cI(`tableRow`)),r.tableCell&&(t.tableCell=cI(`tableCell`)),r.tableHeader&&(t.tableHeader=cI(`tableCell`)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>({type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title})}if(r.jsxComponent&&(t.jsxComponent=e=>({type:`mdxJsxFlowElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(e.attrs.content??``)}})),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=lI(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=lI(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>YU(n)),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=lI(`delete`)}return i.link&&(n.link=(e,t,n)=>{let r=e.attrs.linkStyle;return r===`autolink`?{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}}:r===`inline`||!r?{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n}:{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data=t.data??{},t.data.escapedChars=t.data.escapedChars??[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),{nodeHandlers:t,markHandlers:n}}var $U=/\p{M}+/gu,eW=/[^\p{L}\p{N}]+/gu,tW=/^-+|-+$/g;function nW(e){return e.trim().normalize(`NFKD`).replace($U,``).toLowerCase().replace(eW,`-`).replace(tW,``)}function rW(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function iW(e,t){let n=nW(e);return n?rW(n,t):``}function aW(e,t){let n=nW(e);return t?`#${n}-${nW(t)}`:`#${n}`}var oW={wikiLink:(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:aW(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},mdxJsxFlowElement:(e,t)=>{let n=t,r={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,r),e.applyData(t,r)},mdxJsxTextElement:(e,t)=>{let n=t,r={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`]},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,r),e.applyData(t,r)},rawMdxFallback:(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a={type:`comment`,value:` Parse error: ${r.replace(/--/g,`—`)} `},o={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,o),[a,e.applyData(t,o)]}},sW=/^(https?:|mailto:|tel:|ftp:|sms:|\/|#|\?|\.\/|\.\.\/)/i;function cW(e){let t=e.trim();return t===``?!0:sW.test(t)}var lW=()=>e=>{KD(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(n){if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!cW(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!cW(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!cW(e)&&delete n.action}}})};function uW(e){let t=NF().use(hL).use(AI,[`yaml`]).use(bU).use(wF).use(IU).use(VB,{handlers:oW}).use(lW).use(eB);return String(t.processSync(e))}new HB.default,new HB.default;var dW=new HB.default;dW.Match_Threshold=.5;var fW=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function pW(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??mW,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new fW(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function mW(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function hW(){let e=!1,t=``,n=0;return r=>{let i=gW(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function gW(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}var _W=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],vW={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},yW={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},bW=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function xW(e){let t=0;for(let n of e)t=(t<<5)-t+n.charCodeAt(0)|0;return _W[Math.abs(t)%_W.length]}var SW={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,copilot:`github`,cline:`cline`};function CW(e){return e?SW[e]??`bot`:`bot`}function wW(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function TW(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function EW(e){let[t]=wW(e);return TW(t,45,32)}var DW=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],OW=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],kW=`ok-user-name-v2`,AW=`ok-user-color-v2`;function jW(e){return e[Math.floor(Math.random()*e.length)]}function MW(){return`${jW(DW)} ${jW(OW)}`}function NW(){return jW(bW)}function PW(e){try{return localStorage.getItem(e)}catch{return null}}function FW(e,t){try{localStorage.setItem(e,t)}catch{}}function IW(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=PW(kW),r=PW(AW);return n||(n=MW(),FW(kW,n)),r||(r=NW(),FW(AW,r)),{name:n,color:r,coeditor:e,tabId:t}}function LW(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`/`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=o.endsWith(`.md`)?o.slice(0,-3):o,c=t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(e);return c.length===0?null:{docName:c.join(`/`),anchor:a||null}}var RW=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function zW(e){return e.split(`/`).filter(Boolean)}function BW(e){let t=e.trim();return RW.test(t)||t.startsWith(`//`)}function VW(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}let r=LW(n,t);return r?{kind:`doc`,docName:r.docName,anchor:r.anchor}:n.startsWith(`/`)||BW(n)?{kind:`external`,url:n}:null}function HW(e,t){let n=e.trim();return n?BW(n)?{kind:`external`,url:t?`${n}#${t}`:n}:{kind:`doc`,docName:n,anchor:t?.trim()||null}:null}function UW(e,t,n=null){let r=zW(e);r.pop();let i=zW(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function WW(e){if(!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`?`),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function GW(e,t){let n=`#/${e}`;return t?`${n}?anchor=${encodeURIComponent(t)}`:n}var KW=null,qW=new Set;function JW(e,t){if(e===t)return!0;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function YW(e,t){return e===null?!1:e===t?!0:JW(e.pages,t.pages)&&JW(e.folderPaths,t.folderPaths)}function XW(){return KW}function ZW(e){if(!YW(KW,e)){KW=e;for(let t of[...qW])try{t(e)}catch(e){console.error(`[page-list-cache] subscriber threw:`,e)}}}function QW(e){if(qW.add(e),KW!==null)try{e(KW)}catch(e){console.error(`[page-list-cache] subscriber threw on replay:`,e)}return()=>{qW.delete(e)}}var $W=`open-knowledge:documents-changed`;function eG(e){return[...new Set(e)]}function tG(e=[`files`]){window.dispatchEvent(new CustomEvent($W,{detail:{channels:eG(e)}}))}function nG(e){let t=t=>{e((t instanceof CustomEvent?t.detail?.channels:void 0)??[`files`])};return window.addEventListener($W,t),()=>window.removeEventListener($W,t)}var rG=i(),iG=(0,nm.createContext)(null);function aG(e,t){if(t.size===0)return new Set(e);let n=new Set(e);for(let e of t)n.add(e);return n}function oG(e,t){if(e.size===0)return new Set;let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function sG(e,t){let n=new Map(e);for(let e of t)n.has(e)||n.set(e,e);return n}async function cG(){let e=await fetch(`/api/pages`);if(!e.ok)throw Error(`/api/pages responded with ${e.status}`);let t=await e.json();return Array.isArray(t.pages)?t.pages:[]}function lG(e){console.error(`[PageListContext] Failed to load pages:`,e)}function uG(e){let t=(0,rm.c)(33),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,nm.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,nm.useState)(o),l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Map,t[2]=l):l=t[2];let[u,d]=(0,nm.useState)(l),f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=new Set,t[3]=f):f=t[3];let[p,m]=(0,nm.useState)(f),[h,g]=(0,nm.useState)(!0),[_,v]=(0,nm.useState)(null),y=(0,nm.useRef)(0),b;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(b=function(){let e=y.current+=1;g(!0),cG().then(t=>{if(e!==y.current)return;let n=new Set(t.map(pG));a(n),c(new Map(t.map(fG))),d(new Map(t.map(dG))),m(e=>oG(e,n)),v(null)}).catch(t=>{e===y.current&&(lG(t),v(t instanceof Error?t.message:`Failed to load pages`))}).finally(()=>{e===y.current&&g(!1)})},t[4]=b):b=t[4];let x=b,S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=function(e){m(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n}),v(null)},t[5]=S):S=t[5];let C=S,w,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>{x();let e=()=>{document.visibilityState===`visible`&&x()};window.addEventListener(`focus`,e),window.addEventListener(`visibilitychange`,e);let t=nG(e=>{e.includes(`files`)&&x()});return()=>{window.removeEventListener(`focus`,e),window.removeEventListener(`visibilitychange`,e),t()}},T=[],t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,nm.useEffect)(w,T);let E,ee,D,te;if(t[8]!==p||t[9]!==u||t[10]!==s||t[11]!==i){D=aG(i,p);let e;t[16]!==p||t[17]!==s?(e=sG(s,p),t[16]=p,t[17]=s,t[18]=e):e=t[18],ee=e,E=u,te=pm(D),t[8]=p,t[9]=u,t[10]=s,t[11]=i,t[12]=E,t[13]=ee,t[14]=D,t[15]=te}else E=t[12],ee=t[13],D=t[14],te=t[15];let ne=te,re,ie;t[19]!==ne||t[20]!==D?(re=()=>{ZW({pages:D,folderPaths:ne})},ie=[D,ne],t[19]=ne,t[20]=D,t[21]=re,t[22]=ie):(re=t[21],ie=t[22]),(0,nm.useEffect)(re,ie);let O;t[23]!==_||t[24]!==ne||t[25]!==h||t[26]!==E||t[27]!==ee||t[28]!==D?(O={pages:D,pageTitles:ee,pageMeta:E,folderPaths:ne,loading:h,error:_,refetch:x,addPage:C},t[23]=_,t[24]=ne,t[25]=h,t[26]=E,t[27]=ee,t[28]=D,t[29]=O):O=t[29];let ae;return t[30]!==n||t[31]!==O?(ae=(0,rG.jsx)(iG,{value:O,children:n}),t[30]=n,t[31]=O,t[32]=ae):ae=t[32],ae}function dG(e){return[e.docName,{size:e.size,modified:e.modified}]}function fG(e){return[e.docName,e.title]}function pG(e){return e.docName}function mG(){let e=(0,nm.use)(iG);if(!e)throw Error(`usePageList must be used within <PageListProvider />`);return e}export{dm as $,xW as A,Si as At,CW as B,Mt as Bt,wV as C,hl as Ct,pW as D,Vi as Dt,UW as E,P as Et,iW as F,j as Ft,bV as G,jt as Gt,JB as H,It as Ht,IW as I,Ft as It,nW as J,CV as K,Nt as Kt,xV as L,At as Lt,hW as M,tr as Mt,EW as N,A as Nt,VW as O,Wi as Ot,WB as P,un as Pt,mm as Q,GB as R,Ot as Rt,kV as S,Xp as St,DV as T,Di as Tt,uW as U,Lt as Ut,BW as V,Pt as Vt,EH as W,kt as Wt,A_ as X,Jb as Y,hm as Z,qU as _,Cf as _t,XW as a,am as at,KB as b,Ud as bt,GW as c,hp as ct,YB as d,Zp as dt,sm as et,fW as f,Rp as ft,sV as g,nf as gt,aV as h,tf as ht,nG as i,cm as it,OV as j,N as jt,HW as k,M as kt,vW as l,Sf as lt,CH as m,$d as mt,mG as n,um as nt,QW as o,im as ot,UB as p,Wd as pt,tV as q,tG as r,om as rt,WW as s,Ap as st,uG as t,lm as tt,yW as u,em as ut,qB as v,zp as vt,TV as w,vl as wt,SV as x,Tf as xt,_V as y,zu as yt,TH as z,Rt as zt};