@nextclaw/ui 0.27.4 → 0.27.5-beta.1

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 (60) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/.vite/manifest.json +95 -95
  3. package/dist/assets/{account-panel-Cfx3ocPY.js → account-panel-C83GDFuy.js} +1 -1
  4. package/dist/assets/agents-CJA15zzv.js +1 -0
  5. package/dist/assets/{agents-BdeFtIOV.js → agents-Dr2KkEp2.js} +1 -1
  6. package/dist/assets/{app-presenter-provider-BB3Xl8b0.js → app-presenter-provider-Cx9MwMtb.js} +17 -16
  7. package/dist/assets/{appearance-settings-page-DiSRSDN3.js → appearance-settings-page-3IfIzjic.js} +1 -1
  8. package/dist/assets/apps-CvIlb9Rn.js +1 -0
  9. package/dist/assets/{confirm-dialog-jz2cQKId.js → confirm-dialog-D30HJBXN.js} +1 -1
  10. package/dist/assets/{context-menu-C0qywo73.js → context-menu-C6m-WNpl.js} +65 -65
  11. package/dist/assets/cron-BWZWu80t.js +1 -0
  12. package/dist/assets/{dialog-DMKYZDFu.js → dialog-DB_l9LK0.js} +1 -1
  13. package/dist/assets/doc-browser-DQDsmRlr.js +1 -0
  14. package/dist/assets/inbox-CIsD65lW.js +1 -0
  15. package/dist/assets/{keyboard-shortcuts-settings-page-BFBXVf20.js → keyboard-shortcuts-settings-page-L4kLGuB8.js} +1 -1
  16. package/dist/assets/{main-Bp1iozNB.js → main-BNWRrWc_.js} +2 -2
  17. package/dist/assets/{marketplace-BTDWnHP7.js → marketplace-BH1Sq8dL.js} +1 -1
  18. package/dist/assets/mcp-marketplace-page-BA-InAbJ.js +1 -0
  19. package/dist/assets/{model-config-page-CeVvZ29o.js → model-config-page-zqVWyIT0.js} +1 -1
  20. package/dist/assets/panel-apps-CMX4iWwQ.js +1 -0
  21. package/dist/assets/{panelStandalone-DomappXm.js → panelStandalone-C38o5B4Q.js} +1 -1
  22. package/dist/assets/{projects-fPTOn2Wz.js → projects-DNe43T2d.js} +1 -1
  23. package/dist/assets/{provider-models-D8WOdsdu.js → provider-models-zGsDUBHG.js} +1 -1
  24. package/dist/assets/{provider-scoped-model-input-BOPkUOtD.js → provider-scoped-model-input-DpEyP1h8.js} +1 -1
  25. package/dist/assets/{providers-config-page-BilPL0kF.js → providers-config-page-J-1auWPu.js} +1 -1
  26. package/dist/assets/{pwa-Cp7pPvsZ.js → pwa-jmuWbrqH.js} +1 -1
  27. package/dist/assets/remote-C7H2o46-.js +1 -0
  28. package/dist/assets/{runtime-config-page-P5RUq3YK.js → runtime-config-page-CJhqeDcu.js} +1 -1
  29. package/dist/assets/{service-apps-panel-BReYr_ni.js → service-apps-panel-Dj9okUgp.js} +1 -1
  30. package/dist/assets/{theme-provider-BsJ6HxeX.js → theme-provider-D4rd-tCP.js} +1 -1
  31. package/dist/index.html +10 -10
  32. package/dist/panel-standalone.html +4 -4
  33. package/package.json +7 -7
  34. package/src/features/chat/features/message/utils/__tests__/chat-message-timeline.utils.test.ts +16 -0
  35. package/src/features/chat/features/message/utils/__tests__/chat-message.utils.test.ts +17 -0
  36. package/src/features/chat/features/message/utils/chat-message-timeline.utils.ts +3 -3
  37. package/src/features/chat/features/message/utils/chat-message.utils.ts +11 -4
  38. package/src/features/chat/features/message/utils/chat-user-question-timeline.utils.ts +42 -0
  39. package/src/features/marketplace/components/detail-doc/__tests__/marketplace-detail-doc.test.tsx +2 -0
  40. package/src/features/panel-apps/components/panel-app-runtime-surface.tsx +3 -1
  41. package/src/features/panel-apps/utils/panel-app-doc-browser.utils.tsx +25 -10
  42. package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx +25 -3
  43. package/src/features/right-panel-resources/components/native-object-resource.tsx +3 -1
  44. package/src/features/right-panel-resources/components/system-object-resource.tsx +15 -1
  45. package/src/features/right-panel-resources/pages/resource-page.tsx +29 -2
  46. package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +16 -13
  47. package/src/shared/components/doc-browser/doc-browser-renderer.types.ts +3 -0
  48. package/src/shared/components/doc-browser/doc-browser.tsx +7 -1
  49. package/src/shared/components/ui/context-menu/context-menu-items.tsx +1 -0
  50. package/src/shared/components/ui/context-menu/context-menu.tsx +9 -0
  51. package/dist/assets/agents-p_wcGhC3.js +0 -1
  52. package/dist/assets/apps-CKFrWb00.js +0 -1
  53. package/dist/assets/cron-UqsFT41c.js +0 -1
  54. package/dist/assets/doc-browser-2VjSkax1.js +0 -1
  55. package/dist/assets/inbox-D62apR2j.js +0 -1
  56. package/dist/assets/mcp-marketplace-page-oHCbBkS-.js +0 -1
  57. package/dist/assets/panel-apps-CniMi7QW.js +0 -1
  58. package/dist/assets/remote-CsJMF8OR.js +0 -1
  59. package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +0 -108
  60. package/src/features/panel-apps/components/panel-app-toolbar.tsx +0 -89
@@ -46,57 +46,57 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
46
46
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
47
47
  `,...a.current()});return/^[\t ]/.test(l)&&(l=tT(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}sT.peek=cT;function sT(e){return e.value||``}function cT(){return`<`}lT.peek=uT;function lT(e,t,n,r){let i=Qw(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 uT(){return`!`}dT.peek=fT;function dT(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 fT(){return`!`}pT.peek=mT;function pT(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 mT(){return"`"}function hT(e,t){let n=Hv(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))}gT.peek=_T;function gT(e,t,n,r){let i=Qw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(hT(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 _T(e,t,n){return hT(e,n)?`<`:`[`}vT.peek=yT;function vT(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 yT(){return`[`}function bT(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 xT(e){let t=bT(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 ST(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function CT(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 wT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?ST(n):bT(n),s=e.ordered?o===`.`?`)`:`.`:xT(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),CT(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 TT(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 ET(e,t,n,r){let i=TT(n),a=n.bulletCurrent||bT(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 DT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var OT=MS([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function kT(e,t,n,r){return(e.children.some(function(e){return OT(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function AT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jT.peek=MT;function jT(e,t,n,r){let i=AT(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=nT(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=tT(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=nT(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+tT(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function MT(e,t,n){return n.options.strong||`*`}function NT(e,t,n,r){return n.safe(e.value,r)}function PT(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 FT(e,t,n){let r=(CT(n)+(n.options.ruleSpaces?` `:``)).repeat(PT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var IT={blockquote:Hw,break:Kw,code:Xw,definition:$w,emphasis:rT,hardBreak:Kw,heading:oT,html:sT,image:lT,imageReference:dT,inlineCode:pT,link:gT,linkReference:vT,list:wT,listItem:ET,paragraph:DT,root:kT,strong:jT,text:NT,thematicBreak:FT};function LT(){return{enter:{table:RT,tableData:HT,tableHeader:HT,tableRow:BT},exit:{codeText:UT,table:zT,tableData:VT,tableHeader:VT,tableRow:VT}}}function RT(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 zT(e){this.exit(e),this.data.inTable=void 0}function BT(e){this.enter({type:`tableRow`,children:[]},e)}function VT(e){this.exit(e)}function HT(e){this.enter({type:`tableCell`,children:[]},e)}function UT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,WT));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function WT(e,t){return t===`|`?t:e}function GT(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
48
48
  `,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(`
49
- `))}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 Lw(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=IT.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function KT(){return{exit:{taskListCheckValueChecked:JT,taskListCheckValueUnchecked:JT,paragraph:YT}}}function qT(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:XT}}}function JT(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function YT(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 XT(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=IT.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 ZT(){return[tw(),Tw(),Aw(),LT(),KT()]}function QT(e){return{extensions:[nw(),Ew(e),jw(),GT(e),qT()]}}var $T={tokenize:pE,partial:!0},eE={tokenize:mE,partial:!0},tE={tokenize:hE,partial:!0},nE={tokenize:gE,partial:!0},rE={tokenize:_E,partial:!0},iE={name:`wwwAutolink`,tokenize:dE,previous:vE},aE={name:`protocolAutolink`,tokenize:fE,previous:yE},oE={name:`emailAutolink`,tokenize:uE,previous:bE},sE={};function cE(){return{text:sE}}for(var lE=48;lE<123;)sE[lE]=oE,lE++,lE===58?lE=65:lE===91&&(lE=97);sE[43]=oE,sE[45]=oE,sE[46]=oE,sE[95]=oE,sE[72]=[oE,aE],sE[104]=[oE,aE],sE[87]=[oE,iE],sE[119]=[oE,iE];function uE(e,t,n){let r=this,i,a;return o;function o(t){return!xE(t)||!bE.call(r,r.previous)||SE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return xE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(rE,u,l)(t):t===45||t===95||ry(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&&ny(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function dE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!vE.call(r,r.previous)||SE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check($T,e.attempt(eE,e.attempt(tE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function fE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&yE.call(r,r.previous)&&!SE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ny(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||ay(t)||ly(t)||dy(t)||uy(t)?n(t):e.attempt(eE,e.attempt(tE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function pE(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 mE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(nE,c,s)(t):t===null||ly(t)||dy(t)||t!==45&&uy(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 hE(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(nE,t,a)(o):o===null||ly(o)||dy(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function gE(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||ly(o)||dy(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ly(e)||dy(e)?t(e):r(e)}function a(e){return ny(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ny(t)?(e.consume(t),o):n(t)}}function _E(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ry(e)?n(e):t(e)}}function vE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ly(e)}function yE(e){return!ny(e)}function bE(e){return!(e===47||xE(e))}function xE(e){return e===43||e===45||e===46||e===95||ry(e)}function SE(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}var CE={tokenize:jE,partial:!0};function wE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:OE,continuation:{tokenize:kE},exit:AE}},text:{91:{name:`gfmFootnoteCall`,tokenize:DE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:TE,resolveTo:EE}}}}function TE(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=ty(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 EE(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 DE(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||ly(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ty(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ly(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 OE(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||ly(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ty(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return ly(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),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function kE(e,t,n){return e.check(Oy,t,e.attempt(CE,t,n))}function AE(e){e.exit(`gfmFootnoteDefinition`)}function jE(e,t,n){let r=this;return U(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 ME(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&&Jv(o,o.length,0,xy(s,e.slice(r+1,n),t)),Jv(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Jv(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=by(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=by(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var NE=class{constructor(){this.map=[]}add(e,t,n){PE(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 PE(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 FE(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 IE(){return{flow:{null:{name:`table`,tokenize:LE,resolveAll:RE}}}}function LE(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):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?U(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||ly(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,H(t)?U(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 H(t)?U(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||V(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 H(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(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||V(n)?(e.exit(`tableRow`),t(n)):H(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ly(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 RE(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 NE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(BE(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=zE(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=zE(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=zE(f,t,o,i,n,d)):(o[0]=o[1],d=zE(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&BE(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=FE(t.events,n))}return e}function zE(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},VE(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=VE(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=VE(t.events,n[2]),a=VE(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({},VE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function BE(e,t,n,r,i){let a=[],o=VE(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 VE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var HE={name:`tasklistCheck`,tokenize:WE};function UE(){return{text:{91:HE}}}function WE(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 ly(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 V(r)?t(r):H(r)?e.check({tokenize:GE},t,n)(r):n(r)}}function GE(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function KE(e){return Zv([cE(),wE(),ME(e),IE(),UE()])}var qE={};function JE(e){let t=this,n=e||qE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(KE(n)),a.push(ZT()),o.push(QT(n))}function YE(){return e=>{let t=e=>{let n=e.children?.[0]?.children?.[0],r=e.type===`blockquote`&&n?.type===`text`&&/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](?:\n|$)/.exec(n.value??``);r&&(n.value=n.value.slice(r[0].length),e.data={...e.data,hProperties:{...e.data?.hProperties,"data-callout":r[1].toLowerCase()}}),e.children?.forEach(t)};t(e)}}var XE=e(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),ZE=Object.assign(QE(Error),{eval:QE(EvalError),range:QE(RangeError),reference:QE(ReferenceError),syntax:QE(SyntaxError),type:QE(TypeError),uri:QE(URIError)});function QE(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,XE.default)(t,...n))}}var $E={}.hasOwnProperty,eD={yaml:`-`,toml:`+`};function tD(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=nD(r[n]);return t}function nD(e){let t=e;if(typeof t==`string`){if(!$E.call(eD,t))throw ZE("Missing matter definition for `%s`",t);t={type:t,marker:eD[t]}}else if(typeof t!=`object`)throw ZE("Expected matter to be an object, not `%j`",t);if(!$E.call(t,`type`))throw ZE("Missing `type` in matter `%j`",t);if(!$E.call(t,`fence`)&&!$E.call(t,`marker`))throw ZE("Missing `marker` or `fence` in matter `%j`",t);return t}function rD(e){let t=tD(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=aD(e,`open`).charCodeAt(0),a=iD(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function iD(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=aD(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),H(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return H(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return V(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=aD(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||V(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||V(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),H(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return H(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||V(i)?(e.exit(r),t(i)):n(i)}}}function aD(e,t){return e.marker?oD(e.marker,t).repeat(3):oD(e.fence,t)}function oD(e,t){return typeof e==`string`?e:e[t]}function sD(e){let t=tD(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=cD(e),r[e.type]=lD,r[e.type+`Value`]=uD}return{enter:n,exit:r}}function cD(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function lD(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 uD(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function dD(e){let t=[],n={},r=tD(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=fD(e);let a=pD(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:JC(a.charAt(1))})}return{unsafe:t,handlers:n}}function fD(e){let t=pD(e,`open`),n=pD(e,`close`);return r;function r(e){return t+(e.value?`
49
+ `))}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 Lw(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=IT.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function KT(){return{exit:{taskListCheckValueChecked:JT,taskListCheckValueUnchecked:JT,paragraph:YT}}}function qT(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:XT}}}function JT(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function YT(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 XT(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=IT.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 ZT(){return[tw(),Tw(),Aw(),LT(),KT()]}function QT(e){return{extensions:[nw(),Ew(e),jw(),GT(e),qT()]}}var $T={tokenize:pE,partial:!0},eE={tokenize:mE,partial:!0},tE={tokenize:hE,partial:!0},nE={tokenize:gE,partial:!0},rE={tokenize:_E,partial:!0},iE={name:`wwwAutolink`,tokenize:dE,previous:vE},aE={name:`protocolAutolink`,tokenize:fE,previous:yE},oE={name:`emailAutolink`,tokenize:uE,previous:bE},sE={};function cE(){return{text:sE}}for(var lE=48;lE<123;)sE[lE]=oE,lE++,lE===58?lE=65:lE===91&&(lE=97);sE[43]=oE,sE[45]=oE,sE[46]=oE,sE[95]=oE,sE[72]=[oE,aE],sE[104]=[oE,aE],sE[87]=[oE,iE],sE[119]=[oE,iE];function uE(e,t,n){let r=this,i,a;return o;function o(t){return!xE(t)||!bE.call(r,r.previous)||SE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return xE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(rE,u,l)(t):t===45||t===95||ry(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&&ny(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function dE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!vE.call(r,r.previous)||SE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check($T,e.attempt(eE,e.attempt(tE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function fE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&yE.call(r,r.previous)&&!SE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ny(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||ay(t)||ly(t)||dy(t)||uy(t)?n(t):e.attempt(eE,e.attempt(tE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function pE(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 mE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(nE,c,s)(t):t===null||ly(t)||dy(t)||t!==45&&uy(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 hE(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(nE,t,a)(o):o===null||ly(o)||dy(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function gE(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||ly(o)||dy(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ly(e)||dy(e)?t(e):r(e)}function a(e){return ny(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ny(t)?(e.consume(t),o):n(t)}}function _E(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return ry(e)?n(e):t(e)}}function vE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ly(e)}function yE(e){return!ny(e)}function bE(e){return!(e===47||xE(e))}function xE(e){return e===43||e===45||e===46||e===95||ry(e)}function SE(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}var CE={tokenize:jE,partial:!0};function wE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:OE,continuation:{tokenize:kE},exit:AE}},text:{91:{name:`gfmFootnoteCall`,tokenize:DE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:TE,resolveTo:EE}}}}function TE(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=ty(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 EE(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 DE(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||ly(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ty(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ly(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 OE(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||ly(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ty(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return ly(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),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function kE(e,t,n){return e.check(Oy,t,e.attempt(CE,t,n))}function AE(e){e.exit(`gfmFootnoteDefinition`)}function jE(e,t,n){let r=this;return U(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 ME(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&&Jv(o,o.length,0,xy(s,e.slice(r+1,n),t)),Jv(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Jv(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=by(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=by(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var NE=class{constructor(){this.map=[]}add(e,t,n){PE(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 PE(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 FE(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 IE(){return{flow:{null:{name:`table`,tokenize:LE,resolveAll:RE}}}}function LE(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):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?U(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||ly(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,H(t)?U(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 H(t)?U(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||V(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 H(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(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||V(n)?(e.exit(`tableRow`),t(n)):H(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ly(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 RE(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 NE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(BE(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=zE(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=zE(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=zE(f,t,o,i,n,d)):(o[0]=o[1],d=zE(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&BE(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=FE(t.events,n))}return e}function zE(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},VE(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=VE(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=VE(t.events,n[2]),a=VE(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({},VE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function BE(e,t,n,r,i){let a=[],o=VE(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 VE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var HE={name:`tasklistCheck`,tokenize:WE};function UE(){return{text:{91:HE}}}function WE(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 ly(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 V(r)?t(r):H(r)?e.check({tokenize:GE},t,n)(r):n(r)}}function GE(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function KE(e){return Zv([cE(),wE(),ME(e),IE(),UE()])}var qE={};function JE(e){let t=this,n=e||qE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(KE(n)),a.push(ZT()),o.push(QT(n))}function YE(e){YC(e,[/\r?\n|\r/g,XE])}function XE(){return{type:`break`}}function ZE(){return function(e){YE(e)}}function QE(){return e=>{let t=e=>{let n=e.children?.[0]?.children?.[0],r=e.type===`blockquote`&&n?.type===`text`&&/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\](?:\n|$)/.exec(n.value??``);r&&(n.value=n.value.slice(r[0].length),e.data={...e.data,hProperties:{...e.data?.hProperties,"data-callout":r[1].toLowerCase()}}),e.children?.forEach(t)};t(e)}}var $E=e(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),eD=Object.assign(tD(Error),{eval:tD(EvalError),range:tD(RangeError),reference:tD(ReferenceError),syntax:tD(SyntaxError),type:tD(TypeError),uri:tD(URIError)});function tD(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,$E.default)(t,...n))}}var nD={}.hasOwnProperty,rD={yaml:`-`,toml:`+`};function iD(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=aD(r[n]);return t}function aD(e){let t=e;if(typeof t==`string`){if(!nD.call(rD,t))throw eD("Missing matter definition for `%s`",t);t={type:t,marker:rD[t]}}else if(typeof t!=`object`)throw eD("Expected matter to be an object, not `%j`",t);if(!nD.call(t,`type`))throw eD("Missing `type` in matter `%j`",t);if(!nD.call(t,`fence`)&&!nD.call(t,`marker`))throw eD("Missing `marker` or `fence` in matter `%j`",t);return t}function oD(e){let t=iD(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=cD(e,`open`).charCodeAt(0),a=sD(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function sD(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=cD(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),H(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return H(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return V(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=cD(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||V(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||V(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),H(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return H(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||V(i)?(e.exit(r),t(i)):n(i)}}}function cD(e,t){return e.marker?lD(e.marker,t).repeat(3):lD(e.fence,t)}function lD(e,t){return typeof e==`string`?e:e[t]}function uD(e){let t=iD(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=dD(e),r[e.type]=fD,r[e.type+`Value`]=pD}return{enter:n,exit:r}}function dD(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function fD(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 pD(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function mD(e){let t=[],n={},r=iD(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=hD(e);let a=gD(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:JC(a.charAt(1))})}return{unsafe:t,handlers:n}}function hD(e){let t=gD(e,`open`),n=gD(e,`close`);return r;function r(e){return t+(e.value?`
50
50
  `+e.value:``)+`
51
- `+n}}function pD(e,t){return e.marker?mD(e.marker,t).repeat(3):mD(e.fence,t)}function mD(e,t){return typeof e==`string`?e:e[t]}var hD=`yaml`;function gD(e){let t=this,n=e||hD,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(rD(n)),a.push(sD(n)),o.push(dD(n))}var _D=Symbol.for(`yaml.alias`),vD=Symbol.for(`yaml.document`),yD=Symbol.for(`yaml.map`),bD=Symbol.for(`yaml.pair`),xD=Symbol.for(`yaml.scalar`),SD=Symbol.for(`yaml.seq`),CD=Symbol.for(`yaml.node.type`),wD=e=>!!e&&typeof e==`object`&&e[CD]===_D,TD=e=>!!e&&typeof e==`object`&&e[CD]===vD,ED=e=>!!e&&typeof e==`object`&&e[CD]===yD,DD=e=>!!e&&typeof e==`object`&&e[CD]===bD,OD=e=>!!e&&typeof e==`object`&&e[CD]===xD,kD=e=>!!e&&typeof e==`object`&&e[CD]===SD;function AD(e){if(e&&typeof e==`object`)switch(e[CD]){case yD:case SD:return!0}return!1}function jD(e){if(e&&typeof e==`object`)switch(e[CD]){case _D:case yD:case xD:case SD:return!0}return!1}var MD=e=>(OD(e)||AD(e))&&!!e.anchor,ND=Symbol(`break visit`),PD=Symbol(`skip children`),FD=Symbol(`remove node`);function ID(e,t){let n=BD(t);TD(e)?LD(null,e.contents,n,Object.freeze([e]))===FD&&(e.contents=null):LD(null,e,n,Object.freeze([]))}ID.BREAK=ND,ID.SKIP=PD,ID.REMOVE=FD;function LD(e,t,n,r){let i=VD(e,t,n,r);if(jD(i)||DD(i))return HD(e,r,i),LD(e,i,n,r);if(typeof i!=`symbol`){if(AD(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=LD(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ND)return ND;else i===FD&&(t.items.splice(e,1),--e)}}else if(DD(t)){r=Object.freeze(r.concat(t));let e=LD(`key`,t.key,n,r);if(e===ND)return ND;e===FD&&(t.key=null);let i=LD(`value`,t.value,n,r);if(i===ND)return ND;i===FD&&(t.value=null)}}return i}async function RD(e,t){let n=BD(t);TD(e)?await zD(null,e.contents,n,Object.freeze([e]))===FD&&(e.contents=null):await zD(null,e,n,Object.freeze([]))}RD.BREAK=ND,RD.SKIP=PD,RD.REMOVE=FD;async function zD(e,t,n,r){let i=await VD(e,t,n,r);if(jD(i)||DD(i))return HD(e,r,i),zD(e,i,n,r);if(typeof i!=`symbol`){if(AD(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await zD(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ND)return ND;else i===FD&&(t.items.splice(e,1),--e)}}else if(DD(t)){r=Object.freeze(r.concat(t));let e=await zD(`key`,t.key,n,r);if(e===ND)return ND;e===FD&&(t.key=null);let i=await zD(`value`,t.value,n,r);if(i===ND)return ND;i===FD&&(t.value=null)}}return i}function BD(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function VD(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(ED(t))return n.Map?.(e,t,r);if(kD(t))return n.Seq?.(e,t,r);if(DD(t))return n.Pair?.(e,t,r);if(OD(t))return n.Scalar?.(e,t,r);if(wD(t))return n.Alias?.(e,t,r)}function HD(e,t,n){let r=t[t.length-1];if(AD(r))r.items[e]=n;else if(DD(r))e===`key`?r.key=n:r.value=n;else if(TD(r))r.contents=n;else{let e=wD(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var UD={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},WD=e=>e.replace(/[!,[\]{}]/g,e=>UD[e]),GD=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+WD(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&jD(e.contents)){let t={};ID(e.contents,(e,n)=>{jD(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
52
- `)}};GD.defaultYaml={explicit:!1,version:`1.2`},GD.defaultTags={"!!":`tag:yaml.org,2002:`};function KD(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function qD(e){let t=new Set;return ID(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function JD(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function YD(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=qD(e);let a=JD(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(OD(t.node)||AD(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function XD(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=XD(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=XD(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=XD(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=XD(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function ZD(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ZD(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!MD(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var QD=class{constructor(e){Object.defineProperty(this,CD,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!TD(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=ZD(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?XD(i,{"":o},``,o):o}},$D=class extends QD{constructor(e){super(_D),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ID(e,{Node:(e,t)=>{(wD(t)||MD(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(ZD(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=eO(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(KD(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function eO(e,t,n){if(wD(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(AD(t)){let r=0;for(let i of t.items){let t=eO(e,i,n);t>r&&(r=t)}return r}else if(DD(t)){let r=eO(e,t.key,n),i=eO(e,t.value,n);return Math.max(r,i)}return 1}var tO=e=>!e||typeof e!=`function`&&typeof e!=`object`,W=class extends QD{constructor(e){super(xD),this.value=e}toJSON(e,t){return t?.keep?this.value:ZD(this.value,e,t)}toString(){return String(this.value)}};W.BLOCK_FOLDED=`BLOCK_FOLDED`,W.BLOCK_LITERAL=`BLOCK_LITERAL`,W.PLAIN=`PLAIN`,W.QUOTE_DOUBLE=`QUOTE_DOUBLE`,W.QUOTE_SINGLE=`QUOTE_SINGLE`;var nO=`tag:yaml.org,2002:`;function rO(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function iO(e,t,n){if(TD(e)&&(e=e.contents),jD(e))return e;if(DD(e)){let t=n.schema[yD].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new $D(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=nO+t.slice(2));let l=rO(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new W(e);return c&&(c.node=t),t}l=e instanceof Map?o[yD]:Symbol.iterator in Object(e)?o[SD]:o[yD]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new W(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function aO(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return iO(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var oO=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,sO=class extends QD{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>jD(t)||DD(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(oO(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(AD(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,aO(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(AD(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&OD(i)?i.value:i:AD(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!DD(t))return!1;let n=t.value;return n==null||e&&OD(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return AD(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(AD(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,aO(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},cO=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function lO(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var uO=(e,t,n)=>e.endsWith(`
53
- `)?lO(n,t):n.includes(`
51
+ `+n}}function gD(e,t){return e.marker?_D(e.marker,t).repeat(3):_D(e.fence,t)}function _D(e,t){return typeof e==`string`?e:e[t]}var vD=`yaml`;function yD(e){let t=this,n=e||vD,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(oD(n)),a.push(uD(n)),o.push(mD(n))}var bD=Symbol.for(`yaml.alias`),xD=Symbol.for(`yaml.document`),SD=Symbol.for(`yaml.map`),CD=Symbol.for(`yaml.pair`),wD=Symbol.for(`yaml.scalar`),TD=Symbol.for(`yaml.seq`),ED=Symbol.for(`yaml.node.type`),DD=e=>!!e&&typeof e==`object`&&e[ED]===bD,OD=e=>!!e&&typeof e==`object`&&e[ED]===xD,kD=e=>!!e&&typeof e==`object`&&e[ED]===SD,AD=e=>!!e&&typeof e==`object`&&e[ED]===CD,jD=e=>!!e&&typeof e==`object`&&e[ED]===wD,MD=e=>!!e&&typeof e==`object`&&e[ED]===TD;function ND(e){if(e&&typeof e==`object`)switch(e[ED]){case SD:case TD:return!0}return!1}function PD(e){if(e&&typeof e==`object`)switch(e[ED]){case bD:case SD:case wD:case TD:return!0}return!1}var FD=e=>(jD(e)||ND(e))&&!!e.anchor,ID=Symbol(`break visit`),LD=Symbol(`skip children`),RD=Symbol(`remove node`);function zD(e,t){let n=UD(t);OD(e)?BD(null,e.contents,n,Object.freeze([e]))===RD&&(e.contents=null):BD(null,e,n,Object.freeze([]))}zD.BREAK=ID,zD.SKIP=LD,zD.REMOVE=RD;function BD(e,t,n,r){let i=WD(e,t,n,r);if(PD(i)||AD(i))return GD(e,r,i),BD(e,i,n,r);if(typeof i!=`symbol`){if(ND(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=BD(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ID)return ID;else i===RD&&(t.items.splice(e,1),--e)}}else if(AD(t)){r=Object.freeze(r.concat(t));let e=BD(`key`,t.key,n,r);if(e===ID)return ID;e===RD&&(t.key=null);let i=BD(`value`,t.value,n,r);if(i===ID)return ID;i===RD&&(t.value=null)}}return i}async function VD(e,t){let n=UD(t);OD(e)?await HD(null,e.contents,n,Object.freeze([e]))===RD&&(e.contents=null):await HD(null,e,n,Object.freeze([]))}VD.BREAK=ID,VD.SKIP=LD,VD.REMOVE=RD;async function HD(e,t,n,r){let i=await WD(e,t,n,r);if(PD(i)||AD(i))return GD(e,r,i),HD(e,i,n,r);if(typeof i!=`symbol`){if(ND(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await HD(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ID)return ID;else i===RD&&(t.items.splice(e,1),--e)}}else if(AD(t)){r=Object.freeze(r.concat(t));let e=await HD(`key`,t.key,n,r);if(e===ID)return ID;e===RD&&(t.key=null);let i=await HD(`value`,t.value,n,r);if(i===ID)return ID;i===RD&&(t.value=null)}}return i}function UD(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function WD(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(kD(t))return n.Map?.(e,t,r);if(MD(t))return n.Seq?.(e,t,r);if(AD(t))return n.Pair?.(e,t,r);if(jD(t))return n.Scalar?.(e,t,r);if(DD(t))return n.Alias?.(e,t,r)}function GD(e,t,n){let r=t[t.length-1];if(ND(r))r.items[e]=n;else if(AD(r))e===`key`?r.key=n:r.value=n;else if(OD(r))r.contents=n;else{let e=DD(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var KD={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},qD=e=>e.replace(/[!,[\]{}]/g,e=>KD[e]),JD=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+qD(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&PD(e.contents)){let t={};zD(e.contents,(e,n)=>{PD(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
52
+ `)}};JD.defaultYaml={explicit:!1,version:`1.2`},JD.defaultTags={"!!":`tag:yaml.org,2002:`};function YD(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function XD(e){let t=new Set;return zD(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function ZD(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function QD(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=XD(e);let a=ZD(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(jD(t.node)||ND(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function $D(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=$D(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=$D(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=$D(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=$D(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function eO(e,t,n){if(Array.isArray(e))return e.map((e,t)=>eO(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!FD(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var tO=class{constructor(e){Object.defineProperty(this,ED,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!OD(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=eO(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?$D(i,{"":o},``,o):o}},nO=class extends tO{constructor(e){super(bD),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],zD(e,{Node:(e,t)=>{(DD(t)||FD(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(eO(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=rO(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(YD(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function rO(e,t,n){if(DD(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(ND(t)){let r=0;for(let i of t.items){let t=rO(e,i,n);t>r&&(r=t)}return r}else if(AD(t)){let r=rO(e,t.key,n),i=rO(e,t.value,n);return Math.max(r,i)}return 1}var iO=e=>!e||typeof e!=`function`&&typeof e!=`object`,W=class extends tO{constructor(e){super(wD),this.value=e}toJSON(e,t){return t?.keep?this.value:eO(this.value,e,t)}toString(){return String(this.value)}};W.BLOCK_FOLDED=`BLOCK_FOLDED`,W.BLOCK_LITERAL=`BLOCK_LITERAL`,W.PLAIN=`PLAIN`,W.QUOTE_DOUBLE=`QUOTE_DOUBLE`,W.QUOTE_SINGLE=`QUOTE_SINGLE`;var aO=`tag:yaml.org,2002:`;function oO(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function sO(e,t,n){if(OD(e)&&(e=e.contents),PD(e))return e;if(AD(e)){let t=n.schema[SD].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new nO(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=aO+t.slice(2));let l=oO(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new W(e);return c&&(c.node=t),t}l=e instanceof Map?o[SD]:Symbol.iterator in Object(e)?o[TD]:o[SD]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new W(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function cO(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return sO(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var lO=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,uO=class extends tO{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>PD(t)||AD(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(lO(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(ND(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,cO(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(ND(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&jD(i)?i.value:i:ND(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!AD(t))return!1;let n=t.value;return n==null||e&&jD(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return ND(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(ND(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,cO(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},dO=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function fO(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var pO=(e,t,n)=>e.endsWith(`
53
+ `)?fO(n,t):n.includes(`
54
54
  `)?`
55
- `+lO(n,t):(e.endsWith(` `)?``:` `)+n,dO=`flow`,fO=`block`,pO=`quoted`;function mO(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=hO(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
56
- `)n===`block`&&(h=hO(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
55
+ `+fO(n,t):(e.endsWith(` `)?``:` `)+n,mO=`flow`,hO=`block`,gO=`quoted`;function _O(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=vO(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
56
+ `)n===`block`&&(h=vO(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
57
57
  `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
58
- `&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function hO(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
59
- `);r=t,i=t+1,a=e[i]}return r}var gO=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),_O=e=>/^(%|---|\.\.\.)/m.test(e);function vO(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
60
- `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function yO(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(_O(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
58
+ `&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function vO(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
59
+ `);r=t,i=t+1,a=e[i]}return r}var yO=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),bO=e=>/^(%|---|\.\.\.)/m.test(e);function xO(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
60
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function SO(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(bO(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
61
61
 
62
62
  `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
63
- `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:mO(o,a,pO,gO(t,!1))}function bO(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
64
- `)||/[ \t]\n|\n[ \t]/.test(e))return yO(e,t);let n=t.indent||(_O(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:mO(r,n,dO,gO(t,!1))}function xO(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=yO;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?bO:i&&!t?yO:n?bO:yO}return r(e,t)}var SO;try{SO=RegExp(`(^|(?<!
63
+ `,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:_O(o,a,gO,yO(t,!1))}function CO(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
64
+ `)||/[ \t]\n|\n[ \t]/.test(e))return SO(e,t);let n=t.indent||(bO(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:_O(r,n,mO,yO(t,!1))}function wO(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=SO;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?CO:i&&!t?SO:n?CO:SO}return r(e,t)}var TO;try{TO=RegExp(`(^|(?<!
65
65
  ))
66
66
  +(?!
67
- |$)`,`g`)}catch{SO=/\n+(?!\n|$)/g}function CO({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return xO(n,r);let l=r.indent||(r.forceBlockIndent||_O(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===W.BLOCK_FOLDED?!1:t===W.BLOCK_LITERAL?!0:!vO(n,c,l.length);if(!n)return u?`|
67
+ |$)`,`g`)}catch{TO=/\n+(?!\n|$)/g}function EO({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return wO(n,r);let l=r.indent||(r.forceBlockIndent||bO(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===W.BLOCK_FOLDED?!1:t===W.BLOCK_LITERAL?!0:!xO(n,c,l.length);if(!n)return u?`|
68
68
  `:`>
69
69
  `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
70
70
  `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
71
71
  `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
72
- `&&(p=p.slice(0,-1)),p.replace(SO,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
72
+ `&&(p=p.slice(0,-1)),p.replace(TO,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
73
73
  `)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
74
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=gO(r,!0);o!==`folded`&&t!==W.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=mO(`${v}${e}${p}`,l,fO,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function wO(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
75
- `)||u&&/[[\]{},]/.test(a))return xO(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
76
- `)?xO(a,t):CO(e,t,n,r);if(!s&&!u&&i!==W.PLAIN&&a.includes(`
77
- `))return CO(e,t,n,r);if(_O(a)){if(c===``)return t.forceBlockIndent=!0,CO(e,t,n,r);if(s&&c===l)return xO(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return xO(a,t)}return s?d:mO(d,c,dO,gO(t,!1))}function TO(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==W.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=W.QUOTE_DOUBLE);let c=e=>{switch(e){case W.BLOCK_FOLDED:case W.BLOCK_LITERAL:return i||a?xO(o.value,t):CO(o,t,n,r);case W.QUOTE_DOUBLE:return yO(o.value,t);case W.QUOTE_SINGLE:return bO(o.value,t);case W.PLAIN:return wO(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function EO(e,t){let n=Object.assign({blockQuote:!0,commentString:cO,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function DO(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(OD(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function OO(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(OD(e)||AD(e))&&e.anchor;a&&KD(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function kO(e,t,n,r){if(DD(e))return e.toString(t,n,r);if(wD(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=jD(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=DO(t.doc.schema.tags,a);let o=OO(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):OD(a)?TO(a,t,n,r):a.toString(t,n,r);return o?OD(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function AO({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=jD(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(AD(e)||!jD(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||AD(e)||(OD(e)?e.type===W.BLOCK_FOLDED||e.type===W.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=kO(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=uO(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=uO(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=uO(g,n.indent,l(f))));let _,v,y;jD(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&OD(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&kD(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=kO(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
78
- `:``,v){let e=l(v);S+=`\n${lO(e,n.indent)}`}x===``&&!n.inFlow?S===`
74
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=yO(r,!0);o!==`folded`&&t!==W.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=_O(`${v}${e}${p}`,l,hO,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function DO(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
75
+ `)||u&&/[[\]{},]/.test(a))return wO(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
76
+ `)?wO(a,t):EO(e,t,n,r);if(!s&&!u&&i!==W.PLAIN&&a.includes(`
77
+ `))return EO(e,t,n,r);if(bO(a)){if(c===``)return t.forceBlockIndent=!0,EO(e,t,n,r);if(s&&c===l)return wO(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return wO(a,t)}return s?d:_O(d,c,mO,yO(t,!1))}function OO(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==W.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=W.QUOTE_DOUBLE);let c=e=>{switch(e){case W.BLOCK_FOLDED:case W.BLOCK_LITERAL:return i||a?wO(o.value,t):EO(o,t,n,r);case W.QUOTE_DOUBLE:return SO(o.value,t);case W.QUOTE_SINGLE:return CO(o.value,t);case W.PLAIN:return DO(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function kO(e,t){let n=Object.assign({blockQuote:!0,commentString:dO,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function AO(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(jD(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function jO(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(jD(e)||ND(e))&&e.anchor;a&&YD(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function MO(e,t,n,r){if(AD(e))return e.toString(t,n,r);if(DD(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=PD(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=AO(t.doc.schema.tags,a);let o=jO(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):jD(a)?OO(a,t,n,r):a.toString(t,n,r);return o?jD(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function NO({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=PD(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(ND(e)||!PD(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||ND(e)||(jD(e)?e.type===W.BLOCK_FOLDED||e.type===W.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=MO(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=pO(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=pO(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=pO(g,n.indent,l(f))));let _,v,y;PD(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&jD(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&MD(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=MO(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
78
+ `:``,v){let e=l(v);S+=`\n${fO(e,n.indent)}`}x===``&&!n.inFlow?S===`
79
79
  `&&y&&(S=`
80
80
 
81
- `):S+=`\n${n.indent}`}else if(!p&&AD(t)){let e=x[0],r=x.indexOf(`
81
+ `):S+=`\n${n.indent}`}else if(!p&&ND(t)){let e=x[0],r=x.indexOf(`
82
82
  `),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else (x===``||x[0]===`
83
- `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=uO(g,n.indent,l(y)):h&&i&&i(),g}function jO(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var MO=`<<`,NO={identify:e=>e===MO||typeof e==`symbol`&&e.description===MO,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new W(Symbol(MO)),{addToJSMap:FO}),stringify:()=>MO},PO=(e,t)=>(NO.identify(t)||OD(t)&&(!t.type||t.type===W.PLAIN)&&NO.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===NO.tag&&e.default);function FO(e,t,n){if(n=e&&wD(n)?n.resolve(e.doc):n,kD(n))for(let r of n.items)IO(e,t,r);else if(Array.isArray(n))for(let r of n)IO(e,t,r);else IO(e,t,n)}function IO(e,t,n){let r=e&&wD(n)?n.resolve(e.doc):n;if(!ED(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function LO(e,t,{key:n,value:r}){if(jD(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(PO(e,n))FO(e,t,r);else{let i=ZD(n,``,e);if(t instanceof Map)t.set(i,ZD(r,i,e));else if(t instanceof Set)t.add(i);else{let a=RO(n,i,e),o=ZD(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function RO(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(jD(e)&&n?.doc){let t=EO(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),jO(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function zO(e,t,n){return new BO(iO(e,void 0,n),iO(t,void 0,n))}var BO=class e{constructor(e,t=null){Object.defineProperty(this,CD,{value:bD}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return jD(n)&&(n=n.clone(t)),jD(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return LO(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?AO(this,e,t,n):JSON.stringify(this)}};function VO(e,t,n){return(t.inFlow??e.flow?UO:HO)(e,t,n)}function HO({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(jD(i))!d&&i.spaceBefore&&f.push(``),WO(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(DD(i)){let e=jD(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),WO(n,f,e.commentBefore,d))}d=!1;let s=kO(i,u,()=>o=null,()=>d=!0);o&&(s+=uO(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
83
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=pO(g,n.indent,l(y)):h&&i&&i(),g}function PO(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var FO=`<<`,IO={identify:e=>e===FO||typeof e==`symbol`&&e.description===FO,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new W(Symbol(FO)),{addToJSMap:RO}),stringify:()=>FO},LO=(e,t)=>(IO.identify(t)||jD(t)&&(!t.type||t.type===W.PLAIN)&&IO.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===IO.tag&&e.default);function RO(e,t,n){if(n=e&&DD(n)?n.resolve(e.doc):n,MD(n))for(let r of n.items)zO(e,t,r);else if(Array.isArray(n))for(let r of n)zO(e,t,r);else zO(e,t,n)}function zO(e,t,n){let r=e&&DD(n)?n.resolve(e.doc):n;if(!kD(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function BO(e,t,{key:n,value:r}){if(PD(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(LO(e,n))RO(e,t,r);else{let i=eO(n,``,e);if(t instanceof Map)t.set(i,eO(r,i,e));else if(t instanceof Set)t.add(i);else{let a=VO(n,i,e),o=eO(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function VO(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(PD(e)&&n?.doc){let t=kO(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),PO(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function HO(e,t,n){return new UO(sO(e,void 0,n),sO(t,void 0,n))}var UO=class e{constructor(e,t=null){Object.defineProperty(this,ED,{value:CD}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return PD(n)&&(n=n.clone(t)),PD(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return BO(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?NO(this,e,t,n):JSON.stringify(this)}};function WO(e,t,n){return(t.inFlow??e.flow?KO:GO)(e,t,n)}function GO({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(PD(i))!d&&i.spaceBefore&&f.push(``),qO(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(AD(i)){let e=PD(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),qO(n,f,e.commentBefore,d))}d=!1;let s=MO(i,u,()=>o=null,()=>d=!0);o&&(s+=pO(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
84
84
  `}}return e?(p+=`
85
- `+lO(l(e),c),s&&s()):d&&o&&o(),p}function UO({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(jD(i))i.spaceBefore&&d.push(``),WO(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(DD(i)){let e=jD(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),WO(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=jD(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=kO(i,c,()=>a=null);n<e.length-1&&(o+=`,`),a&&(o+=uO(o,r,s(a))),!l&&(d.length>u||o.includes(`
85
+ `+fO(l(e),c),s&&s()):d&&o&&o(),p}function KO({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(PD(i))i.spaceBefore&&d.push(``),qO(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(AD(i)){let e=PD(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),qO(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=PD(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=MO(i,c,()=>a=null);n<e.length-1&&(o+=`,`),a&&(o+=pO(o,r,s(a))),!l&&(d.length>u||o.includes(`
86
86
  `))&&(l=!0),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
87
- `;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function WO({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=lO(t(r),e);n.push(i.trimStart())}}function GO(e,t){let n=OD(t)?t.value:t;for(let r of e)if(DD(r)&&(r.key===t||r.key===n||OD(r.key)&&r.key.value===n))return r}var KO=class extends sO{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(yD,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(zO(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=DD(e)?e:!e||typeof e!=`object`||!(`key`in e)?new BO(e,e?.value):new BO(e.key,e.value);let r=GO(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);OD(r.value)&&tO(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=GO(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=GO(this.items,e)?.value;return(!t&&OD(n)?n.value:n)??void 0}has(e){return!!GO(this.items,e)}set(e,t){this.add(new BO(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)LO(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!DD(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),VO(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},qO={collection:`map`,default:!0,nodeClass:KO,tag:`tag:yaml.org,2002:map`,resolve(e,t){return ED(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>KO.from(e,t,n)},JO=class extends sO{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(SD,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=YO(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=YO(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&OD(r)?r.value:r}has(e){let t=YO(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=YO(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];OD(r)&&tO(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(ZD(e,String(r++),t));return n}toString(e,t,n){return e?VO(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(iO(a,void 0,n))}}return i}};function YO(e){let t=OD(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var XO={collection:`seq`,default:!0,nodeClass:JO,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return kD(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>JO.from(e,t,n)},ZO={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),TO(e,t,n,r)}},QO={identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new W(null),stringify:({source:e},t)=>typeof e==`string`&&QO.test.test(e)?e:t.options.nullStr},$O={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new W(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&$O.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function ek({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-- >0;)a+=`0`}return a}var tk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:ek},nk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ek(e)}},rk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new W(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:ek},ik=e=>typeof e==`bigint`||Number.isInteger(e),ak=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function ok(e,t,n){let{value:r}=e;return ik(r)&&r>=0?n+r.toString(t):ek(e)}var sk={identify:e=>ik(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>ak(e,2,8,n),stringify:e=>ok(e,8,`0o`)},ck={identify:ik,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ak(e,0,10,n),stringify:ek},lk={identify:e=>ik(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ak(e,2,16,n),stringify:e=>ok(e,16,`0x`)},uk=[qO,XO,ZO,QO,$O,sk,ck,lk,tk,nk,rk];function dk(e){return typeof e==`bigint`||Number.isInteger(e)}var fk=({value:e})=>JSON.stringify(e),pk=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:fk},{identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:fk},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:fk},{identify:dk,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>dk(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:fk}],mk=[qO,XO].concat(pk,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),hk={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=W.BLOCK_LITERAL,t!==W.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===W.BLOCK_LITERAL?`
88
- `:` `)}return TO({comment:e,type:t,value:s},r,i,a)}};function gk(e,t){if(kD(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!DD(r)){if(ED(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new BO(new W(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=DD(r)?r:new BO(r)}}else t(`Expected a sequence for this tag`);return e}function _k(e,t,n){let{replacer:r}=n,i=new JO(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(zO(o,s,n))}return i}var vk={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:gk,createNode:_k},yk=class e extends JO{constructor(){super(),this.add=KO.prototype.add.bind(this),this.delete=KO.prototype.delete.bind(this),this.get=KO.prototype.get.bind(this),this.has=KO.prototype.has.bind(this),this.set=KO.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(DD(e)?(r=ZD(e.key,``,t),i=ZD(e.value,r,t)):r=ZD(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=_k(e,t,n),i=new this;return i.items=r.items,i}};yk.tag=`tag:yaml.org,2002:omap`;var bk={collection:`seq`,identify:e=>e instanceof Map,nodeClass:yk,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=gk(e,t),r=[];for(let{key:e}of n.items)OD(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new yk,n)},createNode:(e,t,n)=>yk.from(e,t,n)};function xk({value:e,source:t},n){return t&&(e?Sk:Ck).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Sk={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new W(!0),stringify:xk},Ck={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new W(!1),stringify:xk},wk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:ek},Tk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():ek(e)}},Ek={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new W(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:ek},Dk=e=>typeof e==`bigint`||Number.isInteger(e);function Ok(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function kk(e,t,n){let{value:r}=e;if(Dk(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return ek(e)}var Ak={identify:Dk,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Ok(e,2,2,n),stringify:e=>kk(e,2,`0b`)},jk={identify:Dk,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Ok(e,1,8,n),stringify:e=>kk(e,8,`0`)},Mk={identify:Dk,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Ok(e,0,10,n),stringify:ek},Nk={identify:Dk,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Ok(e,2,16,n),stringify:e=>kk(e,16,`0x`)},Pk=class e extends KO{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=DD(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new BO(e.key,null):new BO(e,null),GO(this.items,t.key)||this.items.push(t)}get(e,t){let n=GO(this.items,e);return!t&&DD(n)?OD(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=GO(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new BO(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(zO(e,null,n));return i}};Pk.tag=`tag:yaml.org,2002:set`;var Fk={collection:`map`,identify:e=>e instanceof Set,nodeClass:Pk,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Pk.from(e,t,n),resolve(e,t){if(ED(e)){if(e.hasAllNullValues(!0))return Object.assign(new Pk,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Ik(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function Lk(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return ek(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var Rk={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Ik(e,n),stringify:Lk},zk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Ik(e,!1),stringify:Lk},Bk={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(Bk.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=Ik(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},Vk=[qO,XO,ZO,QO,Sk,Ck,Ak,jk,Mk,Nk,wk,Tk,Ek,hk,NO,bk,vk,Fk,Rk,zk,Bk],Hk=new Map([[`core`,uk],[`failsafe`,[qO,XO,ZO]],[`json`,mk],[`yaml11`,Vk],[`yaml-1.1`,Vk]]),Uk={binary:hk,bool:$O,float:rk,floatExp:nk,floatNaN:tk,floatTime:zk,int:ck,intHex:lk,intOct:sk,intTime:Rk,map:qO,merge:NO,null:QO,omap:bk,pairs:vk,seq:XO,set:Fk,timestamp:Bk},Wk={"tag:yaml.org,2002:binary":hk,"tag:yaml.org,2002:merge":NO,"tag:yaml.org,2002:omap":bk,"tag:yaml.org,2002:pairs":vk,"tag:yaml.org,2002:set":Fk,"tag:yaml.org,2002:timestamp":Bk};function Gk(e,t,n){let r=Hk.get(t);if(r&&!e)return n&&!r.includes(NO)?r.concat(NO):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(Hk.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(NO)),i.reduce((e,t)=>{let n=typeof t==`string`?Uk[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Uk).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var Kk=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,qk=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Gk(e,`compat`):e?Gk(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Wk:{},this.tags=Gk(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,yD,{value:qO}),Object.defineProperty(this,xD,{value:ZO}),Object.defineProperty(this,SD,{value:XO}),this.sortMapEntries=typeof a==`function`?a:a===!0?Kk:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Jk(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=EO(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(lO(t,``))}let o=!1,s=null;if(e.contents){if(jD(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(lO(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=kO(e.contents,i,()=>s=null,t);s&&(c+=uO(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(kO(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=a(e.comment);t.includes(`
89
- `)?(n.push(`...`),n.push(lO(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(lO(a(t),``)))}return n.join(`
87
+ `;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function qO({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=fO(t(r),e);n.push(i.trimStart())}}function JO(e,t){let n=jD(t)?t.value:t;for(let r of e)if(AD(r)&&(r.key===t||r.key===n||jD(r.key)&&r.key.value===n))return r}var YO=class extends uO{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(SD,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(HO(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=AD(e)?e:!e||typeof e!=`object`||!(`key`in e)?new UO(e,e?.value):new UO(e.key,e.value);let r=JO(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);jD(r.value)&&iO(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=JO(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=JO(this.items,e)?.value;return(!t&&jD(n)?n.value:n)??void 0}has(e){return!!JO(this.items,e)}set(e,t){this.add(new UO(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)BO(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!AD(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),WO(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},XO={collection:`map`,default:!0,nodeClass:YO,tag:`tag:yaml.org,2002:map`,resolve(e,t){return kD(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>YO.from(e,t,n)},ZO=class extends uO{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(TD,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=QO(e);return typeof t==`number`?this.items.splice(t,1).length>0:!1}get(e,t){let n=QO(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&jD(r)?r.value:r}has(e){let t=QO(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=QO(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];jD(r)&&iO(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(eO(e,String(r++),t));return n}toString(e,t,n){return e?WO(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(sO(a,void 0,n))}}return i}};function QO(e){let t=jD(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var $O={collection:`seq`,default:!0,nodeClass:ZO,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return MD(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>ZO.from(e,t,n)},ek={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),OO(e,t,n,r)}},tk={identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new W(null),stringify:({source:e},t)=>typeof e==`string`&&tk.test.test(e)?e:t.options.nullStr},nk={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new W(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&nk.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function rk({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-- >0;)a+=`0`}return a}var ik={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:rk},ak={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():rk(e)}},ok={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new W(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:rk},sk=e=>typeof e==`bigint`||Number.isInteger(e),ck=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function lk(e,t,n){let{value:r}=e;return sk(r)&&r>=0?n+r.toString(t):rk(e)}var uk={identify:e=>sk(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>ck(e,2,8,n),stringify:e=>lk(e,8,`0o`)},dk={identify:sk,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ck(e,0,10,n),stringify:rk},fk={identify:e=>sk(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ck(e,2,16,n),stringify:e=>lk(e,16,`0x`)},pk=[XO,$O,ek,tk,nk,uk,dk,fk,ik,ak,ok];function mk(e){return typeof e==`bigint`||Number.isInteger(e)}var hk=({value:e})=>JSON.stringify(e),gk=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:hk},{identify:e=>e==null,createNode:()=>new W(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:hk},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:hk},{identify:mk,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>mk(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:hk}],_k=[XO,$O].concat(gk,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),vk={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}else return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=W.BLOCK_LITERAL,t!==W.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===W.BLOCK_LITERAL?`
88
+ `:` `)}return OO({comment:e,type:t,value:s},r,i,a)}};function yk(e,t){if(MD(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!AD(r)){if(kD(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new UO(new W(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=AD(r)?r:new UO(r)}}else t(`Expected a sequence for this tag`);return e}function bk(e,t,n){let{replacer:r}=n,i=new ZO(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(HO(o,s,n))}return i}var xk={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:yk,createNode:bk},Sk=class e extends ZO{constructor(){super(),this.add=YO.prototype.add.bind(this),this.delete=YO.prototype.delete.bind(this),this.get=YO.prototype.get.bind(this),this.has=YO.prototype.has.bind(this),this.set=YO.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(AD(e)?(r=eO(e.key,``,t),i=eO(e.value,r,t)):r=eO(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=bk(e,t,n),i=new this;return i.items=r.items,i}};Sk.tag=`tag:yaml.org,2002:omap`;var Ck={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Sk,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=yk(e,t),r=[];for(let{key:e}of n.items)jD(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Sk,n)},createNode:(e,t,n)=>Sk.from(e,t,n)};function wk({value:e,source:t},n){return t&&(e?Tk:Ek).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Tk={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new W(!0),stringify:wk},Ek={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new W(!1),stringify:wk},Dk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:rk},Ok={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():rk(e)}},kk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new W(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:rk},Ak=e=>typeof e==`bigint`||Number.isInteger(e);function jk(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function Mk(e,t,n){let{value:r}=e;if(Ak(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return rk(e)}var Nk={identify:Ak,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>jk(e,2,2,n),stringify:e=>Mk(e,2,`0b`)},Pk={identify:Ak,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>jk(e,1,8,n),stringify:e=>Mk(e,8,`0`)},Fk={identify:Ak,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>jk(e,0,10,n),stringify:rk},Ik={identify:Ak,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>jk(e,2,16,n),stringify:e=>Mk(e,16,`0x`)},Lk=class e extends YO{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=AD(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new UO(e.key,null):new UO(e,null),JO(this.items,t.key)||this.items.push(t)}get(e,t){let n=JO(this.items,e);return!t&&AD(n)?jD(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=JO(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new UO(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(HO(e,null,n));return i}};Lk.tag=`tag:yaml.org,2002:set`;var Rk={collection:`map`,identify:e=>e instanceof Set,nodeClass:Lk,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Lk.from(e,t,n),resolve(e,t){if(kD(e)){if(e.hasAllNullValues(!0))return Object.assign(new Lk,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function zk(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function Bk(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return rk(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var Vk={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>zk(e,n),stringify:Bk},Hk={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>zk(e,!1),stringify:Bk},Uk={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(Uk.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=zk(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},Wk=[XO,$O,ek,tk,Tk,Ek,Nk,Pk,Fk,Ik,Dk,Ok,kk,vk,IO,Ck,xk,Rk,Vk,Hk,Uk],Gk=new Map([[`core`,pk],[`failsafe`,[XO,$O,ek]],[`json`,_k],[`yaml11`,Wk],[`yaml-1.1`,Wk]]),Kk={binary:vk,bool:nk,float:ok,floatExp:ak,floatNaN:ik,floatTime:Hk,int:dk,intHex:fk,intOct:uk,intTime:Vk,map:XO,merge:IO,null:tk,omap:Ck,pairs:xk,seq:$O,set:Rk,timestamp:Uk},qk={"tag:yaml.org,2002:binary":vk,"tag:yaml.org,2002:merge":IO,"tag:yaml.org,2002:omap":Ck,"tag:yaml.org,2002:pairs":xk,"tag:yaml.org,2002:set":Rk,"tag:yaml.org,2002:timestamp":Uk};function Jk(e,t,n){let r=Gk.get(t);if(r&&!e)return n&&!r.includes(IO)?r.concat(IO):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(Gk.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(IO)),i.reduce((e,t)=>{let n=typeof t==`string`?Kk[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Kk).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var Yk=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Xk=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Jk(e,`compat`):e?Jk(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?qk:{},this.tags=Jk(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,SD,{value:XO}),Object.defineProperty(this,wD,{value:ek}),Object.defineProperty(this,TD,{value:$O}),this.sortMapEntries=typeof a==`function`?a:a===!0?Yk:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Zk(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=kO(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(fO(t,``))}let o=!1,s=null;if(e.contents){if(PD(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(fO(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=MO(e.contents,i,()=>s=null,t);s&&(c+=pO(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(MO(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=a(e.comment);t.includes(`
89
+ `)?(n.push(`...`),n.push(fO(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(fO(a(t),``)))}return n.join(`
90
90
  `)+`
91
- `}var Yk=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,CD,{value:vD});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new GD({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[CD]:{value:vD}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jD(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Xk(this.contents)&&this.contents.add(e)}addIn(e,t){Xk(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=qD(this);e.anchor=!t||n.has(t)?JD(t||`a`,n):t}return new $D(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=YD(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=iO(e,l,p);return o&&AD(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new BO(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Xk(this.contents)?this.contents.delete(e):!1}deleteIn(e){return oO(e)?this.contents==null?!1:(this.contents=null,!0):Xk(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return AD(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return oO(e)?!t&&OD(this.contents)?this.contents.value:this.contents:AD(this.contents)?this.contents.getIn(e,t):void 0}has(e){return AD(this.contents)?this.contents.has(e):!1}hasIn(e){return oO(e)?this.contents!==void 0:AD(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=aO(this.schema,[e],t):Xk(this.contents)&&this.contents.set(e,t)}setIn(e,t){oO(e)?this.contents=t:this.contents==null?this.contents=aO(this.schema,Array.from(e),t):Xk(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new GD({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new GD({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new qk(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=ZD(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?XD(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Jk(this,e)}};function Xk(e){if(AD(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var Zk=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Qk=class extends Zk{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},$k=class extends Zk{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},eA=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
92
- `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function tA(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function nA(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
93
- `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(nA(t.key)||nA(t.value))return!0}return!1;default:return!0}}function rA(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&nA(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function iA(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||OD(e)&&OD(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var aA=`All mapping items must start at the same column`;function oA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??KO)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=tA(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,aA)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
94
- `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||nA(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,aA);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&rA(r.indent,u,i),n.atKey=!1,iA(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=tA(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&rA(r.indent,f,i),s=c.range[2];let l=new BO(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
95
- `+_.comment:g.comment=_.comment);let e=new BO(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function sA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??JO)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=tA(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&rA(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function cA(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var lA=`Block collections are not allowed within flow collections`,uA=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function dA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new(a?.nodeClass??(o?KO:JO))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=tA(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
96
- `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&nA(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];DD(t)&&(t=t.value??t.key),t.comment?t.comment+=`
97
- `+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],uA(m)&&i(r.range,`BLOCK_IN_FLOW`,lA)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);uA(f)&&i(g.range,`BLOCK_IN_FLOW`,lA),n.atKey=!1;let _=tA(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?uA(m)&&i(v.range,`BLOCK_IN_FLOW`,lA):_.comment&&(g.comment?g.comment+=`
98
- `+_.comment:g.comment=_.comment);let y=new BO(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;iA(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new KO(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=cA(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
99
- `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function fA(e,t,n,r,i,a){let o=n.type===`block-map`?oA(e,t,n,r,a):n.type===`block-seq`?sA(e,t,n,r,a):dA(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function pA(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===KO.tagName&&s===`map`||o===JO.tagName&&s===`seq`)return fA(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),fA(e,t,n,i,o)}let l=fA(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=jD(u)?u:new W(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function mA(e,t,n){let r=t.offset,i=hA(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?W.BLOCK_FOLDED:W.BLOCK_LITERAL,o=t.source?gA(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
91
+ `}var Qk=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ED,{value:xD});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new JD({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[ED]:{value:xD}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=PD(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){$k(this.contents)&&this.contents.add(e)}addIn(e,t){$k(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=XD(this);e.anchor=!t||n.has(t)?ZD(t||`a`,n):t}return new nO(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=QD(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=sO(e,l,p);return o&&ND(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new UO(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return $k(this.contents)?this.contents.delete(e):!1}deleteIn(e){return lO(e)?this.contents==null?!1:(this.contents=null,!0):$k(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return ND(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return lO(e)?!t&&jD(this.contents)?this.contents.value:this.contents:ND(this.contents)?this.contents.getIn(e,t):void 0}has(e){return ND(this.contents)?this.contents.has(e):!1}hasIn(e){return lO(e)?this.contents!==void 0:ND(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=cO(this.schema,[e],t):$k(this.contents)&&this.contents.set(e,t)}setIn(e,t){lO(e)?this.contents=t:this.contents==null?this.contents=cO(this.schema,Array.from(e),t):$k(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new JD({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new JD({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Xk(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=eO(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?$D(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Zk(this,e)}};function $k(e){if(ND(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var eA=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},tA=class extends eA{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},nA=class extends eA{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},rA=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
92
+ `),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function iA(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function aA(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
93
+ `))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(aA(t.key)||aA(t.value))return!0}return!1;default:return!0}}function oA(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&aA(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function sA(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||jD(e)&&jD(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var cA=`All mapping items must start at the same column`;function lA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??YO)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=iA(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,cA)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
94
+ `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||aA(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,cA);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&oA(r.indent,u,i),n.atKey=!1,sA(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=iA(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&oA(r.indent,f,i),s=c.range[2];let l=new UO(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
95
+ `+_.comment:g.comment=_.comment);let e=new UO(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function uA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new(a?.nodeClass??ZO)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=iA(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&oA(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function dA(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var fA=`Block collections are not allowed within flow collections`,pA=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function mA({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new(a?.nodeClass??(o?YO:ZO))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=iA(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
96
+ `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&aA(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];AD(t)&&(t=t.value??t.key),t.comment?t.comment+=`
97
+ `+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],pA(m)&&i(r.range,`BLOCK_IN_FLOW`,fA)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);pA(f)&&i(g.range,`BLOCK_IN_FLOW`,fA),n.atKey=!1;let _=iA(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?pA(m)&&i(v.range,`BLOCK_IN_FLOW`,fA):_.comment&&(g.comment?g.comment+=`
98
+ `+_.comment:g.comment=_.comment);let y=new UO(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;sA(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new YO(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=dA(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
99
+ `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function hA(e,t,n,r,i,a){let o=n.type===`block-map`?lA(e,t,n,r,a):n.type===`block-seq`?uA(e,t,n,r,a):mA(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function gA(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===YO.tagName&&s===`map`||o===ZO.tagName&&s===`seq`)return hA(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),hA(e,t,n,i,o)}let l=hA(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=PD(u)?u:new W(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function _A(e,t,n){let r=t.offset,i=vA(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?W.BLOCK_FOLDED:W.BLOCK_LITERAL,o=t.source?yA(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
100
100
  `.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
101
101
  `;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===W.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
102
102
  `):t.length>c||r[0]===` `?(f===` `?f=`
@@ -111,66 +111,66 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
111
111
  `+o[e][0].slice(c);d[d.length-1]!==`
112
112
  `&&(d+=`
113
113
  `);break;default:d+=`
114
- `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function hA({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function gA(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function _A(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=W.PLAIN,c=vA(a,l);break;case`single-quoted-scalar`:s=W.QUOTE_SINGLE,c=yA(a,l);break;case`double-quoted-scalar`:s=W.QUOTE_DOUBLE,c=xA(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=cA(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function vA(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),bA(e)}function yA(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),bA(e.slice(1,-1)).replace(/''/g,`'`)}function bA(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
114
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function vA({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function yA(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function bA(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=W.PLAIN,c=xA(a,l);break;case`single-quoted-scalar`:s=W.QUOTE_SINGLE,c=SA(a,l);break;case`double-quoted-scalar`:s=W.QUOTE_DOUBLE,c=wA(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=dA(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function xA(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),CA(e)}function SA(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),CA(e.slice(1,-1)).replace(/''/g,`'`)}function CA(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
115
115
  `,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
116
116
  `,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
117
117
  `?i+=a:a=`
118
- `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function xA(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
118
+ `:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function wA(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
119
119
  `))if(i===`
120
- `){let{fold:t,offset:i}=SA(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=CA[i];if(a)n+=a;else if(i===`
120
+ `){let{fold:t,offset:i}=TA(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=EA[i];if(a)n+=a;else if(i===`
121
121
  `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
122
- `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=wA(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
122
+ `)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=DA(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
123
123
  `&&!(a===`\r`&&e[r+2]===`
124
- `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function SA(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
124
+ `)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function TA(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
125
125
  `||r===`\r`)&&!(r===`\r`&&e[t+2]!==`
126
126
  `);)r===`
127
127
  `&&(n+=`
128
- `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var CA={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
129
- `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function wA(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}function TA(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?mA(e,t,r):_A(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[xD]:c?EA(e.schema,i,c,n,r):t.type===`scalar`?DA(e,i,t,r):e.schema[xD];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=OD(a)?a:new W(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new W(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function EA(e,t,n,r,i){if(n===`!`)return e[xD];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[xD])}function DA({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[xD];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[xD];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function OA(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var kA={composeNode:AA,composeEmptyNode:jA};function AA(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=MA(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=TA(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:l=pA(kA,e,t,n,r),s&&(l.anchor=s.source.substring(1));break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),l=jA(e,t.offset,void 0,null,n,r),u=!1}return s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!OD(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function jA(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=TA(e,{type:`scalar`,offset:OA(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function MA({options:e},{offset:t,source:n,end:r},i){let a=new $D(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=cA(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function NA(e,t,{offset:n,start:r,value:i,end:a},o){let s=new Yk(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=tA(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?AA(c,i,l,o):jA(c,l.end,r,null,l,o);let u=s.contents.range[2],d=cA(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function PA(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function FA(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
128
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var EA={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
129
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function DA(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}function OA(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?_A(e,t,r):bA(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[wD]:c?kA(e.schema,i,c,n,r):t.type===`scalar`?AA(e,i,t,r):e.schema[wD];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=jD(a)?a:new W(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new W(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function kA(e,t,n,r,i){if(n===`!`)return e[wD];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[wD])}function AA({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[wD];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[wD];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function jA(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var MA={composeNode:NA,composeEmptyNode:PA};function NA(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=FA(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=OA(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:l=gA(MA,e,t,n,r),s&&(l.anchor=s.source.substring(1));break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),l=PA(e,t.offset,void 0,null,n,r),u=!1}return s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!jD(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function PA(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=OA(e,{type:`scalar`,offset:jA(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function FA({options:e},{offset:t,source:n,end:r},i){let a=new nO(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=dA(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function IA(e,t,{offset:n,start:r,value:i,end:a},o){let s=new Qk(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=iA(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?NA(c,i,l,o):PA(c,l.end,r,null,l,o);let u=s.contents.range[2],d=dA(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function LA(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function RA(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
130
130
 
131
131
  `:`
132
- `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var IA=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=PA(e);r?this.warnings.push(new $k(i,t,n)):this.errors.push(new Qk(i,t,n))},this.directives=new GD({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=FA(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(AD(i)&&!i.flow&&i.items.length>0){let e=i.items[0];DD(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:FA(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=PA(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=NA(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Qk(PA(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new Qk(PA(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=cA(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Qk(PA(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new Yk(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},LA=Symbol(`break visit`),RA=Symbol(`skip children`),zA=Symbol(`remove item`);function BA(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),VA(Object.freeze([]),e,t)}BA.BREAK=LA,BA.SKIP=RA,BA.REMOVE=zA,BA.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},BA.parentCollection=(e,t)=>{let n=BA.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function VA(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=VA(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===LA)return LA;else r===zA&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function HA(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
132
+ `)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var zA=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=LA(e);r?this.warnings.push(new nA(i,t,n)):this.errors.push(new tA(i,t,n))},this.directives=new JD({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=RA(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(ND(i)&&!i.flow&&i.items.length>0){let e=i.items[0];AD(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:RA(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=LA(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=IA(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new tA(LA(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new tA(LA(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=dA(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new tA(LA(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new Qk(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},BA=Symbol(`break visit`),VA=Symbol(`skip children`),HA=Symbol(`remove item`);function UA(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),WA(Object.freeze([]),e,t)}UA.BREAK=BA,UA.SKIP=VA,UA.REMOVE=HA,UA.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},UA.parentCollection=(e,t)=>{let n=UA.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function WA(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=WA(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===BA)return BA;else r===HA&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function GA(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
133
133
  `:case`\r
134
- `:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function UA(e){switch(e){case void 0:case` `:case`
135
- `:case`\r`:case` `:return!0;default:return!1}}var WA=new Set(`0123456789ABCDEFabcdef`),GA=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),KA=new Set(`,[]{}`),qA=new Set(` ,[]{}
136
- \r `),JA=e=>!e||qA.has(e),YA=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
134
+ `:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function KA(e){switch(e){case void 0:case` `:case`
135
+ `:case`\r`:case` `:return!0;default:return!1}}var qA=new Set(`0123456789ABCDEFabcdef`),JA=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),YA=new Set(`,[]{}`),XA=new Set(` ,[]{}
136
+ \r `),ZA=e=>!e||XA.has(e),QA=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
137
137
  `?!0:t===`\r`?this.buffer[e+1]===`
138
138
  `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
139
139
  `||!t&&!this.atEnd)return e+n+1}return t===`
140
- `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&UA(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
141
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&UA(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!UA(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&UA(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(JA),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&UA(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(JA),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||UA(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
140
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&KA(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
141
+ `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&KA(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!KA(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&KA(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(ZA),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&KA(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(ZA),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||KA(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
142
142
  `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
143
- `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>UA(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
143
+ `,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>KA(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
144
144
  `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
145
145
  `)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
146
146
  `,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
147
147
  `;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
148
- `&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(UA(r)||e&&KA.has(r))break;t=n}else if(UA(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
148
+ `&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(KA(r)||e&&YA.has(r))break;t=n}else if(KA(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
149
149
  `?(n+=1,r=`
150
- `,i=this.buffer[n+1]):t=n),i===`#`||e&&KA.has(i))break;if(r===`
151
- `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&KA.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(JA))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(UA(t)||e&&KA.has(t))return e?this.flowKey&&=!1:this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!UA(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(GA.has(t))t=this.buffer[++e];else if(t===`%`&&WA.has(this.buffer[e+1])&&WA.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
150
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&YA.has(i))break;if(r===`
151
+ `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&YA.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(ZA))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(KA(t)||e&&YA.has(t))return e?this.flowKey&&=!1:this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!KA(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(JA.has(t))t=this.buffer[++e];else if(t===`%`&&qA.has(this.buffer[e+1])&&qA.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
152
152
  `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
153
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},XA=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function ZA(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function QA(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function $A(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function ej(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function tj(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function nj(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!ZA(t.start,`explicit-key-ind`)&&!ZA(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,$A(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var rj=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new YA,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=HA(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&nj(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&QA(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:QA(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=tj(ej(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
153
+ `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},$A=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function ej(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function tj(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function nj(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function rj(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function ij(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function aj(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!ej(t.start,`explicit-key-ind`)&&!ej(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,nj(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var oj=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new QA,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=GA(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&aj(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&tj(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:tj(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=ij(rj(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
154
154
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
155
- `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(ZA(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=tj(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ZA(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if($A(t.key)&&!ZA(t.sep,`newline`)){let e=tj(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):ZA(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!ZA(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||ZA(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=tj(ej(t));nj(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
155
+ `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(ej(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=ij(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ej(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(nj(t.key)&&!ej(t.sep,`newline`)){let e=ij(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):ej(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!ej(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||ej(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=ij(rj(t));aj(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
156
156
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
157
- `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=tj(ej(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=tj(ej(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function ij(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new XA||null,prettyErrors:t}}function aj(e,t={}){let{lineCounter:n,prettyErrors:r}=ij(t),i=new rj(n?.addNewLine),a=new IA(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new Qk(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(eA(e,n)),o.warnings.forEach(eA(e,n))),o}function oj(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return TD(e)&&!r?e.toString(n):new Yk(e,r,n).toString(n)}function sj(){return e=>{for(let t of e.children??[])t.type===`yaml`&&(t.type=`frontmatter`,t.data={...t.data,hName:`div`,hProperties:{"data-frontmatter":t.value??``},hChildren:[]})}}function cj(e){try{let t=aj(e,{uniqueKeys:!0});if(t.errors.length||t.warnings.length)return null;let n=t.toJS({maxAliasCount:50});return!n||typeof n!=`object`||Array.isArray(n)?null:(JSON.stringify(n),Object.entries(n).map(([e,t])=>[e,t===null?`null`:typeof t==`object`?oj(t).trimEnd():String(t)]))}catch{return null}}function lj({open:e,children:t}){let n=(0,k.useRef)(null),r=(0,k.useRef)(null),i=(0,k.useRef)(!1),[a,o]=(0,k.useState)(e);return e&&!a&&o(!0),(0,k.useLayoutEffect)(()=>{let t=n.current,a=r.current;if(!t||!a)return;let s=!i.current;i.current=!0,t.inert=!e;let c=()=>{t.style.height=e?`auto`:`0px`,t.style.opacity=e?`1`:`0`,o(e)};if(s||typeof t.animate!=`function`||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){c();return}let l=null,u=performance.now()+200,d=e?a.getBoundingClientRect().height:0,f=(n,r)=>{let i=n===0?0:Number(getComputedStyle(t).opacity);l&&(l.onfinish=null,l.cancel()),t.style.height=`${n}px`,l=t.animate([{height:`${n}px`,opacity:i},{height:`${r}px`,opacity:e?1:0}],{duration:Math.max(0,u-performance.now()),easing:`cubic-bezier(0.2, 0, 0, 1)`,fill:`both`}),l.onfinish=()=>{c(),l?.cancel(),l=null}};f(t.getBoundingClientRect().height,d);let p=e&&typeof ResizeObserver<`u`?new ResizeObserver(()=>{if(!l)return;let e=a.getBoundingClientRect().height;if(Math.abs(e-d)<.5)return;let n=t.getBoundingClientRect().height;d=e,f(n,e)}):null;return p?.observe(a),()=>{p?.disconnect(),t.style.height=`${t.getBoundingClientRect().height}px`,t.style.opacity=getComputedStyle(t).opacity,l&&(l.onfinish=null,l.cancel())}},[e]),(0,A.jsx)(`div`,{ref:n,"aria-hidden":!e,style:{height:0,overflow:`hidden`},children:(0,A.jsx)(`div`,{ref:r,className:`flow-root min-w-0`,children:e||a?t():null})})}function uj({source:e,label:t}){let n=(0,k.useMemo)(()=>cj(e),[e]),[r,i]=(0,k.useState)(!0),a=(0,k.useId)();return(0,A.jsxs)(`div`,{className:`group/frontmatter not-prose mb-3 mt-0 overflow-hidden rounded-lg border border-border text-xs leading-5`,children:[(0,A.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(e=>!e),className:`flex min-h-9 w-full cursor-pointer items-center gap-1.5 px-3 py-1.5 text-left font-medium text-muted-foreground hover:bg-[var(--interaction-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]`,children:[(0,A.jsx)(We,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none`,style:{transform:r?`rotate(90deg)`:`rotate(0deg)`}}),t]}),(0,A.jsx)(`div`,{id:a,children:(0,A.jsx)(lj,{open:r,children:()=>(0,A.jsx)(`div`,{className:`max-h-80 overflow-auto border-t border-border px-3 py-2`,children:n?.length?(0,A.jsx)(`dl`,{className:`m-0 grid grid-cols-[minmax(0,7rem)_minmax(0,1fr)] gap-x-3 gap-y-1`,children:n.map(([e,t])=>(0,A.jsxs)(`div`,{className:`contents`,children:[(0,A.jsx)(`dt`,{className:`break-words text-muted-foreground`,children:e}),(0,A.jsx)(`dd`,{className:`m-0 whitespace-pre-wrap break-words text-foreground`,children:t})]},e))}):(0,A.jsx)(`pre`,{className:`m-0 whitespace-pre-wrap break-words font-mono text-xs text-foreground`,children:e})})})})]})}function dj(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function fj(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
157
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=ij(rj(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=ij(rj(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function sj(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new $A||null,prettyErrors:t}}function cj(e,t={}){let{lineCounter:n,prettyErrors:r}=sj(t),i=new oj(n?.addNewLine),a=new zA(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new tA(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(rA(e,n)),o.warnings.forEach(rA(e,n))),o}function lj(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return OD(e)&&!r?e.toString(n):new Qk(e,r,n).toString(n)}function uj(){return e=>{for(let t of e.children??[])t.type===`yaml`&&(t.type=`frontmatter`,t.data={...t.data,hName:`div`,hProperties:{"data-frontmatter":t.value??``},hChildren:[]})}}function dj(e){try{let t=cj(e,{uniqueKeys:!0});if(t.errors.length||t.warnings.length)return null;let n=t.toJS({maxAliasCount:50});return!n||typeof n!=`object`||Array.isArray(n)?null:(JSON.stringify(n),Object.entries(n).map(([e,t])=>[e,t===null?`null`:typeof t==`object`?lj(t).trimEnd():String(t)]))}catch{return null}}function fj({open:e,children:t}){let n=(0,k.useRef)(null),r=(0,k.useRef)(null),i=(0,k.useRef)(!1),[a,o]=(0,k.useState)(e);return e&&!a&&o(!0),(0,k.useLayoutEffect)(()=>{let t=n.current,a=r.current;if(!t||!a)return;let s=!i.current;i.current=!0,t.inert=!e;let c=()=>{t.style.height=e?`auto`:`0px`,t.style.opacity=e?`1`:`0`,o(e)};if(s||typeof t.animate!=`function`||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){c();return}let l=null,u=performance.now()+200,d=e?a.getBoundingClientRect().height:0,f=(n,r)=>{let i=n===0?0:Number(getComputedStyle(t).opacity);l&&(l.onfinish=null,l.cancel()),t.style.height=`${n}px`,l=t.animate([{height:`${n}px`,opacity:i},{height:`${r}px`,opacity:e?1:0}],{duration:Math.max(0,u-performance.now()),easing:`cubic-bezier(0.2, 0, 0, 1)`,fill:`both`}),l.onfinish=()=>{c(),l?.cancel(),l=null}};f(t.getBoundingClientRect().height,d);let p=e&&typeof ResizeObserver<`u`?new ResizeObserver(()=>{if(!l)return;let e=a.getBoundingClientRect().height;if(Math.abs(e-d)<.5)return;let n=t.getBoundingClientRect().height;d=e,f(n,e)}):null;return p?.observe(a),()=>{p?.disconnect(),t.style.height=`${t.getBoundingClientRect().height}px`,t.style.opacity=getComputedStyle(t).opacity,l&&(l.onfinish=null,l.cancel())}},[e]),(0,A.jsx)(`div`,{ref:n,"aria-hidden":!e,style:{height:0,overflow:`hidden`},children:(0,A.jsx)(`div`,{ref:r,className:`flow-root min-w-0`,children:e||a?t():null})})}function pj({source:e,label:t}){let n=(0,k.useMemo)(()=>dj(e),[e]),[r,i]=(0,k.useState)(!0),a=(0,k.useId)();return(0,A.jsxs)(`div`,{className:`group/frontmatter not-prose mb-3 mt-0 overflow-hidden rounded-lg border border-border text-xs leading-5`,children:[(0,A.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(e=>!e),className:`flex min-h-9 w-full cursor-pointer items-center gap-1.5 px-3 py-1.5 text-left font-medium text-muted-foreground hover:bg-[var(--interaction-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]`,children:[(0,A.jsx)(We,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none`,style:{transform:r?`rotate(90deg)`:`rotate(0deg)`}}),t]}),(0,A.jsx)(`div`,{id:a,children:(0,A.jsx)(fj,{open:r,children:()=>(0,A.jsx)(`div`,{className:`max-h-80 overflow-auto border-t border-border px-3 py-2`,children:n?.length?(0,A.jsx)(`dl`,{className:`m-0 grid grid-cols-[minmax(0,7rem)_minmax(0,1fr)] gap-x-3 gap-y-1`,children:n.map(([e,t])=>(0,A.jsxs)(`div`,{className:`contents`,children:[(0,A.jsx)(`dt`,{className:`break-words text-muted-foreground`,children:e}),(0,A.jsx)(`dd`,{className:`m-0 whitespace-pre-wrap break-words text-foreground`,children:t})]},e))}):(0,A.jsx)(`pre`,{className:`m-0 whitespace-pre-wrap break-words font-mono text-xs text-foreground`,children:e})})})})]})}function mj(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function hj(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
158
158
  `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(qw(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
159
159
  `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
160
160
  `),i&&(c+=a.move(i+`
161
- `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var pj={tokenize:hj,concrete:!0,name:`mathFlow`},mj={tokenize:gj,partial:!0};function hj(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){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),U(e,l,`whitespace`)(t))}function l(t){return t===null||V(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(mj,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?U(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):V(t)?e.attempt(mj,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||V(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),U(e,c,`whitespace`)(t))}function c(r){return r===null||V(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function gj(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function _j(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:vj,previous:yj,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||V(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function vj(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===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,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=`mathTextData`,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 yj(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function bj(e){return{flow:{36:pj},text:{36:_j(e)}}}var xj={};function Sj(e){let t=this,n=e||xj,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(bj(n)),a.push(dj()),o.push(fj(n))}var Cj=/[#.]/g;function wj(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Cj.lastIndex=i;let e=Cj.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 Tj(e,t,n){let r=n?jj(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=wj(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Ej(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Dj(e,o.properties,t,n)}for(let e of a)Oj(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Ej(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 Dj(e,t,n,r){let i=G_(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?X_(r):i.commaSeparated?c_(r):i.commaOrSpaceSeparated?X_(c_(r).join(` `)):kj(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Aj(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(kj(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Oj(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)Oj(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Oj(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function kj(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||y_(n)===y_(t)))return!0}return n}function Aj(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function jj(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Mj=`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(`.`),Nj=Tj(J_,`div`),Pj=Tj(Y_,`g`,Mj),Fj={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/`};function Ij(e,t){return Lj(e,t||{})||{type:`root`,children:[]}}function Lj(e,t){let n=Rj(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function Rj(e,t){switch(e.nodeType){case 1:return Uj(e,t);case 3:return Vj(e);case 8:return Hj(e);case 9:return zj(e,t);case 10:return Bj();case 11:return zj(e,t);default:return}}function zj(e,t){return{type:`root`,children:Wj(e,t)}}function Bj(){return{type:`doctype`}}function Vj(e){return{type:`text`,value:e.nodeValue||``}}function Hj(e){return{type:`comment`,value:e.nodeValue||``}}function Uj(e,t){let n=e.namespaceURI,r=n===Fj.svg?Pj:Nj,i=n===Fj.html?e.tagName.toLowerCase():e.tagName,a=n===Fj.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,Wj(a,t))}function Wj(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Lj(n[i],t);e!==void 0&&r.push(e)}return r}var Gj=new DOMParser;function Kj(e,t){return Ij(t?.fragment?qj(e):Gj.parseFromString(e,`text/html`))}function qj(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var Jj=(function(e,t,n){let r=MS(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]}),Yj=(function(e){if(e==null)return $j;if(typeof e==`string`)return Zj(e);if(typeof e==`object`)return Xj(e);if(typeof e==`function`)return Qj(e);throw Error("Expected function, string, or array as `test`")});function Xj(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yj(e[n]);return Qj(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Zj(e){return Qj(t);function t(t){return t.tagName===e}}function Qj(e){return t;function t(t,n,r){return!!(eM(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function $j(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function eM(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var tM=/\n/g,nM=/[\t ]+/g,rM=Yj(`br`),iM=Yj(_M),aM=Yj(`p`),oM=Yj(`tr`),sM=Yj([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,gM,vM]),cM=Yj(`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 lM(e,t){let n=t||{},r=`children`in e?e.children:[],i=cM(e),a=hM(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...fM(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...uM(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?rM(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(`
162
- `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function uM(e,t,n){return e.type===`element`?dM(e,t,n):e.type===`text`?n.whitespace===`normal`?fM(e,n):pM(e):[]}function dM(e,t,n){let r=hM(e,n),i=e.children||[],a=-1,o=[];if(sM(e))return o;let s,c;for(rM(e)||oM(e)&&Jj(t,e,oM)?c=`
163
- `:aM(e)?(s=2,c=2):cM(e)&&(s=1,c=1);++a<i.length;)o=o.concat(uM(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?rM(i[a+1]):c}));return iM(e)&&Jj(t,e,iM)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function fM(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){tM.lastIndex=a;let e=tM.exec(n),i=e&&`index`in e?e.index:n.length;r.push(mM(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 pM(e){return[String(e.value)]}function mM(e,t,n){let r=[],i=0,a;for(;i<e.length;){nM.lastIndex=i;let n=nM.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 hM(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 gM(e){return!!(e.properties||{}).hidden}function _M(e){return e.tagName===`td`||e.tagName===`th`}function vM(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var yM={},bM=[];function xM(e){let t=e||yM;return function(e,n){HS(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:bM,a=i.includes(`language-math`),o=i.includes(`math-display`),s=i.includes(`math-inline`),c=o;if(!a&&!o&&!s)return;let l=r[r.length-1],u=e;if(e.tagName===`code`&&a&&l&&l.type===`element`&&l.tagName===`pre`&&(u=l,l=r[r.length-2],c=!0),!l)return;let d=lM(u,{whitespace:`pre`}),f;try{f=Pe.renderToString(d,{...t,displayMode:c,throwOnError:!0})}catch(i){let a=i,o=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:o,source:`rehype-katex`});try{f=Pe.renderToString(d,{...t,displayMode:c,strict:`ignore`,throwOnError:!1})}catch{f=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:d}]}]}}typeof f==`string`&&(f=Kj(f,{fragment:!0}).children);let p=l.children.indexOf(u);return l.children.splice(p,1,...f),VS})}}function SM(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=CM(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=CM(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 CM(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
164
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var wM={}.hasOwnProperty,TM=Object.prototype;function EM(e,t){let n=t||{};return DM({file:n.file||void 0,location:!1,schema:n.space===`svg`?Y_:J_,verbose:n.verbose||!1},e)}function DM(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},AM(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:OM(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=SM(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`},AM(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},AM(e,r,n),n}default:return n=kM(e,t),n}}function OM(e,t){let n=-1,r=[];for(;++n<t.length;){let i=DM(e,t[n]);r.push(i)}return r}function kM(e,t){let n=e.schema;e.schema=t.namespaceURI===Fj.svg?Y_:J_;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;wM.call(TM,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Pj:Nj)(t.tagName,i,OM(e,t.childNodes));if(AM(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&MM(r.startTag),o=r&&r.endTag&&MM(r.endTag),s=DM(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function AM(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=jM(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function jM(e,t,n){let r=MM(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)wM.call(n.attrs,i)&&(r[G_(e.schema,i).property]=MM(n.attrs[i]));n.startTag;let a=MM(n.startTag),o=n.endTag?MM(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function MM(e){let t=NM({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=NM({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function NM(e){return e.line&&e.column?e:void 0}var PM={},FM={}.hasOwnProperty,IM=Vw(`type`,{handlers:{root:RM,element:UM,text:VM,comment:HM,doctype:BM}});function LM(e,t){let n=(t||PM).space;return IM(e,n===`svg`?Y_:J_)}function RM(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=GM(e.children,n,t),KM(e,n),n}function zM(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=GM(e.children,n,t),KM(e,n),n}function BM(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return KM(e,t),t}function VM(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return KM(e,t),t}function HM(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return KM(e,t),t}function UM(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Y_);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&FM.call(e.properties,a)){let t=WM(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Fj[o],childNodes:[],parentNode:null};return s.childNodes=GM(e.children,s,r),KM(e,s),e.tagName===`template`&&e.content&&(s.content=zM(e.content,r)),s}function WM(e,t,n){let r=G_(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?l_(n):Z_(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Fj[r.space]}return i}function GM(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=IM(e[r],n);a.parentNode=t,i.push(a)}return i}function KM(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var qM=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],JM=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]),G;(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`})(G||={});var YM={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function XM(e){return e>=55296&&e<=57343}function ZM(e){return e>=56320&&e<=57343}function QM(e,t){return(e-55296)*1024+9216+t}function $M(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function eN(e){return e>=64976&&e<=65007||JM.has(e)}var K;(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`})(K||={});var tN=65536,nN=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=tN,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(ZM(t))return this.pos++,this._addGap(),QM(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.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,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.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,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,XM(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){$M(e)?this._err(K.controlCharacterInInputStream):eN(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},q;(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`})(q||={});function rN(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 iN=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))),aN=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 oN(e){return e>=55296&&e<=57343||e>1114111?65533:aN.get(e)??e}var sN;(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`})(sN||={});var cN=32,lN;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(lN||={});function uN(e){return e>=sN.ZERO&&e<=sN.NINE}function dN(e){return e>=sN.UPPER_A&&e<=sN.UPPER_F||e>=sN.LOWER_A&&e<=sN.LOWER_F}function fN(e){return e>=sN.UPPER_A&&e<=sN.UPPER_Z||e>=sN.LOWER_A&&e<=sN.LOWER_Z||uN(e)}function pN(e){return e===sN.EQUALS||fN(e)}var mN;(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`})(mN||={});var hN;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(hN||={});var gN=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=mN.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=hN.Strict}startEntity(e){this.decodeMode=e,this.state=mN.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case mN.EntityStart:return e.charCodeAt(t)===sN.NUM?(this.state=mN.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=mN.NamedEntity,this.stateNamedEntity(e,t));case mN.NumericStart:return this.stateNumericStart(e,t);case mN.NumericDecimal:return this.stateNumericDecimal(e,t);case mN.NumericHex:return this.stateNumericHex(e,t);case mN.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|cN)===sN.LOWER_X?(this.state=mN.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=mN.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(uN(r)||dN(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(uN(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===sN.SEMI)this.consumed+=1;else if(this.decodeMode===hN.Strict)return 0;return this.emitCodePoint(oN(this.result),this.consumed),this.errors&&(e!==sN.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&lN.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=_N(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===hN.Attribute&&(i===0||pN(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&lN.VALUE_LENGTH)>>14,i!==0){if(a===sN.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==hN.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]&lN.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]&~lN.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case mN.NamedEntity:return this.result!==0&&(this.decodeMode!==hN.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mN.NumericDecimal:return this.emitNumericEntity(0,2);case mN.NumericHex:return this.emitNumericEntity(0,3);case mN.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mN.EntityStart:return 0}}};function _N(e,t,n,r){let i=(t&lN.BRANCH_LENGTH)>>7,a=t&lN.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 J;(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/`})(J||={});var vN;(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`})(vN||={});var yN;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(yN||={});var Y;(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`})(Y||={});var X;(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`})(X||={});var bN=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function xN(e){return bN.get(e)??X.UNKNOWN}var Z=X,SN={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},CN=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(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`})(Q||={});var wN={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function TN(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function EN(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function DN(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function ON(e){return DN(e)||EN(e)}function kN(e){return ON(e)||TN(e)}function AN(e){return e+32}function jN(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function MN(e){return jN(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function NN(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:XM(e)?K.surrogateCharacterReference:eN(e)?K.noncharacterCharacterReference:$M(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var PN=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=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new nN(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new gN(iN,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=NN(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:q.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:q.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:q.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:q.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(rN(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(K.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=xN(e.tagName),e.type===q.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.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 q.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case q.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case q.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:q.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=jN(e)?q.WHITESPACE_CHARACTER:e===G.NULL?q.NULL_CHARACTER:q.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(q.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?hN.Attribute:hN.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ON(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ON(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Q.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(EN(e)?AN(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){ON(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){ON(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){ON(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ON(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ON(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(YM.SCRIPT,!1)&&MN(this.preprocessor.peek(YM.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<YM.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(YM.SCRIPT,!1)&&MN(this.preprocessor.peek(YM.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<YM.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(EN(e)?AN(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(YM.DASH_DASH,!0)?(this._createCommentToken(YM.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(YM.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(YM.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(YM.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(YM.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(EN(e))this._createDoctypeToken(String.fromCharCode(AN(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case G.EOF:{this._err(K.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=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(EN(e)?AN(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(YM.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(YM.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.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(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&kN(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){kN(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},FN=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),IN=new Set([...FN,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),LN=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),RN=new Set([...LN,X.OL,X.UL]),zN=new Set([...LN,X.BUTTON]),BN=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),VN=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),HN=new Set([X.TR,X.TEMPLATE,X.HTML]),UN=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),WN=new Set([X.TABLE,X.TEMPLATE,X.HTML]),GN=new Set([X.TD,X.TH]),KN=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=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.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])!==J.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(CN,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(GN,J.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(WN,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(UN,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(HN,J.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]===X.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]===X.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 J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(VN.has(r))return!1;break;case J.MATHML:if(BN.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,LN)}hasInListItemScope(e){return this.hasInDynamicScope(e,RN)}hasInButtonScope(e){return this.hasInDynamicScope(e,zN)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(CN.has(t))return!0;if(LN.has(t))return!1;break;case J.SVG:if(VN.has(t))return!1;break;case J.MATHML:if(BN.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&FN.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&IN.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&IN.has(this.currentTagId);)this.pop()}},qN=3,JN;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(JN||={});var YN={type:JN.Marker},XN=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===JN.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<qN)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<qN)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>=qN&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(YN)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:JN.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:JN.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(YN);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===JN.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===JN.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===JN.Element&&t.element===e)}},ZN={createDocument(){return{nodeName:`#document`,mode:yN.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};ZN.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(ZN.isTextNode(n)){n.value+=t;return}}ZN.appendChild(e,ZN.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ZN.isTextNode(r)?r.value+=t:ZN.insertBefore(e,ZN.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}}},QN=`html`,$N=`about:legacy-compat`,eP=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,tP=`+//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(`,`),nP=[...tP,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],rP=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),iP=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],aP=[...iP,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function oP(e,t){return t.some(t=>e.startsWith(t))}function sP(e){return e.name===QN&&e.publicId===null&&(e.systemId===null||e.systemId===$N)}function cP(e){if(e.name!==QN)return yN.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===eP)return yN.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rP.has(n))return yN.QUIRKS;let e=t===null?nP:tP;if(oP(n,e))return yN.QUIRKS;if(e=t===null?iP:aP,oP(n,e))return yN.LIMITED_QUIRKS}return yN.NO_QUIRKS}var lP={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},uP=`definitionurl`,dP=`definitionURL`,fP=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])),pP=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),mP=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])),hP=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function gP(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===vN.COLOR||e===vN.SIZE||e===vN.FACE)||hP.has(t)}function _P(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===uP){e.attrs[t].name=dP;break}}function vP(e){for(let t=0;t<e.attrs.length;t++){let n=fP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yP(e){for(let t=0;t<e.attrs.length;t++){let n=pP.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 bP(e){let t=mP.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=xN(e.tagName))}function xP(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function SP(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===vN.ENCODING){let t=n[e].value.toLowerCase();return t===lP.TEXT_HTML||t===lP.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function CP(e,t,n,r){return(!r||r===J.HTML)&&SP(e,t,n)||(!r||r===J.MATHML)&&xP(e,t)}var wP=`hidden`,TP=8,EP=3,$;(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`})($||={});var DP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},OP=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),kP={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ZN,onParseError:null},AP=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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={...kP,...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 PN(this.options,this),this.activeFormattingElements=new XN(this.treeAdapter),this.fragmentContextID=n?xN(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new KN(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={...kP,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.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??DP,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)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=wN.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)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=wN.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=wN.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=wN.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=wN.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,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.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(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.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===q.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===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case q.CHARACTER:this.onCharacter(e);break;case q.NULL_CHARACTER:this.onNullCharacter(e);break;case q.COMMENT:this.onComment(e);break;case q.DOCTYPE:this.onDoctype(e);break;case q.START_TAG:this._processStartTag(e);break;case q.END_TAG:this.onEndTag(e);break;case q.EOF:this.onEof(e);break;case q.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return CP(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===JN.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=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return OP.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 X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.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 SN[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){JI(this,e);return}switch(this.insertionMode){case $.INITIAL:UP(this,e);break;case $.BEFORE_HTML:KP(this,e);break;case $.BEFORE_HEAD:YP(this,e);break;case $.IN_HEAD:$P(this,e);break;case $.IN_HEAD_NO_SCRIPT:nF(this,e);break;case $.AFTER_HEAD:aF(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:cF(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:rI(this,e);break;case $.IN_TABLE_TEXT:gI(this,e);break;case $.IN_COLUMN_GROUP:CI(this,e);break;case $.AFTER_BODY:zI(this,e);break;case $.AFTER_AFTER_BODY:GI(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qI(this,e);return}switch(this.insertionMode){case $.INITIAL:UP(this,e);break;case $.BEFORE_HTML:KP(this,e);break;case $.BEFORE_HEAD:YP(this,e);break;case $.IN_HEAD:$P(this,e);break;case $.IN_HEAD_NO_SCRIPT:nF(this,e);break;case $.AFTER_HEAD:aF(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:rI(this,e);break;case $.IN_COLUMN_GROUP:CI(this,e);break;case $.AFTER_BODY:zI(this,e);break;case $.AFTER_AFTER_BODY:GI(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){RP(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:RP(this,e);break;case $.IN_TABLE_TEXT:_I(this,e);break;case $.AFTER_BODY:zP(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:BP(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:HP(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case $.IN_TABLE_TEXT:_I(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?XI(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:UP(this,e);break;case $.BEFORE_HTML:WP(this,e);break;case $.BEFORE_HEAD:qP(this,e);break;case $.IN_HEAD:XP(this,e);break;case $.IN_HEAD_NO_SCRIPT:eF(this,e);break;case $.AFTER_HEAD:rF(this,e);break;case $.IN_BODY:VF(this,e);break;case $.IN_TABLE:fI(this,e);break;case $.IN_TABLE_TEXT:_I(this,e);break;case $.IN_CAPTION:yI(this,e);break;case $.IN_COLUMN_GROUP:xI(this,e);break;case $.IN_TABLE_BODY:wI(this,e);break;case $.IN_ROW:EI(this,e);break;case $.IN_CELL:OI(this,e);break;case $.IN_SELECT:AI(this,e);break;case $.IN_SELECT_IN_TABLE:MI(this,e);break;case $.IN_TEMPLATE:PI(this,e);break;case $.AFTER_BODY:LI(this,e);break;case $.IN_FRAMESET:BI(this,e);break;case $.AFTER_FRAMESET:HI(this,e);break;case $.AFTER_AFTER_BODY:WI(this,e);break;case $.AFTER_AFTER_FRAMESET:KI(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?ZI(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:UP(this,e);break;case $.BEFORE_HTML:GP(this,e);break;case $.BEFORE_HEAD:JP(this,e);break;case $.IN_HEAD:ZP(this,e);break;case $.IN_HEAD_NO_SCRIPT:tF(this,e);break;case $.AFTER_HEAD:iF(this,e);break;case $.IN_BODY:$F(this,e);break;case $.TEXT:tI(this,e);break;case $.IN_TABLE:pI(this,e);break;case $.IN_TABLE_TEXT:_I(this,e);break;case $.IN_CAPTION:bI(this,e);break;case $.IN_COLUMN_GROUP:SI(this,e);break;case $.IN_TABLE_BODY:TI(this,e);break;case $.IN_ROW:DI(this,e);break;case $.IN_CELL:kI(this,e);break;case $.IN_SELECT:jI(this,e);break;case $.IN_SELECT_IN_TABLE:NI(this,e);break;case $.IN_TEMPLATE:FI(this,e);break;case $.AFTER_BODY:RI(this,e);break;case $.IN_FRAMESET:VI(this,e);break;case $.AFTER_FRAMESET:UI(this,e);break;case $.AFTER_AFTER_BODY:GI(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:UP(this,e);break;case $.BEFORE_HTML:KP(this,e);break;case $.BEFORE_HEAD:YP(this,e);break;case $.IN_HEAD:$P(this,e);break;case $.IN_HEAD_NO_SCRIPT:nF(this,e);break;case $.AFTER_HEAD:aF(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:eI(this,e);break;case $.TEXT:nI(this,e);break;case $.IN_TABLE_TEXT:_I(this,e);break;case $.IN_TEMPLATE:II(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:VP(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:sF(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:rI(this,e);break;case $.IN_TABLE_TEXT:hI(this,e);break;default:}}};function jP(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):QF(e,t),n}function MP(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 NP(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>=EP;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=PP(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function PP(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 FP(e,t,n){let r=xN(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function IP(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 LP(e,t){for(let n=0;n<TP;n++){let n=jP(e,t);if(!n)break;let r=MP(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=NP(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&FP(e,a,i),IP(e,r,n)}}function RP(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function zP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function BP(e,t){e._appendCommentNode(t,e.document)}function VP(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 HP(e,t){e._setDocumentType(t);let n=t.forceQuirks?yN.QUIRKS:cP(t);sP(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function UP(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,yN.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function WP(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):KP(e,t)}function GP(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&KP(e,t)}function KP(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function qP(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:YP(e,t)}}function JP(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?YP(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function YP(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function XP(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,wN.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,wN.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,wN.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,wN.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:$P(e,t)}}function ZP(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:$P(e,t);break;case X.TEMPLATE:QP(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function QP(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function $P(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function eF(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:XP(e,t);break;case X.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:nF(e,t)}}function tF(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:nF(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function nF(e,t){let n=t.type===q.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function rF(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),XP(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:aF(e,t)}}function iF(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:aF(e,t);break;case X.TEMPLATE:QP(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function aF(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,oF(e,t)}function oF(e,t){switch(t.type){case q.CHARACTER:cF(e,t);break;case q.WHITESPACE_CHARACTER:sF(e,t);break;case q.COMMENT:RP(e,t);break;case q.START_TAG:VF(e,t);break;case q.END_TAG:$F(e,t);break;case q.EOF:eI(e,t);break;default:}}function sF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function lF(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function uF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function dF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function fF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function pF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&CN.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function mF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hF(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function gF(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===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function _F(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=wN.PLAINTEXT}function vF(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function yF(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(LP(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xF(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(LP(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function SF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function CF(e,t){e.treeAdapter.getDocumentMode(e.document)!==yN.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function wF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TF(e){let t=rN(e,vN.TYPE);return t!=null&&t.toLowerCase()===wP}function EF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),TF(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function DF(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function OF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function kF(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,wF(e,t)}function AF(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=wN.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function jF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,wN.RAWTEXT)}function MF(e,t){e.framesetOk=!1,e._switchToTextParsing(t,wN.RAWTEXT)}function NF(e,t){e._switchToTextParsing(t,wN.RAWTEXT)}function PF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function FF(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function IF(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function LF(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function RF(e,t){e._reconstructActiveFormattingElements(),_P(t),yP(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function zF(e,t){e._reconstructActiveFormattingElements(),vP(t),yP(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function BF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function VF(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:bF(e,t);break;case X.A:yF(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:pF(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:fF(e,t);break;case X.LI:case X.DD:case X.DT:gF(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:wF(e,t);break;case X.HR:OF(e,t);break;case X.RB:case X.RTC:IF(e,t);break;case X.RT:case X.RP:LF(e,t);break;case X.PRE:case X.LISTING:mF(e,t);break;case X.XMP:jF(e,t);break;case X.SVG:zF(e,t);break;case X.HTML:lF(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:XP(e,t);break;case X.BODY:uF(e,t);break;case X.FORM:hF(e,t);break;case X.NOBR:xF(e,t);break;case X.MATH:RF(e,t);break;case X.TABLE:CF(e,t);break;case X.INPUT:EF(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:DF(e,t);break;case X.IMAGE:kF(e,t);break;case X.BUTTON:vF(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:SF(e,t);break;case X.IFRAME:MF(e,t);break;case X.SELECT:PF(e,t);break;case X.OPTION:case X.OPTGROUP:FF(e,t);break;case X.NOEMBED:case X.NOFRAMES:NF(e,t);break;case X.FRAMESET:dF(e,t);break;case X.TEXTAREA:AF(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?NF(e,t):BF(e,t);break;case X.PLAINTEXT:_F(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:BF(e,t)}}function HF(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function UF(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,RI(e,t))}function WF(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function GF(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function KF(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function qF(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function JF(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function YF(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function XF(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function ZF(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function QF(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!==X.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 $F(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:LP(e,t);break;case X.P:KF(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:WF(e,t);break;case X.LI:qF(e);break;case X.DD:case X.DT:JF(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:YF(e);break;case X.BR:ZF(e);break;case X.BODY:HF(e,t);break;case X.HTML:UF(e,t);break;case X.FORM:GF(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:XF(e,t);break;case X.TEMPLATE:QP(e,t);break;default:QF(e,t)}}function eI(e,t){e.tmplInsertionModeStack.length>0?II(e,t):VP(e,t)}function tI(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function nI(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function rI(e,t){if(e.openElements.currentTagId!==void 0&&OP.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case q.CHARACTER:gI(e,t);break;case q.WHITESPACE_CHARACTER:hI(e,t);break}else mI(e,t)}function iI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function aI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function oI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,xI(e,t)}function sI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function cI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,wI(e,t)}function lI(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uI(e,t){TF(t)?e._appendElement(t,J.HTML):mI(e,t),t.ackSelfClosing=!0}function dI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function fI(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:cI(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:XP(e,t);break;case X.COL:oI(e,t);break;case X.FORM:dI(e,t);break;case X.TABLE:lI(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:sI(e,t);break;case X.INPUT:uI(e,t);break;case X.CAPTION:iI(e,t);break;case X.COLGROUP:aI(e,t);break;default:mI(e,t)}}function pI(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:QP(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:mI(e,t)}}function mI(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,oF(e,t),e.fosterParentingEnabled=n}function hI(e,t){e.pendingCharacterTokens.push(t)}function gI(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function _I(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)mI(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var vI=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function yI(e,t){let n=t.tagID;vI.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,fI(e,t)):VF(e,t)}function bI(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&pI(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:$F(e,t)}}function xI(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:XP(e,t);break;default:CI(e,t)}}function SI(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:QP(e,t);break;case X.COL:break;default:CI(e,t)}}function CI(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function wI(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,EI(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,fI(e,t));break;default:fI(e,t)}}function TI(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,pI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:pI(e,t)}}function EI(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,wI(e,t));break;default:fI(e,t)}}function DI(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,TI(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,TI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:pI(e,t)}}function OI(e,t){let n=t.tagID;vI.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),EI(e,t)):VF(e,t)}function kI(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),DI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:$F(e,t)}}function AI(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:XP(e,t);break;default:}}function jI(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:QP(e,t);break;default:}}function MI(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):AI(e,t)}function NI(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):jI(e,t)}function PI(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:XP(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,fI(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,xI(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,wI(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,EI(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,VF(e,t)}}function FI(e,t){t.tagID===X.TEMPLATE&&QP(e,t)}function II(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):VP(e,t)}function LI(e,t){t.tagID===X.HTML?VF(e,t):zI(e,t)}function RI(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.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 zI(e,t)}function zI(e,t){e.insertionMode=$.IN_BODY,oF(e,t)}function BI(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:XP(e,t);break;default:}}function VI(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function HI(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.NOFRAMES:XP(e,t);break;default:}}function UI(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function WI(e,t){t.tagID===X.HTML?VF(e,t):GI(e,t)}function GI(e,t){e.insertionMode=$.IN_BODY,oF(e,t)}function KI(e,t){switch(t.tagID){case X.HTML:VF(e,t);break;case X.NOFRAMES:XP(e,t);break;default:}}function qI(e,t){t.chars=`�`,e._insertCharacters(t)}function JI(e,t){e._insertCharacters(t),e.framesetOk=!1}function YI(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function XI(e,t){if(gP(t))YI(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?_P(t):r===J.SVG&&(bP(t),vP(t)),yP(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ZI(e,t){if(t.tagID===X.P||t.tagID===X.BR){YI(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)===J.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([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var QI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$I=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),eL={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function tL(e,t){let n=hL(e),r=Vw(`type`,{handlers:{root:rL,element:iL,text:aL,comment:cL,doctype:oL,raw:lL},unknown:uL}),i={parser:n?new AP(eL):AP.getFragmentParser(void 0,eL),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),dL(i,rv());let a=EM(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&WS(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function nL(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function rL(e,t){nL(e.children,t)}function iL(e,t){pL(e,t),nL(e.children,t),mL(e,t)}function aL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:q.CHARACTER,chars:e.value,location:gL(e)};dL(t,rv(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function oL(e,t){let n={type:q.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:gL(e)};dL(t,rv(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function sL(e,t){t.stitches=!0;let n=_L(e);`children`in e&&`children`in n&&(n.children=tL({type:`root`,children:e.children},t.options).children),cL({type:`comment`,value:{stitch:n}},t)}function cL(e,t){let n=e.value,r={type:q.COMMENT,data:n,location:gL(e)};dL(t,rv(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function lL(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,fL(t,rv(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(QI,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function uL(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))sL(n,t);else{let e=``;throw $I.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function dL(e,t){fL(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=wN.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function fL(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function pL(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===wN.PLAINTEXT)return;dL(t,rv(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Fj.html;i===Fj.html&&n===`svg`&&(i=Fj.svg);let a=LM({...e,children:[]},{space:i===Fj.svg?`svg`:`html`}),o={type:q.START_TAG,tagName:n,tagID:xN(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:gL(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function mL(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&qM.includes(n)||t.parser.tokenizer.state===wN.PLAINTEXT)return;dL(t,nv(e));let r={type:q.END_TAG,tagName:n,tagID:xN(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:gL(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===wN.RCDATA||t.parser.tokenizer.state===wN.RAWTEXT||t.parser.tokenizer.state===wN.SCRIPT_DATA)&&(t.parser.tokenizer.state=wN.DATA)}function hL(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function gL(e){let t=rv(e)||{line:void 0,column:void 0,offset:void 0},n=nv(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function _L(e){return`children`in e?OS({...e,children:[]}):OS(e)}function vL(e){return function(t,n){return tL(t,{...e,file:n})}}var yL=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],bL={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...yL,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...yL],h2:[[`className`,`sr-only`]],img:[...yL,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...yL,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...yL],table:[...yL],ul:[...yL,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},xL={}.hasOwnProperty;function SL(e,t){let n={type:`root`,children:[]},r=CL({schema:t?{...bL,...t}:bL,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function CL(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return wL(e,n);case`doctype`:return TL(e,n);case`element`:return EL(e,n);case`root`:return DL(e,n);case`text`:return OL(e,n);default:}}}function wL(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return FL(r,t),r}}function TL(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return FL(e,t),e}}function EL(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=kL(e,t.children),i=AL(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&xL.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return FL(o,t),o}function DL(e,t){let n={type:`root`,children:kL(e,t.children)};return FL(n,t),n}function OL(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return FL(n,t),n}function kL(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=CL(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function AL(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&xL.call(r,n)?r[n]:void 0,o=r&&xL.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(xL.call(s,l)){let t=s[l],n=jL(e,IL(a,l),l,t);n??=jL(e,IL(o,l),l,t),n!=null&&(c[l]=n)}if(i&&xL.call(i,n)){let e=i[n];for(l in e)xL.call(e,l)&&!xL.call(c,l)&&(c[l]=e[l])}return c}function jL(e,t,n,r){return t?Array.isArray(r)?ML(e,t,n,r):NL(e,t,n,r):void 0}function ML(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=NL(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function NL(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&PL(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function PL(e,t,n){let r=e.schema.protocols&&xL.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function FL(e,t){let n=av(t);t.data&&(e.data=OS(t.data)),n&&(e.position=n)}function IL(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function LL(e){return function(t){return SL(t,e)}}function RL(e){try{return decodeURIComponent(e)}catch{return e}}function zL(e){return()=>t=>{let n=[],r=new Map,i=e=>{e.properties&&n.push(e);for(let t of e.children??[])i(t)};i(t);for(let t of n){let n=t.properties?.id;if(typeof n!=`string`)continue;let i=`${e}${RL(n)}`;r.set(n,i),n.startsWith(`user-content-`)&&r.set(n.slice(13),i),t.properties.id=i}for(let e of n){let t=e.properties;if(typeof t.href==`string`&&t.href.startsWith(`#`)){let e=t.href.slice(1),n=r.get(e)??r.get(RL(e));n&&(t.href=`#${n}`)}Array.isArray(t.ariaDescribedBy)&&(t.ariaDescribedBy=t.ariaDescribedBy.map(e=>typeof e==`string`?r.get(e)??e:e))}}}var BL={...bL,tagNames:[...bL.tagNames??[],`colgroup`,`col`,`mark`,`u`],attributes:{...bL.attributes,div:[...bL.attributes?.div??[],`dataFrontmatter`,`dataChatMathPending`,`ariaBusy`],span:[...bL.attributes?.span??[],...[`Kind`,`Key`,`Ref`,`Name`,`Source`,`Path`,`Label`,`RawText`,`Excerpt`,`MessageId`,`Role`,`StartLine`,`EndLine`].map(e=>`dataChatInlineToken${e}`)],code:[[`className`,/^language-./,`math-inline`,`math-display`]],details:[`open`],blockquote:[...bL.attributes?.blockquote??[],[`dataCallout`,`note`,`tip`,`important`,`warning`,`caution`]]},protocols:{...bL.protocols,href:[...bL.protocols?.href??[],`nextclaw`,`file`]}};function VL(e){return e.value??e.children?.map(VL).join(``)??``}function HL(e){return k.Children.map(e,e=>{if(!(0,k.isValidElement)(e))return e;let t=e.props.node?.tagName;if(t===`img`)return e.props.alt??``;if(t===`input`)return null;let n=HL(e.props.children);return t===`a`?n:(0,k.cloneElement)(e,void 0,n)})}function UL({node:e,children:t,open:n,label:r}){let[i,a]=(0,k.useState)(!!n),o=(0,k.useId)(),s=e?.children.find(e=>e.type===`element`&&e.tagName===`summary`),c=s?VL(s):r,l=k.Children.toArray(t).find(e=>(0,k.isValidElement)(e)&&e.props.node?.tagName===`summary`),u=k.Children.toArray(t).filter(e=>!(0,k.isValidElement)(e)||e.props.node?.tagName!==`summary`);return(0,A.jsxs)(`div`,{"data-document-details":!0,className:`my-3 overflow-hidden rounded-lg border border-border`,children:[(0,A.jsxs)(`button`,{type:`button`,"aria-expanded":i,"aria-controls":o,onClick:()=>a(e=>!e),className:`flex min-h-9 w-full items-center gap-2 px-3 py-2 text-left text-sm font-medium hover:bg-[var(--interaction-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]`,children:[(0,A.jsx)(We,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none`,style:{transform:i?`rotate(90deg)`:`rotate(0deg)`}}),(0,A.jsx)(`span`,{className:`min-w-0 break-words`,children:l?HL(l):c||r})]}),(0,A.jsx)(`div`,{id:o,children:(0,A.jsx)(lj,{open:i,children:()=>(0,A.jsx)(`div`,{"data-document-details-content":!0,className:`flow-root min-w-0 border-t border-border px-3 py-2`,children:u})})})]})}var WL=function(e,t,n){let r=41,i=t=>(e.enter(`mathText`),e.enter(`mathTextSequence`),e.consume(t),a),a=t=>t!==40&&t!==91?n(t):(r=t===40?41:93,e.consume(t),e.exit(`mathTextSequence`),c),o=(e,t,n)=>{let i=t=>(e.enter(`mathTextSequence`),e.consume(t),a),a=i=>i===r?(e.consume(i),e.exit(`mathTextSequence`),t):n(i);return i},s=n=>(e.exit(`mathText`),t(n)),c=t=>t===null?n(t):t===92?e.attempt({tokenize:o},s,l)(t):(e.enter(`mathTextData`),e.consume(t),e.exit(`mathTextData`),c),l=t=>(e.enter(`mathTextData`),e.consume(t),u),u=t=>t===null?n(t):(e.consume(t),e.exit(`mathTextData`),c);return i};function GL(e){return function(){let t=this.data();return(t.micromarkExtensions??=[]).push({text:{92:{tokenize:WL}}}),function t(n){let r=n.position?.start.offset;n.type===`inlineMath`&&r!==void 0&&e.startsWith(`\\[`,r)&&n.data?.hProperties&&(n.data.hProperties.className=[`language-math`,`math-display`]),n.children?.forEach(t)}}}function KL(e){return{type:`element`,tagName:e?`div`:`span`,properties:{"data-chat-math-pending":`true`,"aria-busy":`true`,style:e?`min-height:3em;display:flex;align-items:center;justify-content:center;opacity:0.6`:`opacity:0.6`},children:[{type:`text`,value:`…`}]}}function qL(e,t){let n=t.slice(e.position?.start.offset,e.position?.end.offset).split(/\r\n|\r|\n/),r=n[0]?.match(/^(\${2,}|`{3,}|~{3,})/)?.[1];if(!r||n.length<2)return!1;let i=n.at(-1)?.replace(/^\s*(?:>\s*)*/,``).trim()??``;return i.length>=r.length&&[...i].every(e=>e===r[0])}function JL(e){return()=>function t(n){if((n.type===`math`||n.type===`code`&&n.lang===`math`)&&!qL(n,e)){let e=KL(!0);return{...n,data:{hName:e.tagName,hProperties:e.properties,hChildren:e.children}}}return n.children&&=n.children.map(t),n}}function YL(){return function e(t){return t.properties?.className?.includes(`katex-error`)?KL(!1):(t.children&&=t.children.map(e),t)}}function XL({characterCountLabel:e,excerpt:t,kind:n,label:r,location:i,path:a,tooltip:o,onClick:s}){let{Tooltip:c,TooltipContent:l,TooltipProvider:u,TooltipTrigger:d}=Ki,f=!!s,p=j(jh,`nextclaw-chat-inline-token mx-[0.08em]`,f?`cursor-pointer transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`:`cursor-default`),m=a||o,h=(0,A.jsx)(Kh,{excerpt:t,kind:n,label:r,metricLabel:i??e,source:m}),g=f?(0,A.jsx)(`button`,{type:`button`,className:p,onClick:e=>{e.preventDefault(),e.stopPropagation(),s?.()},children:h}):(0,A.jsx)(`span`,{className:p,children:h});return(n===`workspace_excerpt`||n===`conversation_excerpt`)&&t?(0,A.jsx)(qh,{characterCountLabel:e,excerpt:t,kind:n===`conversation_excerpt`?n:`workspace_file`,label:r,location:i,path:m,children:g}):(0,A.jsx)(u,{delayDuration:250,children:(0,A.jsxs)(c,{children:[(0,A.jsx)(d,{asChild:!0,children:g}),(0,A.jsx)(l,{side:`top`,className:`max-w-[24rem] break-all text-xs`,children:o})]})})}function ZL(){return typeof navigator<`u`&&typeof navigator.clipboard?.writeText==`function`}function QL(e){if(typeof document>`u`)return;let t=document.getSelection();t&&(t.removeAllRanges(),e.forEach(e=>t.addRange(e)))}function $L(){let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:null,n=t?{input:t,start:t.selectionStart,end:t.selectionEnd}:null,r=document.getSelection();return{activeElement:e,activeInputSelection:n,ranges:r?Array.from({length:r.rangeCount},(e,t)=>r.getRangeAt(t).cloneRange()):[]}}function eR(e){let t=document.createElement(`textarea`);return t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),Object.assign(t.style,{fontSize:`12pt`,left:`-9999px`,opacity:`0`,pointerEvents:`none`,position:`fixed`,top:`0`}),t}function tR(e){try{e.focus({preventScroll:!0})}catch{e.focus()}}function nR(e){tR(e),e.select(),e.setSelectionRange(0,e.value.length)}function rR(){try{return typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{return!1}}function iR(e){if(!e.activeInputSelection)return!1;let{input:t,start:n,end:r}=e.activeInputSelection;return n===null||r===null?!1:(t.setSelectionRange(n,r),!0)}function aR(e){e.activeElement&&tR(e.activeElement),iR(e)||QL(e.ranges)}function oR(e){if(typeof document>`u`||!document.body)return!1;let t=$L(),n=eR(e);document.body.appendChild(n),nR(n);let r=rR();return n.remove(),aR(t),r}async function sR(e){if(!e)return!1;if(ZL())try{return await navigator.clipboard.writeText(e),!0}catch{return oR(e)}return oR(e)}var cR=1300;function lR(e){let[t,n]=(0,k.useState)(!1),r=(0,k.useCallback)(async()=>{e.text&&(await sR(e.text)?n(!0):n(!1))},[e.text]);return(0,k.useEffect)(()=>{if(!t||typeof window>`u`)return;let r=window.setTimeout(()=>n(!1),e.resetDelayMs??cR);return()=>window.clearTimeout(r)},[t,e.resetDelayMs]),{copied:t,copy:r}}var uR=e(n(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,ee=`\\b\\d+(\\.\\d+)?`,te=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,ne=`\\b(0b[01]+)`,D=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,re=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},O={begin:`\\\\[\\s\\S]`,relevance:0},ie={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[O]},ae={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[O]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},se=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},ce=se(`//`,`$`),le=se(`/\\*`,`\\*/`),ue=se(`#`,`$`),de={scope:`number`,begin:ee,relevance:0},fe={scope:`number`,begin:te,relevance:0},pe={scope:`number`,begin:ne,relevance:0},me={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[O,{begin:/\[/,end:/\]/,relevance:0,contains:[O]}]},he={scope:`title`,begin:T,relevance:0},ge={scope:`title`,begin:E,relevance:0},_e={begin:`\\.\\s*`+E,relevance:0},ve=Object.freeze({__proto__:null,APOS_STRING_MODE:ie,BACKSLASH_ESCAPE:O,BINARY_NUMBER_MODE:pe,BINARY_NUMBER_RE:ne,COMMENT:se,C_BLOCK_COMMENT_MODE:le,C_LINE_COMMENT_MODE:ce,C_NUMBER_MODE:fe,C_NUMBER_RE:te,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ue,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:_e,NUMBER_MODE:de,NUMBER_RE:ee,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:ae,REGEXP_MODE:me,RE_STARTERS_RE:D,SHEBANG:re,TITLE_MODE:he,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:ge});function ye(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function be(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function xe(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ye,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Se(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function Ce(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function we(e,t){e.relevance===void 0&&(e.relevance=1)}var Te=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Ee=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],De=`keyword`;function Oe(e,t,n=De){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,Oe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,ke(n[0],n[1])]})}}function ke(e,t){return t?Number(t):Ae(e)?0:1}function Ae(e){return Ee.includes(e.toLowerCase())}var je={},Me=e=>{console.error(e)},Ne=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Pe=(e,t)=>{je[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),je[`${e}/${t}`]=!0)},Fe=Error();function Ie(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Le(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Me(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),Fe;if(typeof e.beginScope!=`object`||e.beginScope===null)throw Me(`beginScope must be object`),Fe;Ie(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Re(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Me(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),Fe;if(typeof e.endScope!=`object`||e.endScope===null)throw Me(`endScope must be object`),Fe;Ie(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function ze(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Be(e){ze(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Le(e),Re(e)}function Ve(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[be,Ce,Be,Te].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[xe,Se,we].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=Oe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ue(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function He(e){return e?e.endsWithParent||He(e.starts):!1}function Ue(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:He(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var We=`11.11.1`,Ge=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},Ke=i,qe=a,Je=Symbol(`nomatch`),Ye=7,Xe=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=ie(n[1]);return t||(Ne(s.replace(`{}`,n[1])),Ne(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||ie(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(Pe(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),Pe(`10.7.0`,`Please use highlight(code, options) instead.
161
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var gj={tokenize:vj,concrete:!0,name:`mathFlow`},_j={tokenize:yj,partial:!0};function vj(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){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),U(e,l,`whitespace`)(t))}function l(t){return t===null||V(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(_j,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?U(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):V(t)?e.attempt(_j,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||V(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),U(e,c,`whitespace`)(t))}function c(r){return r===null||V(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function yj(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function bj(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:xj,previous:Sj,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||V(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function xj(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===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,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=`mathTextData`,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 Sj(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function Cj(e){return{flow:{36:gj},text:{36:bj(e)}}}var wj={};function Tj(e){let t=this,n=e||wj,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Cj(n)),a.push(mj()),o.push(hj(n))}var Ej=/[#.]/g;function Dj(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Ej.lastIndex=i;let e=Ej.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 Oj(e,t,n){let r=n?Pj(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=Dj(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,kj(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Aj(e,o.properties,t,n)}for(let e of a)jj(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function kj(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 Aj(e,t,n,r){let i=G_(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?X_(r):i.commaSeparated?c_(r):i.commaOrSpaceSeparated?X_(c_(r).join(` `)):Mj(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Nj(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Mj(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function jj(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)jj(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?jj(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Mj(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||y_(n)===y_(t)))return!0}return n}function Nj(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Pj(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Fj=`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(`.`),Ij=Oj(J_,`div`),Lj=Oj(Y_,`g`,Fj),Rj={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/`};function zj(e,t){return Bj(e,t||{})||{type:`root`,children:[]}}function Bj(e,t){let n=Vj(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function Vj(e,t){switch(e.nodeType){case 1:return Kj(e,t);case 3:return Wj(e);case 8:return Gj(e);case 9:return Hj(e,t);case 10:return Uj();case 11:return Hj(e,t);default:return}}function Hj(e,t){return{type:`root`,children:qj(e,t)}}function Uj(){return{type:`doctype`}}function Wj(e){return{type:`text`,value:e.nodeValue||``}}function Gj(e){return{type:`comment`,value:e.nodeValue||``}}function Kj(e,t){let n=e.namespaceURI,r=n===Rj.svg?Lj:Ij,i=n===Rj.html?e.tagName.toLowerCase():e.tagName,a=n===Rj.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,qj(a,t))}function qj(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Bj(n[i],t);e!==void 0&&r.push(e)}return r}var Jj=new DOMParser;function Yj(e,t){return zj(t?.fragment?Xj(e):Jj.parseFromString(e,`text/html`))}function Xj(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var Zj=(function(e,t,n){let r=MS(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]}),Qj=(function(e){if(e==null)return nM;if(typeof e==`string`)return eM(e);if(typeof e==`object`)return $j(e);if(typeof e==`function`)return tM(e);throw Error("Expected function, string, or array as `test`")});function $j(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Qj(e[n]);return tM(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function eM(e){return tM(t);function t(t){return t.tagName===e}}function tM(e){return t;function t(t,n,r){return!!(rM(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function nM(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function rM(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var iM=/\n/g,aM=/[\t ]+/g,oM=Qj(`br`),sM=Qj(bM),cM=Qj(`p`),lM=Qj(`tr`),uM=Qj([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,yM,xM]),dM=Qj(`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 fM(e,t){let n=t||{},r=`children`in e?e.children:[],i=dM(e),a=vM(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...hM(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...pM(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?oM(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(`
162
+ `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function pM(e,t,n){return e.type===`element`?mM(e,t,n):e.type===`text`?n.whitespace===`normal`?hM(e,n):gM(e):[]}function mM(e,t,n){let r=vM(e,n),i=e.children||[],a=-1,o=[];if(uM(e))return o;let s,c;for(oM(e)||lM(e)&&Zj(t,e,lM)?c=`
163
+ `:cM(e)?(s=2,c=2):dM(e)&&(s=1,c=1);++a<i.length;)o=o.concat(pM(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?oM(i[a+1]):c}));return sM(e)&&Zj(t,e,sM)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function hM(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){iM.lastIndex=a;let e=iM.exec(n),i=e&&`index`in e?e.index:n.length;r.push(_M(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 gM(e){return[String(e.value)]}function _M(e,t,n){let r=[],i=0,a;for(;i<e.length;){aM.lastIndex=i;let n=aM.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 vM(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 yM(e){return!!(e.properties||{}).hidden}function bM(e){return e.tagName===`td`||e.tagName===`th`}function xM(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var SM={},CM=[];function wM(e){let t=e||SM;return function(e,n){HS(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:CM,a=i.includes(`language-math`),o=i.includes(`math-display`),s=i.includes(`math-inline`),c=o;if(!a&&!o&&!s)return;let l=r[r.length-1],u=e;if(e.tagName===`code`&&a&&l&&l.type===`element`&&l.tagName===`pre`&&(u=l,l=r[r.length-2],c=!0),!l)return;let d=fM(u,{whitespace:`pre`}),f;try{f=Pe.renderToString(d,{...t,displayMode:c,throwOnError:!0})}catch(i){let a=i,o=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:o,source:`rehype-katex`});try{f=Pe.renderToString(d,{...t,displayMode:c,strict:`ignore`,throwOnError:!1})}catch{f=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:d}]}]}}typeof f==`string`&&(f=Yj(f,{fragment:!0}).children);let p=l.children.indexOf(u);return l.children.splice(p,1,...f),VS})}}function TM(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=EM(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=EM(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 EM(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
164
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var DM={}.hasOwnProperty,OM=Object.prototype;function kM(e,t){let n=t||{};return AM({file:n.file||void 0,location:!1,schema:n.space===`svg`?Y_:J_,verbose:n.verbose||!1},e)}function AM(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},NM(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:jM(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=TM(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`},NM(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},NM(e,r,n),n}default:return n=MM(e,t),n}}function jM(e,t){let n=-1,r=[];for(;++n<t.length;){let i=AM(e,t[n]);r.push(i)}return r}function MM(e,t){let n=e.schema;e.schema=t.namespaceURI===Rj.svg?Y_:J_;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;DM.call(OM,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Lj:Ij)(t.tagName,i,jM(e,t.childNodes));if(NM(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&FM(r.startTag),o=r&&r.endTag&&FM(r.endTag),s=AM(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function NM(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=PM(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function PM(e,t,n){let r=FM(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)DM.call(n.attrs,i)&&(r[G_(e.schema,i).property]=FM(n.attrs[i]));n.startTag;let a=FM(n.startTag),o=n.endTag?FM(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function FM(e){let t=IM({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=IM({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function IM(e){return e.line&&e.column?e:void 0}var LM={},RM={}.hasOwnProperty,zM=Vw(`type`,{handlers:{root:VM,element:KM,text:WM,comment:GM,doctype:UM}});function BM(e,t){let n=(t||LM).space;return zM(e,n===`svg`?Y_:J_)}function VM(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=JM(e.children,n,t),YM(e,n),n}function HM(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=JM(e.children,n,t),YM(e,n),n}function UM(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return YM(e,t),t}function WM(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return YM(e,t),t}function GM(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return YM(e,t),t}function KM(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Y_);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&RM.call(e.properties,a)){let t=qM(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Rj[o],childNodes:[],parentNode:null};return s.childNodes=JM(e.children,s,r),YM(e,s),e.tagName===`template`&&e.content&&(s.content=HM(e.content,r)),s}function qM(e,t,n){let r=G_(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?l_(n):Z_(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Rj[r.space]}return i}function JM(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=zM(e[r],n);a.parentNode=t,i.push(a)}return i}function YM(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var XM=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],ZM=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]),G;(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`})(G||={});var QM={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function $M(e){return e>=55296&&e<=57343}function eN(e){return e>=56320&&e<=57343}function tN(e,t){return(e-55296)*1024+9216+t}function nN(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function rN(e){return e>=64976&&e<=65007||ZM.has(e)}var K;(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`})(K||={});var iN=65536,aN=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=iN,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(eN(t))return this.pos++,this._addGap(),tN(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,G.EOF;return this._err(K.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,G.EOF;let n=this.html.charCodeAt(t);return n===G.CARRIAGE_RETURN?G.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,G.EOF;let e=this.html.charCodeAt(this.pos);return e===G.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,G.LINE_FEED):e===G.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,$M(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===G.LINE_FEED||e===G.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){nN(e)?this._err(K.controlCharacterInInputStream):rN(e)&&this._err(K.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},q;(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`})(q||={});function oN(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 sN=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))),cN=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 lN(e){return e>=55296&&e<=57343||e>1114111?65533:cN.get(e)??e}var uN;(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`})(uN||={});var dN=32,fN;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(fN||={});function pN(e){return e>=uN.ZERO&&e<=uN.NINE}function mN(e){return e>=uN.UPPER_A&&e<=uN.UPPER_F||e>=uN.LOWER_A&&e<=uN.LOWER_F}function hN(e){return e>=uN.UPPER_A&&e<=uN.UPPER_Z||e>=uN.LOWER_A&&e<=uN.LOWER_Z||pN(e)}function gN(e){return e===uN.EQUALS||hN(e)}var _N;(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`})(_N||={});var vN;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(vN||={});var yN=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=_N.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vN.Strict}startEntity(e){this.decodeMode=e,this.state=_N.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case _N.EntityStart:return e.charCodeAt(t)===uN.NUM?(this.state=_N.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=_N.NamedEntity,this.stateNamedEntity(e,t));case _N.NumericStart:return this.stateNumericStart(e,t);case _N.NumericDecimal:return this.stateNumericDecimal(e,t);case _N.NumericHex:return this.stateNumericHex(e,t);case _N.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|dN)===uN.LOWER_X?(this.state=_N.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=_N.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(pN(r)||mN(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(pN(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===uN.SEMI)this.consumed+=1;else if(this.decodeMode===vN.Strict)return 0;return this.emitCodePoint(lN(this.result),this.consumed),this.errors&&(e!==uN.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&fN.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=bN(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===vN.Attribute&&(i===0||gN(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&fN.VALUE_LENGTH)>>14,i!==0){if(a===uN.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==vN.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]&fN.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]&~fN.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case _N.NamedEntity:return this.result!==0&&(this.decodeMode!==vN.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case _N.NumericDecimal:return this.emitNumericEntity(0,2);case _N.NumericHex:return this.emitNumericEntity(0,3);case _N.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case _N.EntityStart:return 0}}};function bN(e,t,n,r){let i=(t&fN.BRANCH_LENGTH)>>7,a=t&fN.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 J;(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/`})(J||={});var xN;(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`})(xN||={});var SN;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(SN||={});var Y;(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`})(Y||={});var X;(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`})(X||={});var CN=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function wN(e){return CN.get(e)??X.UNKNOWN}var Z=X,TN={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},EN=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(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`})(Q||={});var DN={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function ON(e){return e>=G.DIGIT_0&&e<=G.DIGIT_9}function kN(e){return e>=G.LATIN_CAPITAL_A&&e<=G.LATIN_CAPITAL_Z}function AN(e){return e>=G.LATIN_SMALL_A&&e<=G.LATIN_SMALL_Z}function jN(e){return AN(e)||kN(e)}function MN(e){return jN(e)||ON(e)}function NN(e){return e+32}function PN(e){return e===G.SPACE||e===G.LINE_FEED||e===G.TABULATION||e===G.FORM_FEED}function FN(e){return PN(e)||e===G.SOLIDUS||e===G.GREATER_THAN_SIGN}function IN(e){return e===G.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:$M(e)?K.surrogateCharacterReference:rN(e)?K.noncharacterCharacterReference:nN(e)||e===G.CARRIAGE_RETURN?K.controlCharacterReference:null}var LN=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=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new aN(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new yN(sN,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=IN(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:q.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:q.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:q.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:q.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(oN(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(K.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=wN(e.tagName),e.type===q.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(K.endTagWithAttributes),e.selfClosing&&this._err(K.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 q.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case q.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case q.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:q.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=PN(e)?q.WHITESPACE_CHARACTER:e===G.NULL?q.NULL_CHARACTER:q.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(q.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vN.Attribute:vN.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitCodePoint(e);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case G.AMPERSAND:this._startCharacterReference();break;case G.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(jN(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case G.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case G.QUESTION_MARK:this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(jN(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case G.GREATER_THAN_SIGN:this._err(K.missingEndTagName),this.state=Q.DATA;break;case G.EOF:this._err(K.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.tagName+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(kN(e)?NN(e):e)}}_stateRcdataLessThanSign(e){e===G.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){jN(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case G.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case G.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===G.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){jN(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case G.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case G.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){jN(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===G.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===G.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jN(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){jN(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(QM.SCRIPT,!1)&&FN(this.preprocessor.peek(QM.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<QM.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case G.HYPHEN_MINUS:this._emitChars(`-`);break;case G.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case G.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case G.EOF:this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===G.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(QM.SCRIPT,!1)&&FN(this.preprocessor.peek(QM.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<QM.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:case G.SOLIDUS:case G.GREATER_THAN_SIGN:case G.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case G.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(kN(e)?NN(e):e)}}_stateAfterAttributeName(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case G.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case G.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case G.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case G.AMPERSAND:this._startCharacterReference();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.AMPERSAND:this._startCharacterReference();break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case G.QUOTATION_MARK:case G.APOSTROPHE:case G.LESS_THAN_SIGN:case G.EQUALS_SIGN:case G.GRAVE_ACCENT:this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case G.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case G.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case G.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case G.EOF:this._err(K.eofInTag),this._emitEOFToken();break;default:this._err(K.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(QM.DASH_DASH,!0)?(this._createCommentToken(QM.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(QM.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(QM.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(QM.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(QM.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case G.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.GREATER_THAN_SIGN:this._err(K.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case G.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.data+=`�`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case G.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case G.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===G.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==G.GREATER_THAN_SIGN&&e!==G.EOF&&this._err(K.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case G.HYPHEN_MINUS:t.data+=`-`;break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case G.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case G.GREATER_THAN_SIGN:this._err(K.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case G.EOF:this._err(K.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case G.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(kN(e))this._createDoctypeToken(String.fromCharCode(NN(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.NULL:this._err(K.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case G.EOF:{this._err(K.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=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.NULL:this._err(K.unexpectedNullCharacter),t.name+=`�`;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(kN(e)?NN(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(QM.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(QM.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.publicId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case G.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.QUOTATION_MARK:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case G.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case G.GREATER_THAN_SIGN:this._err(K.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case G.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case G.NULL:this._err(K.unexpectedNullCharacter),t.systemId+=`�`;break;case G.GREATER_THAN_SIGN:this._err(K.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.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 G.SPACE:case G.LINE_FEED:case G.TABULATION:case G.FORM_FEED:break;case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.EOF:this._err(K.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case G.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case G.NULL:this._err(K.unexpectedNullCharacter);break;case G.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case G.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case G.EOF:this._err(K.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===G.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case G.GREATER_THAN_SIGN:this.state=Q.DATA;break;case G.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.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(G.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&MN(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){MN(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===G.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},RN=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),zN=new Set([...RN,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),BN=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),VN=new Set([...BN,X.OL,X.UL]),HN=new Set([...BN,X.BUTTON]),UN=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),WN=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),GN=new Set([X.TR,X.TEMPLATE,X.HTML]),KN=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),qN=new Set([X.TABLE,X.TEMPLATE,X.HTML]),JN=new Set([X.TD,X.TH]),YN=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=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.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])!==J.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(EN,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(JN,J.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(qN,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(KN,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(GN,J.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]===X.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]===X.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 J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(WN.has(r))return!1;break;case J.MATHML:if(UN.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,BN)}hasInListItemScope(e){return this.hasInDynamicScope(e,VN)}hasInButtonScope(e){return this.hasInDynamicScope(e,HN)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(EN.has(t))return!0;if(BN.has(t))return!1;break;case J.SVG:if(WN.has(t))return!1;break;case J.MATHML:if(UN.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&RN.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&zN.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&zN.has(this.currentTagId);)this.pop()}},XN=3,ZN;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(ZN||={});var QN={type:ZN.Marker},$N=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===ZN.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<XN)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<XN)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>=XN&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(QN)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:ZN.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ZN.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(QN);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===ZN.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===ZN.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===ZN.Element&&t.element===e)}},eP={createDocument(){return{nodeName:`#document`,mode:SN.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};eP.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(eP.isTextNode(n)){n.value+=t;return}}eP.appendChild(e,eP.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&eP.isTextNode(r)?r.value+=t:eP.insertBefore(e,eP.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}}},tP=`html`,nP=`about:legacy-compat`,rP=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,iP=`+//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(`,`),aP=[...iP,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],oP=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),sP=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],cP=[...sP,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function lP(e,t){return t.some(t=>e.startsWith(t))}function uP(e){return e.name===tP&&e.publicId===null&&(e.systemId===null||e.systemId===nP)}function dP(e){if(e.name!==tP)return SN.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===rP)return SN.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),oP.has(n))return SN.QUIRKS;let e=t===null?aP:iP;if(lP(n,e))return SN.QUIRKS;if(e=t===null?sP:cP,lP(n,e))return SN.LIMITED_QUIRKS}return SN.NO_QUIRKS}var fP={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},pP=`definitionurl`,mP=`definitionURL`,hP=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])),gP=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),_P=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])),vP=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function yP(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===xN.COLOR||e===xN.SIZE||e===xN.FACE)||vP.has(t)}function bP(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===pP){e.attrs[t].name=mP;break}}function xP(e){for(let t=0;t<e.attrs.length;t++){let n=hP.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function SP(e){for(let t=0;t<e.attrs.length;t++){let n=gP.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 CP(e){let t=_P.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=wN(e.tagName))}function wP(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function TP(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===xN.ENCODING){let t=n[e].value.toLowerCase();return t===fP.TEXT_HTML||t===fP.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function EP(e,t,n,r){return(!r||r===J.HTML)&&TP(e,t,n)||(!r||r===J.MATHML)&&wP(e,t)}var DP=`hidden`,OP=8,kP=3,$;(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`})($||={});var AP={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},jP=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),MP={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:eP,onParseError:null},NP=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.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={...MP,...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 LN(this.options,this),this.activeFormattingElements=new $N(this.treeAdapter),this.fragmentContextID=n?wN(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new YN(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={...MP,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.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??AP,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)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=DN.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)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=DN.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=DN.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=DN.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=DN.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,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.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(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.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===q.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===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case q.CHARACTER:this.onCharacter(e);break;case q.NULL_CHARACTER:this.onNullCharacter(e);break;case q.COMMENT:this.onComment(e);break;case q.DOCTYPE:this.onDoctype(e);break;case q.START_TAG:this._processStartTag(e);break;case q.END_TAG:this.onEndTag(e);break;case q.EOF:this.onEof(e);break;case q.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return EP(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===ZN.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=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return jP.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 X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.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 TN[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ZI(this,e);return}switch(this.insertionMode){case $.INITIAL:KP(this,e);break;case $.BEFORE_HTML:YP(this,e);break;case $.BEFORE_HEAD:QP(this,e);break;case $.IN_HEAD:nF(this,e);break;case $.IN_HEAD_NO_SCRIPT:aF(this,e);break;case $.AFTER_HEAD:cF(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:dF(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:oI(this,e);break;case $.IN_TABLE_TEXT:yI(this,e);break;case $.IN_COLUMN_GROUP:EI(this,e);break;case $.AFTER_BODY:HI(this,e);break;case $.AFTER_AFTER_BODY:JI(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){XI(this,e);return}switch(this.insertionMode){case $.INITIAL:KP(this,e);break;case $.BEFORE_HTML:YP(this,e);break;case $.BEFORE_HEAD:QP(this,e);break;case $.IN_HEAD:nF(this,e);break;case $.IN_HEAD_NO_SCRIPT:aF(this,e);break;case $.AFTER_HEAD:cF(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:oI(this,e);break;case $.IN_COLUMN_GROUP:EI(this,e);break;case $.AFTER_BODY:HI(this,e);break;case $.AFTER_AFTER_BODY:JI(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){VP(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:VP(this,e);break;case $.IN_TABLE_TEXT:bI(this,e);break;case $.AFTER_BODY:HP(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:UP(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:GP(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,K.misplacedDoctype);break;case $.IN_TABLE_TEXT:bI(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?$I(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:KP(this,e);break;case $.BEFORE_HTML:qP(this,e);break;case $.BEFORE_HEAD:XP(this,e);break;case $.IN_HEAD:$P(this,e);break;case $.IN_HEAD_NO_SCRIPT:rF(this,e);break;case $.AFTER_HEAD:oF(this,e);break;case $.IN_BODY:WF(this,e);break;case $.IN_TABLE:hI(this,e);break;case $.IN_TABLE_TEXT:bI(this,e);break;case $.IN_CAPTION:SI(this,e);break;case $.IN_COLUMN_GROUP:wI(this,e);break;case $.IN_TABLE_BODY:DI(this,e);break;case $.IN_ROW:kI(this,e);break;case $.IN_CELL:jI(this,e);break;case $.IN_SELECT:NI(this,e);break;case $.IN_SELECT_IN_TABLE:FI(this,e);break;case $.IN_TEMPLATE:LI(this,e);break;case $.AFTER_BODY:BI(this,e);break;case $.IN_FRAMESET:UI(this,e);break;case $.AFTER_FRAMESET:GI(this,e);break;case $.AFTER_AFTER_BODY:qI(this,e);break;case $.AFTER_AFTER_FRAMESET:YI(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?eL(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:KP(this,e);break;case $.BEFORE_HTML:JP(this,e);break;case $.BEFORE_HEAD:ZP(this,e);break;case $.IN_HEAD:eF(this,e);break;case $.IN_HEAD_NO_SCRIPT:iF(this,e);break;case $.AFTER_HEAD:sF(this,e);break;case $.IN_BODY:nI(this,e);break;case $.TEXT:iI(this,e);break;case $.IN_TABLE:gI(this,e);break;case $.IN_TABLE_TEXT:bI(this,e);break;case $.IN_CAPTION:CI(this,e);break;case $.IN_COLUMN_GROUP:TI(this,e);break;case $.IN_TABLE_BODY:OI(this,e);break;case $.IN_ROW:AI(this,e);break;case $.IN_CELL:MI(this,e);break;case $.IN_SELECT:PI(this,e);break;case $.IN_SELECT_IN_TABLE:II(this,e);break;case $.IN_TEMPLATE:RI(this,e);break;case $.AFTER_BODY:VI(this,e);break;case $.IN_FRAMESET:WI(this,e);break;case $.AFTER_FRAMESET:KI(this,e);break;case $.AFTER_AFTER_BODY:JI(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:KP(this,e);break;case $.BEFORE_HTML:YP(this,e);break;case $.BEFORE_HEAD:QP(this,e);break;case $.IN_HEAD:nF(this,e);break;case $.IN_HEAD_NO_SCRIPT:aF(this,e);break;case $.AFTER_HEAD:cF(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:rI(this,e);break;case $.TEXT:aI(this,e);break;case $.IN_TABLE_TEXT:bI(this,e);break;case $.IN_TEMPLATE:zI(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:WP(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===G.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 $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:uF(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:oI(this,e);break;case $.IN_TABLE_TEXT:vI(this,e);break;default:}}};function PP(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):tI(e,t),n}function FP(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 IP(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>=kP;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=LP(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function LP(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 RP(e,t,n){let r=wN(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function zP(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 BP(e,t){for(let n=0;n<OP;n++){let n=PP(e,t);if(!n)break;let r=FP(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=IP(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&RP(e,a,i),zP(e,r,n)}}function VP(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function HP(e,t){e._appendCommentNode(t,e.openElements.items[0])}function UP(e,t){e._appendCommentNode(t,e.document)}function WP(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 GP(e,t){e._setDocumentType(t);let n=t.forceQuirks?SN.QUIRKS:dP(t);uP(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function KP(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,SN.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function qP(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):YP(e,t)}function JP(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&YP(e,t)}function YP(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function XP(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:QP(e,t)}}function ZP(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?QP(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function QP(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function $P(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,DN.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,DN.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,DN.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,DN.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:nF(e,t)}}function eF(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:nF(e,t);break;case X.TEMPLATE:tF(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function tF(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function nF(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function rF(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:$P(e,t);break;case X.NOSCRIPT:e._err(t,K.nestedNoscriptInHead);break;default:aF(e,t)}}function iF(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:aF(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function aF(e,t){let n=t.type===q.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function oF(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),$P(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,K.misplacedStartTagForHeadElement);break;default:cF(e,t)}}function sF(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:cF(e,t);break;case X.TEMPLATE:tF(e,t);break;default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function cF(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,lF(e,t)}function lF(e,t){switch(t.type){case q.CHARACTER:dF(e,t);break;case q.WHITESPACE_CHARACTER:uF(e,t);break;case q.COMMENT:VP(e,t);break;case q.START_TAG:WF(e,t);break;case q.END_TAG:nI(e,t);break;case q.EOF:rI(e,t);break;default:}}function uF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function dF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function fF(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function pF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function mF(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function hF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function gF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&EN.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function _F(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function vF(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function yF(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===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function bF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=DN.PLAINTEXT}function xF(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function SF(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(BP(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wF(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(BP(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function EF(e,t){e.treeAdapter.getDocumentMode(e.document)!==SN.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function DF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function OF(e){let t=oN(e,xN.TYPE);return t!=null&&t.toLowerCase()===DP}function kF(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),OF(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function AF(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function jF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function MF(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,DF(e,t)}function NF(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=DN.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function PF(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,DN.RAWTEXT)}function FF(e,t){e.framesetOk=!1,e._switchToTextParsing(t,DN.RAWTEXT)}function IF(e,t){e._switchToTextParsing(t,DN.RAWTEXT)}function LF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function RF(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function zF(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function BF(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function VF(e,t){e._reconstructActiveFormattingElements(),bP(t),SP(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function HF(e,t){e._reconstructActiveFormattingElements(),xP(t),SP(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function UF(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function WF(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:CF(e,t);break;case X.A:SF(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:gF(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:hF(e,t);break;case X.LI:case X.DD:case X.DT:yF(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:DF(e,t);break;case X.HR:jF(e,t);break;case X.RB:case X.RTC:zF(e,t);break;case X.RT:case X.RP:BF(e,t);break;case X.PRE:case X.LISTING:_F(e,t);break;case X.XMP:PF(e,t);break;case X.SVG:HF(e,t);break;case X.HTML:fF(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:$P(e,t);break;case X.BODY:pF(e,t);break;case X.FORM:vF(e,t);break;case X.NOBR:wF(e,t);break;case X.MATH:VF(e,t);break;case X.TABLE:EF(e,t);break;case X.INPUT:kF(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:AF(e,t);break;case X.IMAGE:MF(e,t);break;case X.BUTTON:xF(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:TF(e,t);break;case X.IFRAME:FF(e,t);break;case X.SELECT:LF(e,t);break;case X.OPTION:case X.OPTGROUP:RF(e,t);break;case X.NOEMBED:case X.NOFRAMES:IF(e,t);break;case X.FRAMESET:mF(e,t);break;case X.TEXTAREA:NF(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?IF(e,t):UF(e,t);break;case X.PLAINTEXT:bF(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:UF(e,t)}}function GF(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function KF(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,VI(e,t))}function qF(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function JF(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function YF(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function XF(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function ZF(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function QF(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $F(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function eI(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function tI(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!==X.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 nI(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:BP(e,t);break;case X.P:YF(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:qF(e,t);break;case X.LI:XF(e);break;case X.DD:case X.DT:ZF(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:QF(e);break;case X.BR:eI(e);break;case X.BODY:GF(e,t);break;case X.HTML:KF(e,t);break;case X.FORM:JF(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:$F(e,t);break;case X.TEMPLATE:tF(e,t);break;default:tI(e,t)}}function rI(e,t){e.tmplInsertionModeStack.length>0?zI(e,t):WP(e,t)}function iI(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function aI(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function oI(e,t){if(e.openElements.currentTagId!==void 0&&jP.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case q.CHARACTER:yI(e,t);break;case q.WHITESPACE_CHARACTER:vI(e,t);break}else _I(e,t)}function sI(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function cI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function lI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,wI(e,t)}function uI(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function dI(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,DI(e,t)}function fI(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function pI(e,t){OF(t)?e._appendElement(t,J.HTML):_I(e,t),t.ackSelfClosing=!0}function mI(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function hI(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:dI(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:$P(e,t);break;case X.COL:lI(e,t);break;case X.FORM:mI(e,t);break;case X.TABLE:fI(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:uI(e,t);break;case X.INPUT:pI(e,t);break;case X.CAPTION:sI(e,t);break;case X.COLGROUP:cI(e,t);break;default:_I(e,t)}}function gI(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:tF(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:_I(e,t)}}function _I(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lF(e,t),e.fosterParentingEnabled=n}function vI(e,t){e.pendingCharacterTokens.push(t)}function yI(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function bI(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_I(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var xI=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function SI(e,t){let n=t.tagID;xI.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,hI(e,t)):WF(e,t)}function CI(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&gI(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:nI(e,t)}}function wI(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:$P(e,t);break;default:EI(e,t)}}function TI(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:tF(e,t);break;case X.COL:break;default:EI(e,t)}}function EI(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function DI(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,kI(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,hI(e,t));break;default:hI(e,t)}}function OI(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,gI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:gI(e,t)}}function kI(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,DI(e,t));break;default:hI(e,t)}}function AI(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,OI(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,OI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:gI(e,t)}}function jI(e,t){let n=t.tagID;xI.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),kI(e,t)):WF(e,t)}function MI(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),AI(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:nI(e,t)}}function NI(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:$P(e,t);break;default:}}function PI(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:tF(e,t);break;default:}}function FI(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):NI(e,t)}function II(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):PI(e,t)}function LI(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:$P(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,hI(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,wI(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,DI(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,kI(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,WF(e,t)}}function RI(e,t){t.tagID===X.TEMPLATE&&tF(e,t)}function zI(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):WP(e,t)}function BI(e,t){t.tagID===X.HTML?WF(e,t):HI(e,t)}function VI(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.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 HI(e,t)}function HI(e,t){e.insertionMode=$.IN_BODY,lF(e,t)}function UI(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:$P(e,t);break;default:}}function WI(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function GI(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.NOFRAMES:$P(e,t);break;default:}}function KI(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function qI(e,t){t.tagID===X.HTML?WF(e,t):JI(e,t)}function JI(e,t){e.insertionMode=$.IN_BODY,lF(e,t)}function YI(e,t){switch(t.tagID){case X.HTML:WF(e,t);break;case X.NOFRAMES:$P(e,t);break;default:}}function XI(e,t){t.chars=`�`,e._insertCharacters(t)}function ZI(e,t){e._insertCharacters(t),e.framesetOk=!1}function QI(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function $I(e,t){if(yP(t))QI(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?bP(t):r===J.SVG&&(CP(t),xP(t)),SP(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function eL(e,t){if(t.tagID===X.P||t.tagID===X.BR){QI(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)===J.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([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var tL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,nL=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),rL={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function iL(e,t){let n=vL(e),r=Vw(`type`,{handlers:{root:oL,element:sL,text:cL,comment:dL,doctype:lL,raw:fL},unknown:pL}),i={parser:n?new NP(rL):NP.getFragmentParser(void 0,rL),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),mL(i,rv());let a=kM(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&WS(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function aL(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function oL(e,t){aL(e.children,t)}function sL(e,t){gL(e,t),aL(e.children,t),_L(e,t)}function cL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:q.CHARACTER,chars:e.value,location:yL(e)};mL(t,rv(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lL(e,t){let n={type:q.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:yL(e)};mL(t,rv(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uL(e,t){t.stitches=!0;let n=bL(e);`children`in e&&`children`in n&&(n.children=iL({type:`root`,children:e.children},t.options).children),dL({type:`comment`,value:{stitch:n}},t)}function dL(e,t){let n=e.value,r={type:q.COMMENT,data:n,location:yL(e)};mL(t,rv(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function fL(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,hL(t,rv(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(tL,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function pL(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))uL(n,t);else{let e=``;throw nL.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function mL(e,t){hL(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=DN.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function hL(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function gL(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===DN.PLAINTEXT)return;mL(t,rv(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Rj.html;i===Rj.html&&n===`svg`&&(i=Rj.svg);let a=BM({...e,children:[]},{space:i===Rj.svg?`svg`:`html`}),o={type:q.START_TAG,tagName:n,tagID:wN(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:yL(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _L(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&XM.includes(n)||t.parser.tokenizer.state===DN.PLAINTEXT)return;mL(t,nv(e));let r={type:q.END_TAG,tagName:n,tagID:wN(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:yL(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===DN.RCDATA||t.parser.tokenizer.state===DN.RAWTEXT||t.parser.tokenizer.state===DN.SCRIPT_DATA)&&(t.parser.tokenizer.state=DN.DATA)}function vL(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function yL(e){let t=rv(e)||{line:void 0,column:void 0,offset:void 0},n=nv(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function bL(e){return`children`in e?OS({...e,children:[]}):OS(e)}function xL(e){return function(t,n){return iL(t,{...e,file:n})}}var SL=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],CL={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...SL,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...SL],h2:[[`className`,`sr-only`]],img:[...SL,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...SL,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...SL],table:[...SL],ul:[...SL,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},wL={}.hasOwnProperty;function TL(e,t){let n={type:`root`,children:[]},r=EL({schema:t?{...CL,...t}:CL,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function EL(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return DL(e,n);case`doctype`:return OL(e,n);case`element`:return kL(e,n);case`root`:return AL(e,n);case`text`:return jL(e,n);default:}}}function DL(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return RL(r,t),r}}function OL(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return RL(e,t),e}}function kL(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=ML(e,t.children),i=NL(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&wL.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return RL(o,t),o}function AL(e,t){let n={type:`root`,children:ML(e,t.children)};return RL(n,t),n}function jL(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return RL(n,t),n}function ML(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=EL(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function NL(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&wL.call(r,n)?r[n]:void 0,o=r&&wL.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(wL.call(s,l)){let t=s[l],n=PL(e,zL(a,l),l,t);n??=PL(e,zL(o,l),l,t),n!=null&&(c[l]=n)}if(i&&wL.call(i,n)){let e=i[n];for(l in e)wL.call(e,l)&&!wL.call(c,l)&&(c[l]=e[l])}return c}function PL(e,t,n,r){return t?Array.isArray(r)?FL(e,t,n,r):IL(e,t,n,r):void 0}function FL(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=IL(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function IL(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&LL(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function LL(e,t,n){let r=e.schema.protocols&&wL.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function RL(e,t){let n=av(t);t.data&&(e.data=OS(t.data)),n&&(e.position=n)}function zL(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function BL(e){return function(t){return TL(t,e)}}function VL(e){try{return decodeURIComponent(e)}catch{return e}}function HL(e){return()=>t=>{let n=[],r=new Map,i=e=>{e.properties&&n.push(e);for(let t of e.children??[])i(t)};i(t);for(let t of n){let n=t.properties?.id;if(typeof n!=`string`)continue;let i=`${e}${VL(n)}`;r.set(n,i),n.startsWith(`user-content-`)&&r.set(n.slice(13),i),t.properties.id=i}for(let e of n){let t=e.properties;if(typeof t.href==`string`&&t.href.startsWith(`#`)){let e=t.href.slice(1),n=r.get(e)??r.get(VL(e));n&&(t.href=`#${n}`)}Array.isArray(t.ariaDescribedBy)&&(t.ariaDescribedBy=t.ariaDescribedBy.map(e=>typeof e==`string`?r.get(e)??e:e))}}}var UL={...CL,tagNames:[...CL.tagNames??[],`colgroup`,`col`,`mark`,`u`],attributes:{...CL.attributes,div:[...CL.attributes?.div??[],`dataFrontmatter`,`dataChatMathPending`,`ariaBusy`],span:[...CL.attributes?.span??[],...[`Kind`,`Key`,`Ref`,`Name`,`Source`,`Path`,`Label`,`RawText`,`Excerpt`,`MessageId`,`Role`,`StartLine`,`EndLine`].map(e=>`dataChatInlineToken${e}`)],code:[[`className`,/^language-./,`math-inline`,`math-display`]],details:[`open`],blockquote:[...CL.attributes?.blockquote??[],[`dataCallout`,`note`,`tip`,`important`,`warning`,`caution`]]},protocols:{...CL.protocols,href:[...CL.protocols?.href??[],`nextclaw`,`file`]}};function WL(e){return e.value??e.children?.map(WL).join(``)??``}function GL(e){return k.Children.map(e,e=>{if(!(0,k.isValidElement)(e))return e;let t=e.props.node?.tagName;if(t===`img`)return e.props.alt??``;if(t===`input`)return null;let n=GL(e.props.children);return t===`a`?n:(0,k.cloneElement)(e,void 0,n)})}function KL({node:e,children:t,open:n,label:r}){let[i,a]=(0,k.useState)(!!n),o=(0,k.useId)(),s=e?.children.find(e=>e.type===`element`&&e.tagName===`summary`),c=s?WL(s):r,l=k.Children.toArray(t).find(e=>(0,k.isValidElement)(e)&&e.props.node?.tagName===`summary`),u=k.Children.toArray(t).filter(e=>!(0,k.isValidElement)(e)||e.props.node?.tagName!==`summary`);return(0,A.jsxs)(`div`,{"data-document-details":!0,className:`my-3 overflow-hidden rounded-lg border border-border`,children:[(0,A.jsxs)(`button`,{type:`button`,"aria-expanded":i,"aria-controls":o,onClick:()=>a(e=>!e),className:`flex min-h-9 w-full items-center gap-2 px-3 py-2 text-left text-sm font-medium hover:bg-[var(--interaction-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]`,children:[(0,A.jsx)(We,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none`,style:{transform:i?`rotate(90deg)`:`rotate(0deg)`}}),(0,A.jsx)(`span`,{className:`min-w-0 break-words`,children:l?GL(l):c||r})]}),(0,A.jsx)(`div`,{id:o,children:(0,A.jsx)(fj,{open:i,children:()=>(0,A.jsx)(`div`,{"data-document-details-content":!0,className:`flow-root min-w-0 border-t border-border px-3 py-2`,children:u})})})]})}var qL=function(e,t,n){let r=41,i=t=>(e.enter(`mathText`),e.enter(`mathTextSequence`),e.consume(t),a),a=t=>t!==40&&t!==91?n(t):(r=t===40?41:93,e.consume(t),e.exit(`mathTextSequence`),c),o=(e,t,n)=>{let i=t=>(e.enter(`mathTextSequence`),e.consume(t),a),a=i=>i===r?(e.consume(i),e.exit(`mathTextSequence`),t):n(i);return i},s=n=>(e.exit(`mathText`),t(n)),c=t=>t===null?n(t):t===92?e.attempt({tokenize:o},s,l)(t):(e.enter(`mathTextData`),e.consume(t),e.exit(`mathTextData`),c),l=t=>(e.enter(`mathTextData`),e.consume(t),u),u=t=>t===null?n(t):(e.consume(t),e.exit(`mathTextData`),c);return i};function JL(e){return function(){let t=this.data();return(t.micromarkExtensions??=[]).push({text:{92:{tokenize:qL}}}),function t(n){let r=n.position?.start.offset;n.type===`inlineMath`&&r!==void 0&&e.startsWith(`\\[`,r)&&n.data?.hProperties&&(n.data.hProperties.className=[`language-math`,`math-display`]),n.children?.forEach(t)}}}function YL(e){return{type:`element`,tagName:e?`div`:`span`,properties:{"data-chat-math-pending":`true`,"aria-busy":`true`,style:e?`min-height:3em;display:flex;align-items:center;justify-content:center;opacity:0.6`:`opacity:0.6`},children:[{type:`text`,value:`…`}]}}function XL(e,t){let n=t.slice(e.position?.start.offset,e.position?.end.offset).split(/\r\n|\r|\n/),r=n[0]?.match(/^(\${2,}|`{3,}|~{3,})/)?.[1];if(!r||n.length<2)return!1;let i=n.at(-1)?.replace(/^\s*(?:>\s*)*/,``).trim()??``;return i.length>=r.length&&[...i].every(e=>e===r[0])}function ZL(e){return()=>function t(n){if((n.type===`math`||n.type===`code`&&n.lang===`math`)&&!XL(n,e)){let e=YL(!0);return{...n,data:{hName:e.tagName,hProperties:e.properties,hChildren:e.children}}}return n.children&&=n.children.map(t),n}}function QL(){return function e(t){return t.properties?.className?.includes(`katex-error`)?YL(!1):(t.children&&=t.children.map(e),t)}}function $L({characterCountLabel:e,excerpt:t,kind:n,label:r,location:i,path:a,tooltip:o,onClick:s}){let{Tooltip:c,TooltipContent:l,TooltipProvider:u,TooltipTrigger:d}=Ki,f=!!s,p=j(jh,`nextclaw-chat-inline-token mx-[0.08em]`,f?`cursor-pointer transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25`:`cursor-default`),m=a||o,h=(0,A.jsx)(Kh,{excerpt:t,kind:n,label:r,metricLabel:i??e,source:m}),g=f?(0,A.jsx)(`button`,{type:`button`,className:p,onClick:e=>{e.preventDefault(),e.stopPropagation(),s?.()},children:h}):(0,A.jsx)(`span`,{className:p,children:h});return(n===`workspace_excerpt`||n===`conversation_excerpt`)&&t?(0,A.jsx)(qh,{characterCountLabel:e,excerpt:t,kind:n===`conversation_excerpt`?n:`workspace_file`,label:r,location:i,path:m,children:g}):(0,A.jsx)(u,{delayDuration:250,children:(0,A.jsxs)(c,{children:[(0,A.jsx)(d,{asChild:!0,children:g}),(0,A.jsx)(l,{side:`top`,className:`max-w-[24rem] break-all text-xs`,children:o})]})})}function eR(){return typeof navigator<`u`&&typeof navigator.clipboard?.writeText==`function`}function tR(e){if(typeof document>`u`)return;let t=document.getSelection();t&&(t.removeAllRanges(),e.forEach(e=>t.addRange(e)))}function nR(){let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:null,n=t?{input:t,start:t.selectionStart,end:t.selectionEnd}:null,r=document.getSelection();return{activeElement:e,activeInputSelection:n,ranges:r?Array.from({length:r.rangeCount},(e,t)=>r.getRangeAt(t).cloneRange()):[]}}function rR(e){let t=document.createElement(`textarea`);return t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),Object.assign(t.style,{fontSize:`12pt`,left:`-9999px`,opacity:`0`,pointerEvents:`none`,position:`fixed`,top:`0`}),t}function iR(e){try{e.focus({preventScroll:!0})}catch{e.focus()}}function aR(e){iR(e),e.select(),e.setSelectionRange(0,e.value.length)}function oR(){try{return typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{return!1}}function sR(e){if(!e.activeInputSelection)return!1;let{input:t,start:n,end:r}=e.activeInputSelection;return n===null||r===null?!1:(t.setSelectionRange(n,r),!0)}function cR(e){e.activeElement&&iR(e.activeElement),sR(e)||tR(e.ranges)}function lR(e){if(typeof document>`u`||!document.body)return!1;let t=nR(),n=rR(e);document.body.appendChild(n),aR(n);let r=oR();return n.remove(),cR(t),r}async function uR(e){if(!e)return!1;if(eR())try{return await navigator.clipboard.writeText(e),!0}catch{return lR(e)}return lR(e)}var dR=1300;function fR(e){let[t,n]=(0,k.useState)(!1),r=(0,k.useCallback)(async()=>{e.text&&(await uR(e.text)?n(!0):n(!1))},[e.text]);return(0,k.useEffect)(()=>{if(!t||typeof window>`u`)return;let r=window.setTimeout(()=>n(!1),e.resetDelayMs??dR);return()=>window.clearTimeout(r)},[t,e.resetDelayMs]),{copied:t,copy:r}}var pR=e(n(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,ee=`\\b\\d+(\\.\\d+)?`,te=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,ne=`\\b(0b[01]+)`,D=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,re=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},O={begin:`\\\\[\\s\\S]`,relevance:0},ie={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[O]},ae={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[O]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},se=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},ce=se(`//`,`$`),le=se(`/\\*`,`\\*/`),ue=se(`#`,`$`),de={scope:`number`,begin:ee,relevance:0},fe={scope:`number`,begin:te,relevance:0},pe={scope:`number`,begin:ne,relevance:0},me={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[O,{begin:/\[/,end:/\]/,relevance:0,contains:[O]}]},he={scope:`title`,begin:T,relevance:0},ge={scope:`title`,begin:E,relevance:0},_e={begin:`\\.\\s*`+E,relevance:0},ve=Object.freeze({__proto__:null,APOS_STRING_MODE:ie,BACKSLASH_ESCAPE:O,BINARY_NUMBER_MODE:pe,BINARY_NUMBER_RE:ne,COMMENT:se,C_BLOCK_COMMENT_MODE:le,C_LINE_COMMENT_MODE:ce,C_NUMBER_MODE:fe,C_NUMBER_RE:te,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:ue,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:_e,NUMBER_MODE:de,NUMBER_RE:ee,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:ae,REGEXP_MODE:me,RE_STARTERS_RE:D,SHEBANG:re,TITLE_MODE:he,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:ge});function ye(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function be(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function xe(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ye,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Se(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function Ce(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function we(e,t){e.relevance===void 0&&(e.relevance=1)}var Te=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Ee=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],De=`keyword`;function Oe(e,t,n=De){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,Oe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,ke(n[0],n[1])]})}}function ke(e,t){return t?Number(t):Ae(e)?0:1}function Ae(e){return Ee.includes(e.toLowerCase())}var je={},Me=e=>{console.error(e)},Ne=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Pe=(e,t)=>{je[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),je[`${e}/${t}`]=!0)},Fe=Error();function Ie(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Le(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Me(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),Fe;if(typeof e.beginScope!=`object`||e.beginScope===null)throw Me(`beginScope must be object`),Fe;Ie(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Re(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Me(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),Fe;if(typeof e.endScope!=`object`||e.endScope===null)throw Me(`endScope must be object`),Fe;Ie(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function ze(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Be(e){ze(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Le(e),Re(e)}function Ve(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[be,Ce,Be,Te].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[xe,Se,we].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=Oe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ue(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function He(e){return e?e.endsWithParent||He(e.starts):!1}function Ue(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:He(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var We=`11.11.1`,Ge=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},Ke=i,qe=a,Je=Symbol(`nomatch`),Ye=7,Xe=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=ie(n[1]);return t||(Ne(s.replace(`{}`,n[1])),Ne(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||ie(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(Pe(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),Pe(`10.7.0`,`Please use highlight(code, options) instead.
165
165
  https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};ue(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,ue(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!D.keywords){O.addText(ae);return}let e=0;D.keywordPatternRe.lastIndex=0;let t=D.keywordPatternRe.exec(ae),n=``;for(;t;){n+=ae.substring(e,t.index);let r=ee.case_insensitive?t[0].toLowerCase():t[0],i=u(D,r);if(i){let[e,a]=i;if(O.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Ye&&(oe+=a),e.startsWith(`_`))n+=t[0];else{let n=ee.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=D.keywordPatternRe.lastIndex,t=D.keywordPatternRe.exec(ae)}n+=ae.substring(e),O.addText(n)}function f(){if(ae===``)return;let e=null;if(typeof D.subLanguage==`string`){if(!t[D.subLanguage]){O.addText(ae);return}e=v(D.subLanguage,ae,!0,re[D.subLanguage]),re[D.subLanguage]=e._top}else e=S(ae,D.subLanguage.length?D.subLanguage:null);D.relevance>0&&(oe+=e.relevance),O.__addSublanguage(e._emitter,e.language)}function p(){D.subLanguage==null?d():f(),ae=``}function m(e,t){e!==``&&(O.startScope(t),O.addText(e),O.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=ee.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(ae=i,d(),ae=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&O.openNode(ee.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(ae,ee.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),ae=``):e.beginScope._multi&&(h(e.beginScope,t),ae=``)),D=Object.create(e,{parent:{value:D}}),D}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return D.matcher.regexIndex===0?(ae+=e[0],1):(le=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?ae+=t:(n.excludeBegin&&(ae+=t),p(),!n.returnBegin&&!n.excludeBegin&&(ae=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(D,e,r);if(!i)return Je;let a=D;D.endScope&&D.endScope._wrap?(p(),m(t,D.endScope._wrap)):D.endScope&&D.endScope._multi?(p(),h(D.endScope,e)):a.skip?ae+=t:(a.returnEnd||a.excludeEnd||(ae+=t),p(),a.excludeEnd&&(ae=t));do D.scope&&O.closeNode(),!D.skip&&!D.subLanguage&&(oe+=D.relevance),D=D.parent;while(D!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=D;t!==ee;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>O.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(ae+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(ae+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(D.scope||`<unnamed>`)+`"`);throw e.mode=D,e}else if(r.type===`end`){let e=C(r);if(e!==Je)return e}if(r.type===`illegal`&&a===``)return ae+=`
166
- `,1;if(ce>1e5&&ce>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return ae+=a,a.length}let ee=ie(e);if(!ee)throw Me(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let te=Ve(ee),ne=``,D=a||te,re={},O=new l.__emitter(l);w();let ae=``,oe=0,se=0,ce=0,le=!1;try{if(ee.__emitTokens)ee.__emitTokens(n,O);else{for(D.matcher.considerAll();;){ce++,le?le=!1:D.matcher.considerAll(),D.matcher.lastIndex=se;let e=D.matcher.exec(n);if(!e)break;let t=E(n.substring(se,e.index),e);se=e.index+t}E(n.substring(se))}return O.finalize(),ne=O.toHTML(),{language:e,value:ne,relevance:oe,illegal:!1,_emitter:O,_top:D}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:Ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:se,context:n.slice(se-100,se+100),mode:t.mode,resultSoFar:ne},_emitter:O};if(o)return{language:e,value:Ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:O,_top:D};throw t}}function b(e){let t={value:Ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(ie).filter(oe).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(ie(e.language).supersetOf===t.language)return 1;if(ie(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ue(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Ge(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ue(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=qe(l,e)}let E=()=>{ne(),Pe(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function ee(){ne(),Pe(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let te=!1;function ne(){function e(){ne()}if(document.readyState===`loading`){te||window.addEventListener(`DOMContentLoaded`,e,!1),te=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function D(n,r){let i=null;try{i=r(e)}catch(e){if(Me(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)Me(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&ae(i.aliases,{languageName:n})}function re(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function O(){return Object.keys(t)}function ie(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function ae(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function oe(e){let t=ie(e);return t&&!t.disableAutodetect}function se(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function ce(e){se(e),a.push(e)}function le(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ue(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function de(e){return Pe(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),Pe(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:ne,highlightElement:w,highlightBlock:de,configure:T,initHighlighting:E,initHighlightingOnLoad:ee,registerLanguage:D,unregisterLanguage:re,listLanguages:O,getLanguage:ie,registerAliases:ae,autoDetection:oe,inherit:qe,addPlugin:ce,removePlugin:le}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=We,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ve)typeof ve[e]==`object`&&n(ve[e]);return Object.assign(e,ve),e},Ze=Xe({});Ze.newInstance=()=>Xe({}),t.exports=Ze,Ze.HighlightJS=Ze,Ze.default=Ze}))()).default;function dR(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}var fR=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pR=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),mR=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),hR=[...pR,...mR],gR=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),_R=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),vR=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),yR=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function bR(e){let t=e.regex,n=fR(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+_R.join(`|`)+`)`},{begin:`:(:)?(`+vR.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+yR.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:gR.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+hR.join(`|`)+`)\\b`}]}}function xR(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}var SR=`[A-Za-z$_][0-9A-Za-z$_]*`,CR=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),wR=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],TR=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),ER=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],DR=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],OR=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],kR=[].concat(DR,TR,ER);function AR(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=SR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:SR,keyword:CR,literal:wR,built_in:kR,"variable.language":OR},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...TR,...ER]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function ee(e){return t.concat(`(?!`,e.join(`|`),`)`)}let te={match:t.concat(/\b/,ee([...DR,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},D={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},re=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},O,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:re,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},ne,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},te,E,S,D,{match:/\$[(.]/}]}}function jR(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}function MR(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function NR(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function PR(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function FR(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}var IR=`[A-Za-z$_][0-9A-Za-z$_]*`,LR=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),RR=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],zR=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),BR=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],VR=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],HR=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],UR=[].concat(VR,zR,BR);function WR(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=IR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:IR,keyword:LR,literal:RR,built_in:UR,"variable.language":HR},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...zR,...BR]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function ee(e){return t.concat(`(?!`,e.join(`|`),`)`)}let te={match:t.concat(/\b/,ee([...VR,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},D={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},re=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},O,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:re,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},ne,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},te,E,S,D,{match:/\$[(.]/}]}}function GR(e){let t=e.regex,n=WR(e),r=IR,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:IR,keyword:LR.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:RR,built_in:UR.concat(i),"variable.language":HR},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function KR(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function qR(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var JR=new Set([`text`,`txt`,`plain`,`plaintext`,`none`,`output`]),YR=[`typescript`,`javascript`,`json`,`bash`,`shell`,`python`,`css`,`xml`,`markdown`,`yaml`,`sql`,`diff`],XR=4,ZR=[{name:`typescript`,language:GR,aliases:[`ts`,`tsx`]},{name:`javascript`,language:AR,aliases:[`js`,`jsx`,`mjs`,`cjs`]},{name:`json`,language:jR,aliases:[`jsonc`]},{name:`bash`,language:dR,aliases:[`sh`,`zsh`]},{name:`shell`,language:PR,aliases:[`console`,`terminal`]},{name:`python`,language:NR,aliases:[`py`]},{name:`css`,language:bR},{name:`xml`,language:KR,aliases:[`html`,`svg`]},{name:`markdown`,language:MR,aliases:[`md`,`mdx`]},{name:`yaml`,language:qR,aliases:[`yml`]},{name:`sql`,language:FR},{name:`diff`,language:xR,aliases:[`patch`]}];function QR(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function $R(e){return e.trim().toLowerCase()}var ez=new class{constructor(){this.highlight=(e,t)=>{let n=$R(t);if(!e||JR.has(n))return this.createPlainTextResult(e,n||`text`);if(this.engine.getLanguage(n)){let t=this.engine.highlight(e,{language:n,ignoreIllegals:!0});return{html:t.value,language:t.language??n,highlighted:!0}}let r=this.engine.highlightAuto(e,YR);return r.language&&r.relevance>=XR?{html:r.value,language:r.language,highlighted:!0}:this.createPlainTextResult(e,n||`text`)},this.createPlainTextResult=(e,t)=>({html:QR(e),language:t,highlighted:!1}),this.engine=uR.newInstance(),ZR.forEach(e=>{this.engine.registerLanguage(e.name,e.language),e.aliases&&this.engine.registerAliases(e.aliases,{languageName:e.name})})}},tz=/language-([a-z0-9-]+)/i;function nz(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(nz).join(``):``}function rz(e){let t=nz(e);return t.endsWith(`
167
- `)?t.slice(0,-1):t}function iz(e){return(e?tz.exec(e):null)?.[1]?.toLowerCase()||`text`}function az({className:e,children:t,texts:n}){let r=(0,k.useMemo)(()=>iz(e),[e]),i=(0,k.useMemo)(()=>rz(t),[t]),a=(0,k.useMemo)(()=>ez.highlight(i,r),[i,r]),o=(0,k.useMemo)(()=>{let t=`language-${a.language}`;return j(`hljs`,e,e?.includes(`language-`)?void 0:t)},[e,a.language]),{copied:s,copy:c}=lR({text:i});return(0,A.jsxs)(`div`,{className:`chat-codeblock`,children:[(0,A.jsxs)(`div`,{className:`chat-codeblock-toolbar`,children:[(0,A.jsx)(`span`,{className:`chat-codeblock-language`,children:r}),(0,A.jsxs)(`button`,{type:`button`,className:`chat-codeblock-copy`,onClick:()=>void c(),"aria-label":s?n.copiedCodeLabel:n.copyCodeLabel,children:[s?(0,A.jsx)(h,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ye,{className:`h-3.5 w-3.5`}),(0,A.jsx)(`span`,{children:s?n.copiedCodeLabel:n.copyCodeLabel})]})]}),(0,A.jsx)(`pre`,{children:(0,A.jsx)(`code`,{className:o,"data-highlighted":a.highlighted?`true`:`false`,dangerouslySetInnerHTML:{__html:a.html}})})]})}var oz=`nextclaw-inline`,sz=/language-([a-z0-9-]+)/i,cz=new Set([`auto`,`source`,`rendered`]),lz=32,uz=64*1024;function dz(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function fz(e){return typeof e==`string`&&e.trim().length>0?e.trim():void 0}function pz(e){return Number.isInteger(e)&&Number(e)>0?Number(e):void 0}function mz(e){let t=fz(e);return t&&cz.has(t)?t:void 0}function hz(e){let{payload:t}=e;return dz(t)?t:null}function gz(e,t){return e===null||typeof e==`string`||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):t>=lz||typeof e!=`object`?!1:(Array.isArray(e)?e:Object.values(e)).every(e=>gz(e,t+1))}function _z(e){if(e!==void 0)return!dz(e)||!gz(e,0)?null:new TextEncoder().encode(JSON.stringify(e)).byteLength<=uz?e:null}function vz(e){let t=hz(e);if(!t)return null;let n=fz(t.path);if(!n)return null;let r=mz(t.viewer),i=_z(t.params);return i===null||i&&(r===`source`||!/\.html?$/i.test(n))?null:{type:`file`,payload:{path:n,line:pz(t.line),column:pz(t.column),viewer:r,params:i??void 0}}}function yz(e){let t=hz(e);if(!t)return null;let n=fz(t.url);return n?{type:`url`,payload:{url:n}}:null}function bz(e){let t=hz(e);if(!t)return null;let n=fz(t.appId);if(!n)return null;let r=_z(t.params);return r===null?null:{type:`panel_app`,payload:{appId:n,path:fz(t.path),params:r??void 0}}}function xz(e){let t=hz(e);return!t||!(`value`in t)?null:{type:`json`,payload:{value:t.value}}}function Sz(e){if(!dz(e))return null;let t=fz(e.type);return t===`file`?vz(e):t===`url`?yz(e):t===`panel_app`?bz(e):t===`json`?xz(e):null}function Cz(e){return(e?sz.exec(e):null)?.[1]?.toLowerCase()===oz}function wz(e){let t=e.endsWith(`
168
- `)?e.slice(0,-1):e,n;try{n=JSON.parse(t)}catch{return null}if(!dz(n))return null;let r=Sz(n.target);return r?{target:r,title:fz(n.title),description:fz(n.description)}:null}function Tz(e){if(e.title)return e.title;if(e.target.type===`file`){let t=e.target.payload.path.split(`/`).filter(Boolean);return t[t.length-1]??e.target.payload.path}return e.target.type===`url`?e.target.payload.url:e.target.type===`panel_app`?e.target.payload.appId:`JSON`}function Ez(e){return e.target.type===`file`?e.target.payload.path:e.target.type===`url`?e.target.payload.url:e.target.type===`panel_app`?e.target.payload.appId:JSON.stringify(e.target.payload.value,null,2)}function Dz({display:e}){let t=`h-3.5 w-3.5 shrink-0 text-muted-foreground`;return e.target.type===`file`?(0,A.jsx)(at,{className:t,"aria-hidden":!0}):e.target.type===`url`?(0,A.jsx)(Oe,{className:t,"aria-hidden":!0}):e.target.type===`panel_app`?(0,A.jsx)(Fe,{className:t,"aria-hidden":!0}):(0,A.jsx)(qe,{className:t,"aria-hidden":!0})}function Oz(e){return e.length>1200?`${e.slice(0,1200)}\n...`:e}function kz({display:e}){let t=Tz(e),n=Ez(e),r=e.target.type===`json`?Oz(n):n;return(0,A.jsxs)(`section`,{className:j(`my-2 max-w-full border-l-2 border-border bg-muted/30 px-3 py-2`,`text-xs leading-relaxed text-foreground`),"data-nextclaw-inline-display":`true`,"data-nextclaw-inline-display-type":e.target.type,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,A.jsx)(Dz,{display:e}),(0,A.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:t})]}),e.description?(0,A.jsx)(`p`,{className:`mt-1 line-clamp-2 text-[12px] text-muted-foreground`,children:e.description}):null,(0,A.jsx)(`pre`,{className:j(`mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-words`,`font-mono text-[11px] leading-relaxed text-muted-foreground`),children:r})]})}function Az({display:e,renderInlineDisplay:t}){let n=t?.(e);return n==null?(0,A.jsx)(kz,{display:e}):(0,A.jsx)(A.Fragment,{children:n})}var jz=.5,Mz=4,Nz=.25;function Pz({actions:e,className:t}){return(0,A.jsx)(`div`,{"data-chat-message-preview-toolbar":`true`,className:j(`absolute right-2 top-2 z-10 flex items-center gap-0.5 rounded-lg bg-black/55 p-1 text-white opacity-80 shadow-lg backdrop-blur-md transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100`,t),children:e.map(e=>(0,A.jsx)(`button`,{type:`button`,"aria-label":e.label,title:e.label,disabled:e.disabled,className:`inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onSelect()},children:e.icon},e.id))})}function Fz({actions:e=[],children:t,closeLabel:n,label:r,onClose:i,resetZoomLabel:a=`Reset zoom`,zoomInLabel:o=`Zoom in`,zoomOutLabel:s=`Zoom out`}){let c=(0,k.useRef)(null),[l,u]=(0,k.useState)(!1),[d,f]=(0,k.useState)({scale:1,x:0,y:0}),p=(0,k.useCallback)(()=>{f({scale:1,x:0,y:0})},[]),m=(0,k.useCallback)((e,t={x:0,y:0})=>{f(n=>{let r=typeof e==`function`?e(n.scale):e,i=Math.min(Mz,Math.max(jz,r));if(i<=1)return{scale:i,x:0,y:0};let a=i/n.scale;return{scale:i,x:t.x-(t.x-n.x)*a,y:t.y-(t.y-n.y)*a}})},[]);(0,k.useEffect)(()=>{let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=e=>{if(e.key===`Escape`){e.preventDefault(),i();return}e.key===`+`||e.key===`=`?(e.preventDefault(),m(e=>e+Nz)):e.key===`-`?(e.preventDefault(),m(e=>e-Nz)):e.key===`0`&&(e.preventDefault(),p())};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[m,i,p]);let h=e=>{d.scale<=1||e.button!==0||(e.currentTarget.setPointerCapture(e.pointerId),c.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,x:d.x,y:d.y},u(!0))},g=e=>{let t=c.current;!t||t.pointerId!==e.pointerId||f(n=>({...n,x:t.x+e.clientX-t.startX,y:t.y+e.clientY-t.startY}))},_=e=>{c.current?.pointerId===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),c.current=null,u(!1))},v=e=>{e.preventDefault();let t=e.currentTarget.getBoundingClientRect();m(t=>t+(e.deltaY<0?Nz:-Nz),{x:e.clientX-t.left-t.width/2,y:e.clientY-t.top-t.height/2})},y=`${Math.round(d.scale*100)}%`,b=[...e,{id:`close`,label:n,icon:(0,A.jsx)(Me,{className:`h-4 w-4`,strokeWidth:2}),onSelect:i}];return(0,Ch.createPortal)((0,A.jsxs)(`div`,{role:`dialog`,"aria-label":r,"aria-modal":`true`,className:`fixed inset-0 z-[var(--z-modal,10050)] overflow-hidden bg-black/90 backdrop-blur-[2px]`,onClick:i,children:[(0,A.jsx)(Pz,{actions:b,className:`right-4 top-4 opacity-100`}),(0,A.jsx)(`div`,{"data-chat-message-lightbox-viewport":`true`,className:j(`absolute inset-0 flex touch-none select-none items-center justify-center overflow-hidden p-6 sm:p-12`,d.scale>1&&(l?`cursor-grabbing`:`cursor-grab`)),onClick:e=>e.stopPropagation(),onDoubleClick:()=>{d.scale===1?m(2):p()},onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onWheel:v,children:(0,A.jsx)(`div`,{"data-chat-message-lightbox-content":`true`,className:j(`flex h-full w-full items-center justify-center will-change-transform`,!l&&`transition-transform duration-150 ease-out`),style:{transform:`translate3d(${d.x}px, ${d.y}px, 0) scale(${d.scale})`},children:t})}),(0,A.jsxs)(`div`,{className:`absolute bottom-5 left-1/2 z-10 flex -translate-x-1/2 items-center gap-0.5 rounded-xl bg-black/60 p-1 text-white shadow-xl backdrop-blur-md`,children:[(0,A.jsx)(`button`,{type:`button`,"aria-label":s,title:s,disabled:d.scale<=jz,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),m(e=>e-Nz)},children:(0,A.jsx)(vt,{className:`h-4 w-4`,strokeWidth:2})}),(0,A.jsx)(`output`,{"aria-label":y,className:`inline-flex h-9 min-w-16 items-center justify-center px-2 text-xs font-medium tabular-nums`,children:y}),(0,A.jsx)(`button`,{type:`button`,"aria-label":o,title:o,disabled:d.scale>=Mz,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),m(e=>e+Nz)},children:(0,A.jsx)(Ne,{className:`h-4 w-4`,strokeWidth:2})}),(0,A.jsx)(`span`,{"aria-hidden":`true`,className:`mx-0.5 h-5 w-px bg-white/20`}),(0,A.jsx)(`button`,{type:`button`,"aria-label":a,title:a,disabled:d.scale===1&&d.x===0&&d.y===0,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),p()},children:(0,A.jsx)(Ct,{className:`h-4 w-4`,strokeWidth:2})})]})]}),document.body)}var Iz=200,Lz=null;function Rz(){return Lz??=u(()=>import(`./mermaid.core-GWlaVWz1.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),Lz}function zz(){if(typeof document>`u`)return`default`;let e=document.documentElement;return e.getAttribute(`data-theme-appearance`)===`dark`||e.classList.contains(`dark`)?`dark`:`default`}function Bz(){let[e,t]=(0,k.useState)(zz);return(0,k.useEffect)(()=>{let e=document.documentElement,n=new MutationObserver(()=>t(zz()));return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme-appearance`]}),()=>n.disconnect()},[]),e}function Vz({isStreaming:e,source:t,texts:n,showToolbar:r=!0}){let i=(0,k.useId)().replace(/[^a-zA-Z0-9_-]/g,``),a=(0,k.useRef)(0),o=Bz(),s=t.trim(),c=`${o}:${s}`,l=(0,k.useRef)({isFinal:!e,key:c,source:s,theme:o}),u=(0,k.useRef)(null),d=(0,k.useRef)(!1),f=(0,k.useRef)(Date.now()),p=(0,k.useRef)(!0),[m,g]=(0,k.useState)(!1),[_,v]=(0,k.useState)(null),[y,b]=(0,k.useState)(null),x=n.mermaidDiagramLabel??`Mermaid diagram`,S=n.mermaidExpandLabel??`Expand diagram`,C=n.attachmentCloseLabel??`Close preview`,w=n.mermaidLoadingLabel??`Rendering diagram…`,T=n.mermaidRenderErrorLabel??`Diagram could not be rendered`,{copied:E,copy:ee}=lR({text:s}),te=E?n.copiedCodeLabel:n.copyCodeLabel,ne=(0,k.useCallback)(e=>{if(!p.current||d.current)return;if(u.current!==null){if(!e)return;window.clearTimeout(u.current),u.current=null}let t=Date.now()-f.current,n=e?0:Math.max(0,Iz-t);u.current=window.setTimeout(()=>{u.current=null,v(l.current)},n)},[]);(0,k.useEffect)(()=>(p.current=!0,()=>{p.current=!1,u.current!==null&&(window.clearTimeout(u.current),u.current=null)}),[]),(0,k.useEffect)(()=>{l.current={isFinal:!e,key:c,source:s,theme:o},ne(!e)},[e,s,c,ne,o]),(0,k.useEffect)(()=>{if(!_)return;let e=!0;return(async()=>{d.current=!0,f.current=Date.now();try{let t=await Rz();if(!e||!p.current)return;a.current+=1;let n=`nextclaw-mermaid-${i}-${a.current}`;t.initialize({securityLevel:`strict`,startOnLoad:!1,suppressErrorRendering:!0,theme:_.theme});let r=await t.parse(_.source,{suppressErrors:!0});if(!e||!p.current)return;if(!r)throw Error(`Invalid Mermaid diagram`);let{svg:o}=await t.render(n,_.source);e&&p.current&&l.current.theme===_.theme&&b({key:_.key,status:`rendered`,svg:o})}catch{e&&p.current&&_.isFinal&&l.current.key===_.key&&b({key:_.key,status:`error`})}finally{d.current=!1;let t=l.current;e&&p.current&&(t.key!==_.key||t.isFinal!==_.isFinal)&&ne(t.isFinal)}})(),()=>{e=!1}},[i,_,ne]);let D=y?.key===c?y:null;if(D?.status===`error`)return(0,A.jsxs)(`div`,{"data-chat-mermaid-error":`true`,className:`my-3 overflow-hidden rounded-xl border border-border bg-muted/25`,children:[(0,A.jsx)(`div`,{className:`border-b border-border px-3 py-2 text-xs text-muted-foreground`,children:T}),(0,A.jsx)(az,{className:`language-mermaid`,texts:n,children:s})]});let re=y?.status===`rendered`?y:null;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`figure`,{"aria-label":x,"aria-busy":!D,"data-chat-mermaid-diagram":`true`,"data-chat-mermaid-pending":!re||void 0,"data-chat-mermaid-updating":!D||void 0,className:re?`group/mermaid relative my-3 min-h-24 overflow-auto py-2`:`my-3 flex min-h-14 items-center justify-center rounded-xl bg-muted/20 px-3 py-2`,children:re?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,"aria-label":S,title:S,className:`relative block min-w-full cursor-zoom-in border-0 bg-transparent p-0 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>g(!0),children:(0,A.jsx)(`span`,{className:`block min-w-fit [&_svg]:mx-auto [&_svg]:h-auto [&_svg]:max-w-full`,dangerouslySetInnerHTML:{__html:re.svg}})}),r&&(0,A.jsx)(Pz,{actions:[{id:`copy-source`,label:te,icon:E?(0,A.jsx)(h,{className:`h-4 w-4`,strokeWidth:2}):(0,A.jsx)(Ye,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>void ee()},{id:`expand`,label:S,icon:(0,A.jsx)(Qe,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>g(!0)}]})]}):(0,A.jsxs)(`div`,{role:`status`,className:`inline-flex items-center gap-2 text-xs font-medium text-muted-foreground/80`,children:[(0,A.jsx)(ke,{"aria-hidden":`true`,className:`h-3.5 w-3.5 animate-spin motion-reduce:animate-none`}),(0,A.jsx)(`span`,{children:w})]})}),m&&re?(0,A.jsx)(Fz,{closeLabel:C,label:x,onClose:()=>g(!1),zoomInLabel:n.previewZoomInLabel,zoomOutLabel:n.previewZoomOutLabel,resetZoomLabel:n.previewResetZoomLabel,actions:[{id:`copy-source`,label:te,icon:E?(0,A.jsx)(h,{className:`h-4 w-4`,strokeWidth:2}):(0,A.jsx)(Ye,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>void ee()}],children:(0,A.jsx)(`div`,{"data-chat-mermaid-expanded-canvas":`true`,className:`h-full w-full overflow-hidden rounded-xl bg-background p-4 shadow-2xl [&_svg]:mx-auto [&_svg]:!h-full [&_svg]:!w-full [&_svg]:!max-w-none`,dangerouslySetInnerHTML:{__html:re.svg}})}):null]})}function Hz({alt:e,expandLabel:t,closeLabel:n,resetZoomLabel:r,sizeLabel:i,src:a,zoomInLabel:o,zoomOutLabel:s,title:c,fallbackLabel:l,width:u}){let[d,f]=(0,k.useState)(!1),[p,m]=(0,k.useState)(null),h=()=>f(!0);return p===a?(0,A.jsx)(`span`,{className:`chat-image-fallback`,children:e||l||``}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`span`,{"data-chat-message-image-preview":!0,className:`group/image relative block w-fit max-w-[min(100%,32rem)] overflow-hidden rounded-lg`,style:Number(u)>0?{width:Number(u)}:void 0,children:[(0,A.jsx)(`button`,{type:`button`,className:`block w-fit max-w-[min(100%,32rem)] text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,style:Number(u)>0?{width:`100%`}:void 0,onClick:h,onDoubleClick:e=>{e.preventDefault(),h()},"aria-label":t,children:(0,A.jsx)(`img`,{src:a,alt:e,title:c,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>m(a),className:`block h-auto w-auto max-h-[26rem] max-w-full rounded-lg bg-transparent object-contain`,style:Number(u)>0?{width:`100%`}:void 0})}),c&&(0,A.jsx)(`span`,{className:`chat-image-caption`,children:c}),(0,A.jsx)(Pz,{actions:[{id:`expand`,label:t,icon:(0,A.jsx)(Qe,{className:`h-4 w-4`,strokeWidth:2}),onSelect:h}]}),i?(0,A.jsx)(`span`,{className:`pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-start bg-gradient-to-t from-black/50 via-black/15 to-transparent px-2.5 pb-2 pt-8 opacity-0 transition-opacity duration-150 group-hover/image:opacity-100 group-focus-within/image:opacity-100`,children:(0,A.jsx)(`span`,{className:`inline-flex items-center rounded-md bg-black/40 px-1.5 py-0.5 text-[10px] font-medium text-white/95 backdrop-blur-sm`,children:i})}):null]}),d?(0,A.jsx)(Fz,{closeLabel:n,label:e,onClose:()=>f(!1),resetZoomLabel:r,zoomInLabel:o,zoomOutLabel:s,children:(0,A.jsx)(`img`,{src:a,alt:e,className:`max-h-full max-w-full object-contain shadow-2xl`})}):null]})}var Uz=new Set([`nextclaw:`,`http:`,`https:`,`mailto:`,`tel:`]),Wz=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Gz=/^[a-z]:[\\/]/i,Kz=/^\/[a-z]:[\\/]/i,qz=`file:`;function Jz(e){return!e.startsWith(`//`)&&!Wz.test(e)}function Yz(e){let t=Number(e);return Number.isSafeInteger(t)&&t>0?t:void 0}function Xz(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==qz||t.hostname&&t.hostname.toLowerCase()!==`localhost`)return null;let n;try{n=decodeURIComponent(t.pathname)}catch{return null}return Kz.test(n)&&(n=n.slice(1)),n?{path:n,query:t.searchParams,fragment:t.hash.slice(1)}:null}function Zz(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=n.indexOf(`?`),a=i>=0?n.slice(0,i):n,o=i>=0?n.slice(i+1):``,s;try{s=decodeURIComponent(a)}catch{return null}return s?{path:s,query:new URLSearchParams(o),fragment:r}:null}function Qz(e){let t=/^L(\d+)(?:C(\d+))?(?:-L\d+(?:C\d+)?)?$/i.exec(e),n=Yz(t?.[1]);return{line:n,column:n?Yz(t?.[2]):void 0}}function $z(e){if(Gz.test(e)||Jz(e))return e;try{let t=new URL(e);return Uz.has(t.protocol)||t.protocol===qz&&Xz(e)?e:``}catch{return``}}function eB(e){return e&&$z(e)||null}function tB(e){return/^https?:\/\//i.test(e)}function nB(e){let t=e.toLowerCase().startsWith(qz)?Xz(e):Zz(e),n=t?.path;if(!n||n.startsWith(`#`)||n.startsWith(`//`)||!Gz.test(n)&&Wz.test(n))return null;let r=t.query.get(`viewer`),i=Qz(t.fragment),a=/^(.*?)(?::(\d+)(?::(\d+))?)$/.exec(n),o=a?.[1]??n,s=i.line??Yz(a?.[2]),c=i.column??(s?Yz(a?.[3]):void 0);return{path:o,label:o.split(/[\\/]/).filter(Boolean).pop()??o,viewMode:`preview`,...r===`source`||r===`rendered`?{previewViewer:r}:{},...typeof s==`number`?{line:s}:{},...typeof c==`number`?{column:c}:{}}}var rB=`data-chat-inline-token-kind`,iB=`data-chat-inline-token-key`,aB=`data-chat-inline-token-ref`,oB=`data-chat-inline-token-name`,sB=`data-chat-inline-token-source`,cB=`data-chat-inline-token-path`,lB=`data-chat-inline-token-label`,uB=`data-chat-inline-token-raw-text`,dB=`data-chat-inline-token-excerpt`,fB=`data-chat-inline-token-message-id`,pB=`data-chat-inline-token-role`,mB=`data-chat-inline-token-start-line`,hB=`data-chat-inline-token-end-line`;function gB(e){return e.filter(e=>e.rawText).sort((e,t)=>t.rawText.length-e.rawText.length)}function _B(e){let t={[rB]:e.kind,[lB]:e.label,[uB]:e.rawText};return`ref`in e?(t[aB]=e.ref,t[oB]=e.name,e.source&&(t[sB]=e.source),e.path&&(t[cB]=e.path)):(t[iB]=e.key,e.kind===`workspace_excerpt`&&`path`in e?(t[cB]=e.path,t[dB]=e.excerpt,e.startLine!==null&&(t[mB]=String(e.startLine)),e.endLine!==null&&(t[hB]=String(e.endLine))):e.kind===`conversation_excerpt`&&`messageId`in e&&(t[dB]=e.excerpt,t[fB]=e.messageId,t[pB]=e.role)),{type:`chatInlineToken`,data:{hName:`span`,hProperties:t,hChildren:[{type:`text`,value:e.label}]}}}function vB(e,t,n){let r=null;for(let i of n){let n=e.indexOf(i.rawText,t);n<0||(!r||n<r.index||n===r.index&&i.rawText.length>r.token.rawText.length)&&(r={index:n,token:i})}return r}var yB=class{constructor(e){this.tokens=e,this.occurrenceCounts=new Map,this.transform=e=>e.type===`code`||e.type===`inlineCode`||!e.children?e:{...e,children:e.children.flatMap(e=>e.type===`text`&&typeof e.value==`string`?this.splitTextNode(e.value):[this.transform(e)])},this.splitTextNode=e=>{let t=[],n=0;for(;n<e.length;){let r=vB(e,n,this.tokens);if(!r){t.push({type:`text`,value:e.slice(n)});break}r.index>n&&t.push({type:`text`,value:e.slice(n,r.index)});let i=this.tokens.filter(e=>e.rawText===r.token.rawText),a=this.occurrenceCounts.get(r.token.rawText)??0,o=i[Math.min(a,i.length-1)]??r.token;this.occurrenceCounts.set(r.token.rawText,a+1),t.push(_B(o)),n=r.index+r.token.rawText.length}return t.length>0?t:[{type:`text`,value:e}]}}};function bB(e){let t=gB(e);return function(){let e=this.data(),n={text:{36:t.filter(e=>e.rawText.startsWith(`$`)).map(e=>({tokenize:(t,n,r)=>{let i=0;return function a(o){return o===e.rawText.charCodeAt(i)?(i===0&&t.enter(`data`),t.consume(o),i+=1,i===e.rawText.length?(t.exit(`data`),n):a):r(o)}}}))}};return(e.micromarkExtensions??=[]).push(n),e=>t.length>0?new yB(t).transform(e):e}}function xB(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:null}function SB(e){let t=xB(e,sB);return t===`builtin`||t===`global`||t===`project`||t===`workspace`?t:null}function CB(e,t){let n=Number(xB(e,t));return Number.isInteger(n)&&n>0?n:null}function wB(e){let t=xB(e,rB),n=xB(e,lB),r=xB(e,uB);if(t===`skill`&&n&&r){let i=xB(e,aB),a=xB(e,oB);return i&&a?{kind:t,ref:i,name:a,source:SB(e),path:xB(e,cB),label:n,rawText:r}:null}let i=xB(e,iB);if(t===`workspace_excerpt`&&i&&n&&r){let a=xB(e,cB),o=xB(e,dB);return a&&o?{kind:t,key:i,path:a,label:n,excerpt:o,startLine:CB(e,mB),endLine:CB(e,hB),rawText:r}:null}if(t===`conversation_excerpt`&&i&&n&&r){let a=xB(e,dB),o=xB(e,fB),s=xB(e,pB);return a&&o&&(s===`assistant`||s===`user`)?{kind:t,key:i,messageId:o,role:s,label:n,excerpt:a,rawText:r}:null}return t&&i&&n&&r?{kind:t,key:i,label:n,rawText:r}:null}var TB=14e4,EB={"katex-display":{overflowX:`auto`,overflowY:`hidden`,paddingBlock:`0.25em`}};function DB(e){return e.length<=TB?e:`${e.slice(0,TB)}\n\n...`}function OB(e){let t=0;for(let n of e?.children??[]){if(n.type===`text`){let e=n.value??``;if(e.trim().length>0||e.includes(`
169
- `)||e.includes(`\r`))return!1;continue}if(n.tagName!==`img`)return!1;t+=1}return t>=3}var kB=(0,k.createContext)(null),AB=(0,k.createContext)(!1);function jB(){let e=(0,k.useContext)(kB);if(!e)throw Error(`Chat message Markdown renderer requires its runtime context`);return e}var MB={pre:function({node:e,children:t,...n}){let r=e?.children.length===1?e.children[0]:null;return r?.type===`element`&&r.tagName===`code`?(0,A.jsx)(AB.Provider,{value:!0,children:t}):(0,A.jsx)(`pre`,{...n,children:t})},details:function({node:e,children:t,open:n}){let{texts:r}=jB();return(0,A.jsx)(UL,{node:e,open:n,label:r.detailsLabel??`Details`,children:t})},summary:({children:e})=>(0,A.jsx)(A.Fragment,{children:e}),div:function({node:e,children:t,...n}){let{texts:r}=jB(),i=n[`data-frontmatter`],a=n[`data-chat-math-pending`];return typeof i==`string`?(0,A.jsx)(uj,{source:i,label:r.frontmatterLabel??`Document properties`}):a?(0,A.jsx)(`div`,{...n,style:{minHeight:`3em`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:.6},children:t}):(0,A.jsx)(`div`,{...n,children:t})},p:function({node:e,children:t}){let{inline:n}=jB();return n?(0,A.jsx)(A.Fragment,{children:t}):(0,A.jsx)(`p`,{"data-chat-image-row":OB(e)?`three-column`:void 0,children:t})},span:function({node:e,children:t,...n}){let{onInlineTokenClick:r,texts:i}=jB(),a=wB(n);if(a){let e=`excerpt`in a?a:null,t=a.kind===`workspace_excerpt`&&`path`in a?a:null;return(0,A.jsx)(XL,{characterCountLabel:t?i.excerptCharacterCountTemplate?.replace(`{count}`,String(Wh(t.excerpt))):void 0,excerpt:e?.excerpt,kind:a.kind,label:a.label,location:t?.startLine?t.startLine===t.endLine||!t.endLine?`L${t.startLine}`:`L${t.startLine}–${t.endLine}`:void 0,path:t?.path,tooltip:`ref`in a?a.name:a.key,onClick:r&&a.kind!==`conversation_excerpt`?()=>r(a):void 0})}return(0,A.jsx)(`span`,{...n,style:{...n.style,...EB[n.className??``]},children:t})},a:function({node:e,href:t,children:n,...r}){let{onFileOpen:i}=jB(),a=eB(t),o=s_(a),s=a?tB(a):!1,c=s?null:a?nB(a):null,l=e=>{if(!a){e.preventDefault();return}!i||!c||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),i(c))};return(0,A.jsxs)(`a`,{...r,className:j(r.className,!a&&`chat-link-invalid`),href:a??`#`,"aria-disabled":!a||void 0,onClick:l,target:s?`_blank`:void 0,rel:s?`noreferrer noopener`:void 0,children:[o&&(0,A.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex empty:hidden`,style:{marginInlineEnd:`0.25em`,verticalAlign:`-0.1em`},children:o}),n]})},table:function({node:e,children:t,width:n,...r}){let i=Number(n);return(0,A.jsx)(`div`,{className:`chat-table-wrap`,children:(0,A.jsx)(`table`,{...r,style:Number.isFinite(i)&&i>0?{width:i}:void 0,children:t})})},input:function({node:e,type:t,checked:n,...r}){return t===`checkbox`?(0,A.jsx)(`input`,{...r,type:`checkbox`,checked:n,readOnly:!0,disabled:!0,className:`chat-task-checkbox`}):(0,A.jsx)(`input`,{...r,type:t})},img:function({node:e,src:t,alt:n,title:r,width:i}){let{resolveFileContentUrl:a,texts:o}=jB(),s=eB(t);if(!s)return(0,A.jsx)(`span`,{className:`chat-image-fallback`,children:n||o.imageAltLabel||``});let c=nB(s),l=c&&a?a(c):s;return l?(0,A.jsx)(Hz,{alt:n||``,closeLabel:o.attachmentCloseLabel??`Close preview`,expandLabel:o.attachmentExpandLabel??`Expand image`,resetZoomLabel:o.previewResetZoomLabel,sizeLabel:null,src:l,title:r,width:i,fallbackLabel:o.imageAltLabel,zoomInLabel:o.previewZoomInLabel,zoomOutLabel:o.previewZoomOutLabel}):null},code:function({node:e,className:t,children:n,...r}){let{isStreaming:i,renderInlineDisplay:a,renderCodeBlock:o,texts:s}=jB(),c=String(n??``);if(!(0,k.useContext)(AB))return(0,A.jsx)(`code`,{...r,className:j(`chat-inline-code`,t),children:n});let l=Cz(t)?wz(c):null;return l?(0,A.jsx)(Az,{display:l,renderInlineDisplay:a}):o?o({source:c,language:/language-([^\s]+)/.exec(t??``)?.[1]??`text`,isStreaming:i}):t?.split(` `).includes(`language-mermaid`)?(0,A.jsx)(Vz,{isStreaming:i,source:c,texts:s}):(0,A.jsx)(az,{className:t,texts:s,children:n})}};function NB({text:e,role:t,texts:n,inline:r=!1,isStreaming:i=!1,inlineTokens:a,onFileOpen:o,onInlineTokenClick:s,resolveFileContentUrl:c,renderInlineDisplay:l,renderCodeBlock:u,allowHtml:d=!0,urlTransform:f=$z}){let p=t===`user`,m=(0,k.useId)(),h=(0,k.useMemo)(()=>zL(`chat-${m.replace(/[^a-zA-Z0-9_-]/g,``)}-`),[m]),g=DB(e),_=a?.length?[JE,Sj,GL(g),bB(a)]:[JE,Sj,GL(g)];i&&_.push(JL(g)),r||_.unshift(gD,sj,YE);let v=r?`span`:`div`;return(0,A.jsx)(kB.Provider,{value:{inline:r,isStreaming:i,isUser:p,onFileOpen:o,onInlineTokenClick:s,renderInlineDisplay:l,renderCodeBlock:u,resolveFileContentUrl:c,texts:n},children:(0,A.jsx)(v,{"data-stream-phase":i?e.length%3:void 0,className:j(`chat-markdown`,p?`chat-markdown-user`:`chat-markdown-assistant`),children:(0,A.jsx)(HC,{skipHtml:r||!d,remarkRehypeOptions:{footnoteLabel:n.footnoteLabel??`Footnotes`,footnoteBackLabel:n.footnoteBackLabel??`Back to reference`},remarkPlugins:_,rehypePlugins:[...!r&&d?[vL,[LL,BL]]:[],h,[xM,{trust:!1,maxExpand:1e3,...i?{errorColor:`currentColor`}:{}}],...i?[YL]:[]],components:MB,urlTransform:f,children:g})})})}var PB={archive:`bg-muted text-muted-foreground`,audio:`bg-muted text-muted-foreground`,code:`bg-muted text-muted-foreground`,data:`bg-muted text-muted-foreground`,document:`bg-muted text-muted-foreground`,generic:`bg-muted text-muted-foreground`,image:`bg-muted text-muted-foreground`,pdf:`bg-muted text-muted-foreground`,sheet:`bg-muted text-muted-foreground`,video:`bg-muted text-muted-foreground`},FB=new Set([`c`,`cpp`,`css`,`go`,`html`,`java`,`js`,`jsx`,`md`,`php`,`py`,`rb`,`rs`,`sh`,`sql`,`svg`,`ts`,`tsx`]),IB=new Set([`graphql`,`json`,`toml`,`xml`,`yaml`,`yml`]),LB=new Set([`avif`,`bmp`,`gif`,`heic`,`heif`,`ico`,`jpeg`,`jpg`,`png`,`svg`,`tif`,`tiff`,`webp`]),RB=new Set([`aac`,`flac`,`m4a`,`mp3`,`ogg`,`opus`,`wav`,`weba`]),zB=new Set([`avi`,`m4v`,`mov`,`mp4`,`mkv`,`webm`,`wmv`]),BB=new Set([`doc`,`docx`,`odt`,`pages`,`rtf`,`txt`]),VB=new Set([`csv`,`numbers`,`ods`,`tsv`,`xls`,`xlsx`]),HB=new Set([`7z`,`bz2`,`gz`,`rar`,`tar`,`tgz`,`zip`]);function UB(e){if(!Number.isFinite(e)||e==null||e<0)return null;if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;let i=n>=10||r===0?0:1;return`${n.toFixed(i).replace(/\.0$/,``)} ${t[r]}`}function WB(e,t){let n=GB(e);if(n)return n.toUpperCase();let r=(t.split(`/`)[1]??``).split(/[+.;-]/)[0]?.trim();return r?r.slice(0,6).toUpperCase():`FILE`}function GB(e){return/\.([a-z0-9]{1,12})$/i.exec(e.trim())?.[1]?.toLowerCase()??``}function KB(e){return typeof e==`string`&&/^data:image\//i.test(e.trim())}function qB(e){return LB.has(e)?e===`jpg`||e===`jpeg`?`image/jpeg`:e===`svg`?`image/svg+xml`:`image/${e}`:RB.has(e)?e===`mp3`?`audio/mpeg`:e===`m4a`?`audio/mp4`:e===`weba`?`audio/webm`:`audio/${e}`:zB.has(e)?e===`mov`?`video/quicktime`:e===`m4v`?`video/mp4`:`video/${e}`:e===`pdf`?`application/pdf`:null}function JB(e){let t=GB(e);return t?qB(t):null}function YB(e){let t=e.mimeType.trim().toLowerCase();return t.length>0&&t!==`application/octet-stream`?t:JB(e.label)}function XB(e){let t=e.mimeType.trim().toLowerCase(),n=GB(e.label);return e.isImage||t.startsWith(`image/`)||LB.has(n)||KB(e.dataUrl)}function ZB(e,t){let n=GB(e),r=t.toLowerCase();return r.startsWith(`image/`)||LB.has(n)?`image`:r.startsWith(`audio/`)||RB.has(n)?`audio`:r.startsWith(`video/`)||zB.has(n)?`video`:r.includes(`pdf`)||n===`pdf`?`pdf`:HB.has(n)||/(zip|tar|gzip|rar|compressed|archive)/.test(r)?`archive`:VB.has(n)||/(spreadsheet|sheet|excel|csv)/.test(r)?`sheet`:IB.has(n)||/(json|xml|yaml|toml)/.test(r)?`data`:FB.has(n)||/(javascript|typescript|jsx|tsx|css|html)/.test(r)?`code`:BB.has(n)||/(msword|document|opendocument|rtf|text\/)/.test(r)?`document`:`generic`}function QB(e){let t=ZB(e.label,e.mimeType),n=UB(e.sizeBytes);return{category:t,extension:WB(e.label,e.mimeType),sizeLabel:n}}var $B={archive:`Archive`,audio:`Audio`,code:`Code file`,data:`Data file`,document:`Document`,generic:`File`,image:`Image`,pdf:`PDF document`,sheet:`Spreadsheet`,video:`Video`},eV={archive:$e,audio:et,code:tt,data:rt,document:at,generic:st,image:nt,pdf:at,sheet:it,video:ot};function tV(e,t){return t?.attachmentCategoryLabels?.[e]??$B[e]}function nV(e,t,n){return(0,A.jsx)(`div`,{className:j(`mt-0.5 text-[11px] leading-4`,n?`text-foreground/55`:`text-muted-foreground`),children:t?`${e} · ${t}`:e})}function rV(e,t,n){return(0,A.jsx)(`span`,{className:j(`inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-medium`,n?t?`bg-black/5 text-foreground/75`:`bg-muted text-muted-foreground`:t?`bg-black/[0.03] text-foreground/45`:`bg-muted/70 text-muted-foreground/70`),children:e})}function iV(e){let{label:t,href:n,isUser:r,onOpen:i}=e,a=j(`inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors`,r?`bg-black/5 text-foreground/75 hover:bg-black/10 hover:text-foreground`:`bg-muted text-muted-foreground hover:bg-[var(--interaction-hover)] hover:text-foreground`);return i?(0,A.jsx)(`button`,{type:`button`,className:a,onClick:e=>{e.preventDefault(),e.stopPropagation(),i()},children:t}):n?(0,A.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:a,children:t}):rV(t,r,!1)}function aV({category:e,isUser:t}){let n=eV[e];return(0,A.jsx)(`div`,{className:j(`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg`,t?`bg-black/5 text-foreground/70`:PB[e]),children:(0,A.jsx)(n,{className:j(`h-4 w-4`,t?`text-foreground/70`:`text-current`),strokeWidth:2})})}function oV(e){let{category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,action:o}=e;return(0,A.jsxs)(`div`,{className:`flex items-center gap-2.5 px-2.5 py-2`,children:[(0,A.jsx)(aV,{category:t,isUser:a}),(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`div`,{className:`truncate text-[13px] font-medium leading-5`,children:n.label}),nV(r,i,a)]}),o]})})]})}function sV(e){let{category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,shellClasses:o,actionLabel:s,onOpen:c}=e;if(!n.dataUrl||t!==`audio`&&t!==`video`)return null;let l=YB(n);return(0,A.jsxs)(`div`,{className:o,children:[oV({category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,action:iV({label:s,href:n.dataUrl,isUser:a,onOpen:c?()=>c(n):void 0})}),(0,A.jsx)(`div`,{className:`px-2.5 pb-2.5`,children:t===`audio`?(0,A.jsx)(`audio`,{controls:!0,preload:`metadata`,"aria-label":n.label,className:`block w-full`,children:(0,A.jsx)(`source`,{src:n.dataUrl,...l?{type:l}:{}})}):(0,A.jsx)(`div`,{className:j(`overflow-hidden rounded-lg`,a?`bg-black/10`:`bg-muted ring-1 ring-border/70`),children:(0,A.jsx)(`video`,{controls:!0,preload:`metadata`,playsInline:!0,"aria-label":n.label,className:`block max-h-[28rem] w-full bg-black`,children:(0,A.jsx)(`source`,{src:n.dataUrl,...l?{type:l}:{}})})})})]})}function cV({file:e,isUser:t=!1,texts:n,onOpen:r}){let{category:i,sizeLabel:a}=QB(e),o=XB(e)&&!!e.dataUrl,s=i===`audio`&&!!e.dataUrl,c=i===`video`&&!!e.dataUrl,l=!!e.dataUrl,u=l?n?.attachmentOpenLabel??`Open`:n?.attachmentAttachedLabel??`Attached`,d=n?.attachmentExpandLabel??`Expand image`,f=n?.attachmentCloseLabel??`Close preview`,p=tV(i,n),m=j(`block overflow-hidden rounded-xl border transition-colors`,t?`border-black/8 bg-black/[0.03] text-foreground`:`border-border/70 bg-card text-card-foreground`,l&&(t?`hover:bg-black/[0.05]`:`hover:bg-muted/50`));if(o&&e.dataUrl)return(0,A.jsx)(Hz,{alt:e.label,expandLabel:d,closeLabel:f,resetZoomLabel:n?.previewResetZoomLabel,sizeLabel:a,src:e.dataUrl,zoomInLabel:n?.previewZoomInLabel,zoomOutLabel:n?.previewZoomOutLabel});if(s||c)return sV({category:i,file:e,categoryLabel:p,sizeLabel:a,isUser:t,shellClasses:m,actionLabel:u,onOpen:r});let h=oV({category:i,file:e,categoryLabel:p,sizeLabel:a,isUser:t,action:rV(u,t,l)});return!l||!e.dataUrl?(0,A.jsx)(`div`,{className:m,children:h}):r?(0,A.jsx)(`button`,{type:`button`,className:j(m,`group w-full text-left`),onClick:()=>r(e),children:h}):(0,A.jsx)(`a`,{href:e.dataUrl,target:`_blank`,rel:`noreferrer`,className:j(m,`group`),children:h})}function lV({group:e,indexOffset:t,isUser:n,texts:r,onOpen:i}){return(0,A.jsx)(`div`,{"data-chat-message-image-row":`three-column`,"data-chat-message-wide-content":`true`,className:`grid w-full grid-cols-3 items-start gap-3`,children:e.items.map(({index:e,part:a})=>(0,A.jsx)(cV,{file:a.file,isUser:n,texts:r,onOpen:i},`file-${t+e}`))})}function uV(e){return!!(e?.kind===`part`&&e.part.type===`file`&&e.part.file.isImage&&e.part.file.dataUrl)}function dV(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(!uV(r)){r&&t.push(r),n+=1;continue}let i=n,a=[];for(;uV(e[n]);)a.push(e[n]),n+=1;if(a.length<3){t.push(...a);continue}t.push({kind:`image-group`,key:`image-group-${i}`,items:a})}return t}function fV(e){let{isInProgress:t}=e,[n,r]=(0,k.useState)(t),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(t);(0,k.useEffect)(()=>{let e=o.current;!e&&t?(r(!0),a(!1)):e&&!t&&!i&&r(!1),o.current=t},[t,i]);function s(e){e.preventDefault();let i=!n;if(r(i),!i){a(!1);return}t&&a(!0)}return{isOpen:n,onSummaryClick:s}}var pV=10,mV=1500,hV=new Set([`ArrowDown`,`ArrowUp`,`PageDown`,`PageUp`,`Home`,`End`,` `]);function gV(e,t=pV){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function _V(e,t){return t?t.getBoundingClientRect().bottom-e.getBoundingClientRect().top-e.clientTop-e.clientHeight:e.scrollHeight-e.scrollTop-e.clientHeight}function vV(e){return e instanceof KeyboardEvent&&e.key!==`Enter`&&e.key!==` `?!1:!!((e.target instanceof Element?e.target:e.target instanceof Node?e.target.parentElement:null)?.closest(`button, a, input, textarea, select, [role="button"], summary`))?.matches(`[aria-expanded="false"]:not([aria-haspopup]):not(:disabled), details:not([open]) > summary`)}function yV(e,t){let n=e=>{vV(e)&&t()};return e?.addEventListener(`click`,n,!0),e?.addEventListener(`keydown`,n,!0),()=>{e?.removeEventListener(`click`,n,!0),e?.removeEventListener(`keydown`,n,!0)}}function bV(e,t){if(!e)return()=>void 0;let n=e=>{let{target:n}=e;!hV.has(e.key)||n instanceof Element&&n.closest(`input, textarea, select, [contenteditable="true"]`)||t()},r=n=>{n.target===e&&t()};return e.addEventListener(`wheel`,t),e.addEventListener(`touchmove`,t),e.addEventListener(`keydown`,n),e.addEventListener(`pointerdown`,r),()=>{e.removeEventListener(`wheel`,t),e.removeEventListener(`touchmove`,t),e.removeEventListener(`keydown`,n),e.removeEventListener(`pointerdown`,r)}}function xV(e,t,n){if(!e||typeof ResizeObserver>`u`)return()=>void 0;let r=new ResizeObserver(n);return r.observe(e),t&&r.observe(t),()=>r.disconnect()}function SV(e,t,n,r){let i=e.getBoundingClientRect().top,a=n?n.getBoundingClientRect().top-i+e.scrollTop:r,o=t.getBoundingClientRect().top-i+e.scrollTop;return{offset:a,height:a===null?0:Math.max(0,a-o+e.clientHeight-24)}}function CV({contentRef:e,contentVersion:t,hasContent:n,isLoading:r,resetKey:i,scrollRef:a,stickyThresholdPx:o,initialScrollTop:s,turnSpace:c}){let[l,u]=(0,k.useState)(!0),d=(0,k.useRef)(s===void 0),f=(0,k.useRef)(null),p=(0,k.useRef)(!1),m=(0,k.useRef)(null),h=(0,k.useRef)(c?.key),g=(0,k.useRef)(null),_=(0,k.useRef)(null),v=(0,k.useRef)(0),y=(0,k.useRef)(c);(0,k.useLayoutEffect)(()=>{y.current=c});let b=(0,k.useCallback)(()=>{let e=y.current,t=a.current;if(!e?.frameRef.current||!t)return;let n=SV(t,e.frameRef.current,_.current===e.key?e.anchorRef.current:null,g.current);g.current=n.offset,e.frameRef.current.style.minHeight=`${n.height}px`},[a]),x=(0,k.useCallback)(()=>{let t=a.current;t&&u(_V(t,e?.current??void 0)<=(o??pV))},[e,a,o]),S=(0,k.useCallback)(e=>{d.current=e,x()},[x]),C=(0,k.useCallback)(()=>{let e=m.current;e!==null&&(cancelAnimationFrame(e),m.current=null)},[]),w=(0,k.useCallback)((e=`auto`)=>{C(),m.current=requestAnimationFrame(()=>{m.current=null;let t=a.current;t&&(b(),typeof t.scrollTo==`function`?t.scrollTo({top:t.scrollHeight,behavior:e}):t.scrollTop=t.scrollHeight,x())})},[C,a,b,x]),T=(0,k.useCallback)(()=>{v.current=0,S(!0),w()},[w,S]),E=(0,k.useCallback)(()=>{let e=a.current;if(e){if(Date.now()<=v.current){let t=gV(e,o);t||C(),d.current=t}x()}},[C,o,a,x]);return(0,k.useEffect)(()=>bV(a.current,()=>{v.current=Date.now()+mV}),[i,a]),(0,k.useEffect)(()=>yV(a.current,()=>{p.current=!1,v.current=0,C(),S(!1)}),[C,n,i,a,S]),(0,k.useLayoutEffect)(()=>{if(f.current===i)return;let e=f.current===null&&h.current===null;f.current=i,e||(h.current=y.current?.key),_.current=null,v.current=0,g.current=null,b(),S(s===void 0),p.current=s===void 0},[i,s,S,b]),(0,k.useLayoutEffect)(()=>{let e=c?.key;e!==h.current&&(h.current=e,!(!e||r||!d.current)&&(_.current=e,b(),v.current=0,S(!1),w()))},[r,w,c?.key,S,b]),(0,k.useEffect)(()=>C,[C]),(0,k.useEffect)(()=>{if(n)return xV(e?.current??null,a.current,()=>{b(),x(),d.current&&w()})},[e,n,w,i,a,b,x]),(0,k.useLayoutEffect)(()=>{!p.current||r||!n||(p.current=!1,w())},[n,r,w]),(0,k.useLayoutEffect)(()=>{!d.current||!n||w()},[t,n,w]),{isAtBottom:l,onScroll:E,scrollToBottom:T}}var wV=`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-current`,TV=`group/process-row flex w-full min-w-0 items-center gap-1.5 py-0 text-[0.925rem] font-normal leading-[1.72] text-muted-foreground/80`;function EV({children:e,className:t}){return(0,A.jsx)(`span`,{"data-theme-control":`process-icon`,className:j(wV,t),children:e})}function DV({position:e}){return(0,A.jsx)(`span`,{"aria-hidden":`true`,"data-tool-workflow-rail":`true`,className:j(`pointer-events-none absolute left-[0.575em] w-px -translate-x-1/2 bg-border/70`,e===`first`?`bottom-0 top-[0.86em]`:e===`last`?`top-0 h-[0.86em]`:`inset-y-0`)})}function OV({children:e,className:t,interactive:n=!1,onClick:r,role:i,tabIndex:a,onKeyDown:o,"aria-expanded":s}){return(0,A.jsx)(`div`,{"data-chat-process-meta-row":`true`,className:j(TV,n?`cursor-pointer transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`:null,t),onClick:r,role:i,tabIndex:a,onKeyDown:o,"aria-expanded":n?s:void 0,children:e})}function kV({label:e,openGroup:t,open:n=!1,icon:r,className:i,leadingIconClassName:a,labelClassName:o,onClick:s}){return(0,A.jsxs)(`button`,{type:`button`,"data-chat-process-meta-row":`true`,className:j(TV,`m-0 w-full border-0 bg-transparent p-0 text-left shadow-none transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,i),"aria-expanded":n,onClick:s,children:[r?(0,A.jsx)(EV,{className:j(`relative z-[1] rounded-sm`,a),children:(0,A.jsx)(r,{className:`h-[1.05em] w-[1.05em]`,strokeWidth:2.25})}):null,(0,A.jsx)(`span`,{className:j(`min-w-0 shrink truncate`,o),children:e}),(0,A.jsx)(`span`,{className:j(`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-muted-foreground/80 transition-opacity`,n?`opacity-100`:`opacity-0 group-hover/process-row:opacity-100 focus-visible:opacity-100`),children:(0,A.jsx)(We,{className:j(`h-[1.05em] w-[1.05em] transition-transform duration-200 motion-reduce:transition-none`,n&&`rotate-90`),strokeWidth:2.25})})]})}function AV(e,t,n){let r=Array.from(t).length;return(n??`${e} · {count}`).split(`{count}`).join(String(r))}function jV({label:e,text:t,characterCountTemplates:n,isUser:r,isInProgress:i}){let{isOpen:a,onSummaryClick:o}=fV({isInProgress:i}),s=(0,k.useRef)(null),c=AV(e,t,i?n?.inProgress:n?.completed),{onScroll:l}=CV({scrollRef:s,resetKey:`reasoning`,isLoading:!1,hasContent:t.length>0,contentVersion:t,stickyThresholdPx:20});return(0,A.jsxs)(`div`,{className:`group/reasoning`,children:[(0,A.jsx)(kV,{openGroup:`reasoning`,open:a,icon:Ve,leadingIconClassName:r?`bg-primary`:`bg-card`,label:c,labelClassName:r?`text-primary-100`:void 0,onClick:o}),(0,A.jsx)(lj,{open:a,children:()=>(0,A.jsx)(`div`,{ref:s,onScroll:l,"data-reasoning-scroll":`true`,className:j(`mt-1 w-fit max-w-[500px] max-h-56 overflow-y-auto rounded-lg custom-scrollbar`,r?`bg-primary/70`:`bg-muted`),children:(0,A.jsx)(`pre`,{className:`min-w-0 whitespace-pre-wrap break-all p-2 text-[11px]`,children:t})})})]})}function MV({children:e,className:t}){return(0,A.jsx)(`div`,{className:j(`relative my-0 flex w-full min-w-0 max-w-full flex-col text-[0.925rem] leading-[1.72] text-muted-foreground`,t),children:e})}function NV({children:e,className:t}){return(0,A.jsx)(`div`,{className:j(`mt-0.5 w-full max-w-full min-w-0 overflow-hidden pl-[calc(1.15em+0.375rem)] text-[0.925rem] leading-[1.72] text-muted-foreground`,t),children:e})}function PV({label:e,tone:t,children:n}){let r={input:{dot:`bg-muted-foreground/60`,body:`text-foreground`},output:{dot:`bg-primary/70`,body:`text-foreground`},error:{dot:`bg-rose-500/80`,body:`text-rose-950/85`}}[t];return(0,A.jsxs)(`section`,{className:`overflow-hidden rounded-md border border-border/70 bg-muted/20`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/60 px-2.5 py-1.5 text-[10px] font-medium tracking-wide text-muted-foreground`,children:[(0,A.jsx)(`span`,{className:j(`h-1.5 w-1.5 rounded-full`,r.dot)}),(0,A.jsx)(`span`,{className:`normal-case tracking-normal`,children:e})]}),(0,A.jsx)(`div`,{className:`w-full overflow-hidden`,children:(0,A.jsx)(`pre`,{className:j(`w-full max-w-full min-w-0 max-h-64 overflow-x-auto overflow-y-auto px-2.5 py-2 font-mono text-[12px] leading-relaxed whitespace-pre custom-scrollbar`,r.body),children:n})})]})}var FV={running:{text:`text-muted-foreground`,icon:ke,spin:!0},success:{text:`text-muted-foreground/75`,icon:h,spin:!1},error:{text:`text-destructive`,icon:kt,spin:!1},cancelled:{text:`text-muted-foreground/70`,icon:vt,spin:!1}};function IV({card:e,iconOnly:t=!1}){let n=FV[e.statusTone]||FV.cancelled,r=n.icon,i=!t&&(e.statusTone===`running`||e.statusTone===`error`);return(0,A.jsxs)(`span`,{className:j(`inline-flex shrink-0 items-center gap-1 text-[0.925rem] font-normal leading-[1.72]`,n.text),"aria-label":t?e.statusLabel:void 0,children:[(0,A.jsx)(r,{"aria-hidden":`true`,className:j(`h-[1.05em] w-[1.05em]`,n.spin&&`animate-spin`),strokeWidth:2.25}),i?e.statusLabel:null]})}function LV(e){return e.kind===`show-content`?{icon:Ee,label:e.label,toneClassName:`border-border/70 bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:ring-primary/35`}:{icon:Ie,label:e.label??(e.sessionKind===`child`?`Open child session`:`Open session`),toneClassName:`border-border/70 bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:ring-primary/35`}}function RV({action:e,onAction:t}){let{Tooltip:n,TooltipContent:r,TooltipProvider:i,TooltipTrigger:a}=Ki,o=LV(e),s=o.icon;return(0,A.jsx)(i,{delayDuration:250,children:(0,A.jsxs)(n,{children:[(0,A.jsx)(a,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),t(e)},className:j(`inline-flex h-6 w-6 items-center justify-center rounded-md border transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1`,o.toneClassName),"aria-label":o.label,title:o.label,children:(0,A.jsx)(s,{className:`h-3.5 w-3.5`,strokeWidth:2.25})})}),(0,A.jsx)(r,{side:`top`,className:`text-xs`,children:o.label})]})})}function zV(e){return e.replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim()}function BV(e,t){e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t())}function VV({label:e,summary:t}){return(0,A.jsxs)(`span`,{className:`min-w-0 shrink truncate`,children:[e,t?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`mx-1.5 select-none text-muted-foreground/45`,children:`·`}),(0,A.jsx)(`span`,{title:t,children:t})]}):null]})}function HV({expanded:e}){return(0,A.jsx)(`span`,{className:j(`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-muted-foreground/80 transition-opacity`,e?`opacity-100`:`opacity-0 group-hover/process-row:opacity-100 group-focus-within/process-row:opacity-100`),children:(0,A.jsx)(We,{className:j(`h-[1.05em] w-[1.05em] transition-transform duration-200 motion-reduce:transition-none`,e&&`rotate-90`),strokeWidth:2.25})})}function UV({additions:e,deletions:t}){if(e===0&&t===0)return null;let n=[e>0?`+${e}`:null,t>0?`-${t}`:null].filter(Boolean).join(` `);return(0,A.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1.5 tabular-nums text-muted-foreground/75`,"aria-label":n,children:[e>0?(0,A.jsxs)(`span`,{className:`transition-colors group-hover/process-row:text-emerald-600`,children:[`+`,e]}):null,t>0?(0,A.jsxs)(`span`,{className:`transition-colors group-hover/process-row:text-rose-600`,children:[`-`,t]}):null]})}function WV({card:e,toolLabel:t,changeSummary:n,icon:r,expanded:i,canExpand:a,hideSummary:o=!1,trailingMeta:s,actionSlot:c,onToggle:l}){let u=o?``:e.summary?.replace(/^(command|path|args|query|input):\s*/i,``)??``,d=t??zV(e.toolName);return(0,A.jsxs)(OV,{interactive:a,onClick:a?()=>l():void 0,role:a?`button`:void 0,"aria-expanded":i,tabIndex:a?0:void 0,onKeyDown:a?e=>BV(e,l):void 0,children:[(0,A.jsx)(EV,{className:`relative z-[1] rounded-sm bg-card`,children:(0,A.jsx)(r,{className:`h-[1.05em] w-[1.05em]`,strokeWidth:2.25})}),(0,A.jsx)(VV,{label:d,summary:u}),n?(0,A.jsx)(UV,{...n}):null,(0,A.jsx)(IV,{card:e,iconOnly:!!t}),s,a?(0,A.jsx)(HV,{expanded:i}):null,c?(0,A.jsx)(`span`,{className:`inline-flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover/process-row:opacity-100 group-focus-within/process-row:opacity-100`,children:c}):null]})}function GV({action:e,onAction:t}){return(0,A.jsx)(RV,{action:e,onAction:t})}var KV=`font-mono text-[11px] leading-5`,qV=`flex h-5 w-full ${KV}`,JV=`flex h-5 items-center justify-center px-2.5 tabular-nums select-none`;function YV(e){return String(e.newLineNumber??e.oldLineNumber??``)}function XV(e,t){return typeof t==`number`&&(e.newLineNumber??e.oldLineNumber)===t}function ZV(e,t,n){return`${e}-${n}-${t.oldLineNumber??`x`}-${t.newLineNumber??`x`}`}function QV(e){return typeof e.newLineNumber==`number`||typeof e.oldLineNumber==`number`}function $V(e){return e.lines.some(QV)}function eH(e){let t=e.lines.reduce((e,t)=>QV(t)?Math.max(e,YV(t).length):e,0);return`${Math.max(6,Math.min(7.5,t+3))}ch`}function tH(e){return`calc(${e.lines.reduce((e,t)=>Math.max(e,Math.max(1,t.text.length)),1)}ch + 1.25rem)`}function nH(e){let t=e.split(/[\\/]/).filter(Boolean).pop()??e,n=t.split(/[?#]/)[0]??t,r=n.lastIndexOf(`.`);return r<=0||r===n.length-1?null:n.slice(r+1).toLowerCase()}function rH(e){return e.languageHint?.trim()||nH(e.path)||`text`}function iH(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,`-`);return t?`language-${t}`:`language-text`}function aH(e){return e.kind===`remove`?`border-r border-rose-200 bg-rose-50 text-rose-700`:e.kind===`add`?`border-r border-emerald-200 bg-emerald-50 text-emerald-700`:`border-r border-border bg-muted text-muted-foreground`}function oH(e){return e.kind===`remove`?`bg-rose-50 text-rose-950`:e.kind===`add`?`bg-emerald-50 text-emerald-950`:`bg-card text-foreground`}function sH({layout:e,line:t,lineNumberColumnWidth:n,target:r,targetRef:i}){return(0,A.jsx)(`span`,{ref:i,"data-file-line-number-cell":`true`,style:e===`compact`?{width:n,minWidth:n}:void 0,className:j(JV,e===`compact`?`sticky left-0 z-[1]`:`w-full shrink-0`,aH(t),r?`bg-gray-200 font-medium text-gray-950`:null),children:YV(t)})}function cH({language:e,line:t,target:n,targetColumn:r,targetRef:i}){let a=(0,k.useMemo)(()=>ez.highlight(t.text||` `,e),[e,t.text]),o=typeof r==`number`&&Number.isSafeInteger(r)&&r>0?Math.min(r,t.text.length+1):null;return(0,A.jsxs)(`span`,{ref:o?void 0:i,"data-file-code-row":`true`,"data-file-code-language":a.language,"data-highlighted":a.highlighted?`true`:`false`,"data-file-target-column":o??void 0,className:j(`chat-file-code-syntax hljs relative block min-w-0 flex-1 whitespace-pre px-2.5`,iH(a.language),oH(t),n?`bg-gray-100/90`:null),children:[(0,A.jsx)(`span`,{dangerouslySetInnerHTML:{__html:a.html}}),o?(0,A.jsx)(`span`,{ref:i,"aria-hidden":`true`,"data-file-target-caret":`true`,className:`pointer-events-none absolute inset-y-0 w-px bg-primary`,style:{left:`calc(0.625rem + ${o-1}ch)`}}):null]})}function lH({language:e,line:t,showLineNumbers:n,lineNumberColumnWidth:r}){return(0,A.jsxs)(`div`,{"data-file-line-row":`true`,className:qV,children:[n?(0,A.jsx)(sH,{layout:`compact`,line:t,lineNumberColumnWidth:r}):null,(0,A.jsx)(cH,{language:e,line:t})]})}function uH({block:e,targetColumn:t,targetLine:n}){let r=$V(e),i=eH(e),a=tH(e),o=rH(e),s=(0,k.useRef)(null);return(0,k.useLayoutEffect)(()=>{s.current?.scrollIntoView({block:`center`,inline:t?`center`:`nearest`})},[e,t,n]),(0,A.jsxs)(`div`,{"data-file-code-surface":`true`,"data-file-code-surface-layout":`workspace`,className:`flex h-full min-h-full min-w-full bg-card`,children:[r?(0,A.jsxs)(`div`,{"data-file-code-gutter":`true`,style:{width:i,minWidth:i},className:j(`flex h-full min-h-full shrink-0 flex-col`,KV),children:[e.lines.map((e,r)=>(0,A.jsx)(sH,{layout:`workspace`,line:e,lineNumberColumnWidth:i,target:XV(e,n),targetRef:!t&&XV(e,n)?s:void 0},ZV(`gutter`,e,r))),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 border-r border-border bg-muted`})]}):null,(0,A.jsxs)(`div`,{"data-file-code-canvas":`true`,className:`flex h-full min-h-full min-w-0 flex-1 flex-col bg-card`,children:[(0,A.jsx)(`div`,{"data-file-code-stack":`true`,className:`min-w-full`,style:{minWidth:a},children:e.lines.map((e,i)=>{let a=XV(e,n);return(0,A.jsx)(`div`,{"data-file-code-canvas-row":`true`,"data-file-target-line":a?`true`:void 0,"aria-current":a?`location`:void 0,className:qV,children:(0,A.jsx)(cH,{language:o,line:e,target:a,targetColumn:a?t:null,targetRef:a&&(t||!r)?s:void 0})},ZV(`code`,e,i))})}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 bg-card`})]})]})}function dH({block:e,layout:t=`compact`,targetColumn:n,targetLine:r}){if(t===`workspace`)return(0,A.jsx)(uH,{block:e,targetColumn:n,targetLine:r});let i=$V(e),a=eH(e),o=tH(e),s=i?`calc(${a} + ${o})`:o,c=rH(e);return(0,A.jsx)(`div`,{"data-file-code-surface":`true`,"data-file-code-surface-layout":`compact`,className:`overflow-x-auto custom-scrollbar bg-card`,children:(0,A.jsx)(`div`,{"data-file-code-stack":`true`,className:`min-w-full`,style:{minWidth:s},children:e.lines.map((e,t)=>(0,A.jsx)(lH,{language:c,line:e,showLineNumbers:i,lineNumberColumnWidth:a},ZV(`row`,e,t)))})})}function fH({block:e}){return(0,A.jsx)(dH,{block:e,layout:`compact`})}function pH(e){return e.display===`preview`}function mH(e){return e.rawText?e.rawText:e.lines.map(e=>[e.kind,e.oldLineNumber??``,e.newLineNumber??``,e.text].join(`:`)).join(`
170
- `)}function hH(e){return/^\+\d+$/.test(e)?`text-emerald-700`:/^-\d+$/.test(e)?`text-rose-700`:`text-muted-foreground`}function gH(e){let t=e.split(`·`).map(e=>e.trim()).filter(e=>/^\+\d+$/.test(e)||/^-\d+$/.test(e));return t.length===0?null:(0,A.jsx)(`div`,{className:`flex shrink-0 items-center gap-x-1 whitespace-nowrap text-[10px] font-medium uppercase tracking-[0.08em]`,children:t.map((e,t)=>(0,A.jsxs)(k.Fragment,{children:[t>0?(0,A.jsx)(`span`,{className:`text-muted-foreground/45`,children:`·`}):null,(0,A.jsx)(`span`,{className:j(hH(e)),children:e})]},`${e}-${t}`))})}function _H(e){return{path:e.path,label:e.path.split(`/`).filter(Boolean).pop()??e.path,viewMode:e.display===`diff`?`diff`:`preview`,...e.rawText?{rawText:e.rawText}:{},...e.beforeText?{beforeText:e.beforeText}:{},...e.afterText?{afterText:e.afterText}:{},...e.patchText?{patchText:e.patchText}:{},...typeof e.oldStartLine==`number`?{oldStartLine:e.oldStartLine}:{},...typeof e.newStartLine==`number`?{newStartLine:e.newStartLine}:{},fullLines:e.fullLines??e.lines}}function vH({children:e,contentVersion:t,resetKey:n,className:r,scrollKind:i}){let a=(0,k.useRef)(null),{onScroll:o}=CV({scrollRef:a,resetKey:n,isLoading:!1,hasContent:!0,contentVersion:t,stickyThresholdPx:20});return(0,A.jsx)(`div`,{ref:a,onScroll:o,"data-file-scroll-kind":i,className:j(`overflow-y-auto bg-card custom-scrollbar`,r),children:e})}function yH({block:e,showPathRow:t,isFirst:n,onFileOpen:r}){let{Tooltip:i,TooltipContent:a,TooltipProvider:o,TooltipTrigger:s}=Ki,c=pH(e),l=t||!!e.caption;return(0,A.jsxs)(`section`,{className:j(`overflow-hidden bg-card`,!n&&`border-t border-border`),children:[l?(0,A.jsxs)(`div`,{className:j(`flex min-h-9 items-center justify-between gap-4 border-b border-border px-3 text-muted-foreground`,t?`py-2`:`py-1.5`),children:[(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:t?(0,A.jsx)(o,{delayDuration:250,children:(0,A.jsxs)(i,{children:[(0,A.jsx)(s,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:()=>{r&&r(_H(e))},className:j(`w-full truncate whitespace-nowrap text-left font-mono text-[12px] font-medium leading-5 text-foreground`,r&&`transition-colors hover:text-primary hover:underline`),title:e.path,children:e.path})}),(0,A.jsx)(a,{side:`top`,className:`max-w-[420px] text-xs font-mono break-all`,children:e.path})]})}):null}),e.caption?gH(e.caption):null]}):null,e.lines.length>0?(0,A.jsx)(vH,{resetKey:`block:${e.key}`,contentVersion:mH(e),className:`max-h-72`,scrollKind:`block`,children:(0,A.jsx)(fH,{block:e})}):e.rawText?(0,A.jsx)(vH,{resetKey:`raw:${e.key}`,contentVersion:e.rawText,className:`max-h-72`,scrollKind:`raw`,children:(0,A.jsx)(`div`,{className:`overflow-x-auto custom-scrollbar`,children:(0,A.jsx)(`pre`,{className:`min-w-max whitespace-pre bg-card px-3 py-2 font-mono text-[11px] leading-5 text-foreground`,children:e.rawText})})}):null,e.truncated&&!c?(0,A.jsx)(`div`,{className:`border-t border-border bg-muted px-3 py-2 text-[10px] text-muted-foreground`,children:`Showing a shortened diff preview.`}):null]})}function bH({card:e,className:t,onFileOpen:n,showPathRow:r=!0}){let i=e.fileOperation?.blocks??[],a=e.output?.trim()??``;return i.length===0&&!a?null:(0,A.jsxs)(`div`,{className:j(`overflow-hidden rounded-md border border-border/70 bg-card`,t),children:[i.map((e,t)=>(0,A.jsx)(yH,{block:e,showPathRow:r,isFirst:t===0,onFileOpen:n},e.key)),a?(0,A.jsx)(vH,{resetKey:`output:${e.toolName}:${e.summary??`none`}`,contentVersion:a,className:j(`max-h-56`,i.length>0&&`border-t border-border`),scrollKind:`output`,children:(0,A.jsx)(`div`,{className:`overflow-x-auto custom-scrollbar`,children:(0,A.jsx)(`pre`,{className:`min-w-max whitespace-pre bg-card px-3 py-2 font-mono text-[11px] leading-5 text-foreground`,children:a})})}):null]})}function xH(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function SH(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:null}function CH(e){let t=SH(e?.durationMs);if(t!=null)return t;let n=xH(e?.startedAt),r=xH(e?.endedAt);return n!=null&&r!=null&&r>=n?r-n:null}function wH(e){let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${String(r).padStart(2,`0`)}m ${String(i).padStart(2,`0`)}s`:r>0?`${r}m ${String(i).padStart(2,`0`)}s`:`${i}s`}function TH(e){return!Number.isFinite(e)||e<0?null:wH(e)}function EH(e){return!Number.isFinite(e)||e<0?null:e<1e3?`${Math.round(e)}ms`:e<6e4?`${Number((e/1e3).toFixed(2))}s`:wH(e)}function DH(){return globalThis.performance?.now()??Date.now()}function OH(e){return Math.max(0,e.baselineMs+DH()-e.monotonicStartedAt)}function kH(e,t){let n=xH(e?.startedAt),r=SH(e?.durationMs)!=null||e?.endedAt!=null,i=t&&n!=null&&!r,[a,o]=(0,k.useState)(null);return(0,k.useEffect)(()=>{if(!i||n==null||!e?.startedAt){o(null);return}let t={key:e.startedAt,baselineMs:Math.max(0,Date.now()-n),monotonicStartedAt:DH()};o({key:t.key,elapsedMs:OH(t)});let r,a=()=>{if(document.visibilityState===`hidden`)return;let e=OH(t),n=Math.max(50,1e3-e%1e3);r=setTimeout(()=>{o({key:t.key,elapsedMs:OH(t)}),a()},n)},s=()=>{r&&clearTimeout(r),r=void 0,document.visibilityState!==`hidden`&&(o({key:t.key,elapsedMs:OH(t)}),a())};return document.addEventListener(`visibilitychange`,s),a(),()=>{r&&clearTimeout(r),document.removeEventListener(`visibilitychange`,s)}},[i,e?.startedAt,n]),!i||!e?.startedAt?null:a?.key===e.startedAt?a.elapsedMs:null}function AH({execution:e,statusTone:t}){let n=CH(e),r=kH(e,t===`running`&&n==null),i=n==null?r==null?null:TH(r):EH(n);return i?(0,A.jsx)(`span`,{className:`inline-flex shrink-0 tabular-nums text-muted-foreground/75`,children:i}):null}var jH=`\x1B`,MH=RegExp(`${jH}\\[(.*?)([ -/]*[@-~])`,`g`);function NH(e){return e.includes(`${jH}[`)}function PH(e){return e.replace(RegExp(`${jH}\\[[0-?]*[ -/]*[@-~]`,`g`),``)}function FH(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}var IH={bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1},LH={1:{bold:!0},2:{dim:!0},3:{italic:!0},4:{underline:!0},7:{inverse:!0},22:{bold:!1,dim:!1},23:{italic:!1},24:{underline:!1},27:{inverse:!1},39:{fg:void 0},49:{bg:void 0}},RH={30:`black`,31:`red`,32:`green`,33:`yellow`,34:`blue`,35:`magenta`,36:`cyan`,37:`white`,90:`bright-black`,91:`bright-red`,92:`bright-green`,93:`bright-yellow`,94:`bright-blue`,95:`bright-magenta`,96:`bright-cyan`,97:`bright-white`},zH={40:`black`,41:`red`,42:`green`,43:`yellow`,44:`blue`,45:`magenta`,46:`cyan`,47:`white`,100:`bright-black`,101:`bright-red`,102:`bright-green`,103:`bright-yellow`,104:`bright-blue`,105:`bright-magenta`,106:`bright-cyan`,107:`bright-white`};function BH(e,t){let n=e[t+1];return n===5&&typeof e[t+2]==`number`?{color:`ansi-256-${e[t+2]}`,consumed:2}:n===2&&typeof e[t+2]==`number`&&typeof e[t+3]==`number`&&typeof e[t+4]==`number`?{color:`rgb(${e[t+2]},${e[t+3]},${e[t+4]})`,consumed:4}:null}function VH(e,t){let n={...e};for(let e=0;e<t.length;e+=1){let r=t[e];if(r===0)return{...IH};let i=LH[r];if(i){n={...n,...i};continue}if(r===38||r===48){let i=BH(t,e);i&&(n=r===38?{...n,fg:i.color}:{...n,bg:i.color},e+=i.consumed);continue}if(RH[r]){n={...n,fg:RH[r]};continue}zH[r]&&(n={...n,bg:zH[r]})}return n}function HH(e){let t=[`ansi`];return e.bold&&t.push(`ansi-bold`),e.dim&&t.push(`ansi-dim`),e.italic&&t.push(`ansi-italic`),e.underline&&t.push(`ansi-underline`),e.inverse&&t.push(`ansi-inverse`),e.fg&&(e.fg.startsWith(`rgb(`)?t.push(`ansi-fg-custom`):e.fg.startsWith(`ansi-256-`)?(t.push(`ansi-fg-256`),t.push(e.fg)):t.push(`ansi-fg-${e.fg}`)),e.bg&&(e.bg.startsWith(`rgb(`)?t.push(`ansi-bg-custom`):e.bg.startsWith(`ansi-256-`)?(t.push(`ansi-bg-256`),t.push(e.bg)):t.push(`ansi-bg-${e.bg}`)),t.join(` `)}function UH(e){let t=[];return e.fg?.startsWith(`rgb(`)&&t.push(`color:${e.fg}`),e.bg?.startsWith(`rgb(`)&&t.push(`background-color:${e.bg}`),t.length>0?t.join(`;`):void 0}function WH(e){let t=HH(e),n=UH(e);return n?`<span class="${t}" style="${n}">`:`<span class="${t}">`}function GH(e){if(!e)return``;if(!NH(e))return FH(e);let t=``,n=0,r={...IH},i=!1,a=e=>{e&&(i||=(t+=WH(r),!0),t+=FH(e))},o=()=>{i&&=(t+=`</span>`,!1)};return e.replace(MH,(t,i,s,c)=>{if(a(e.slice(n,c)),n=c+t.length,s!==`m`)return t;let l=i.trim().length===0?[0]:i.split(`;`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e));return o(),r=VH(r,l.length>0?l:[0]),t}),a(e.slice(n)),o(),t}var KH=12e4;function qH(e){return e.length<=KH?e:`${e.slice(0,KH)}\n…`}function JH({code:e,language:t,preferAnsi:n=!1,className:r}){let i=qH(e),a=(0,k.useMemo)(()=>{if(n&&NH(i))return{html:GH(i),language:`ansi`,highlighted:!0};let e=PH(i);return ez.highlight(e,t)},[t,n,i]);return(0,A.jsx)(`code`,{className:j(`hljs chat-terminal-code`,`language-${a.language}`,r),"data-highlighted":a.highlighted?`true`:`false`,dangerouslySetInnerHTML:{__html:a.html}})}function YH({command:e,output:t,emptyLabel:n,isRunning:r,hasOutput:i,isError:a=!1}){return(0,A.jsx)(`div`,{className:j(`chat-terminal-surface`,a?`chat-terminal-surface-error`:void 0),"data-testid":`chat-terminal-surface`,children:(0,A.jsxs)(`div`,{className:`chat-terminal-body custom-scrollbar`,children:[(0,A.jsxs)(`div`,{className:`chat-terminal-line chat-terminal-line-command`,children:[(0,A.jsx)(`span`,{className:`chat-terminal-gutter`,"aria-hidden":`true`,children:`$`}),(0,A.jsx)(`div`,{className:`chat-terminal-line-content`,children:e?(0,A.jsxs)(`pre`,{className:`chat-terminal-pre`,children:[(0,A.jsx)(JH,{code:e,language:`bash`}),r&&!i?(0,A.jsx)(`span`,{className:`chat-terminal-caret`,"aria-hidden":`true`}):null]}):(0,A.jsx)(`div`,{className:`chat-terminal-skeleton`})})]}),(i||!r)&&(0,A.jsx)(`div`,{className:`chat-terminal-output-block`,children:i?(0,A.jsxs)(`pre`,{className:j(`chat-terminal-pre chat-terminal-output`,a?`chat-terminal-pre-error`:void 0),children:[(0,A.jsx)(JH,{code:t,language:a?`text`:`shell`,preferAnsi:!0,className:a?`chat-terminal-code-error`:void 0}),r?(0,A.jsx)(`span`,{className:`chat-terminal-caret`,"aria-hidden":`true`}):null]}):(0,A.jsx)(`div`,{className:`chat-terminal-empty`,children:n})})]})})}var XH=200;function ZH(e){return typeof e==`string`&&e.length>0?e:null}function QH(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $H(e,t){if(e?.trim())return e.trim();if(t==null)return``;if(typeof t==`string`)return t.trim();if(typeof t==`number`||typeof t==`boolean`)return String(t);try{return JSON.stringify(t,null,2)}catch{return String(t)}}function eU(e){return`command`in e||`workingDir`in e||`exitCode`in e||`durationMs`in e||`stdout`in e||`stderr`in e||`aggregated_output`in e||`combinedOutput`in e}function tU(e){let t=ZH(e.aggregated_output)??ZH(e.combinedOutput)??ZH(e.output);if(t)return t;let n=ZH(e.stdout),r=ZH(e.stderr);return!n&&!r?null:[n,r].filter(e=>!!e).join(`
171
- `)}function nU(e,t){if(QH(t)){let e=tU(t);if(e)return e;if(eU(t))return``}if(!e)return``;let n=e.trim();if(!n.startsWith(`{`))return e;try{let t=JSON.parse(n);return QH(t)?tU(t)||(eU(t)?``:e):e}catch{return e}}function rU(e){return e===`write_file`||e===`edit_file`}function iU(e){return e.reduce((e,t)=>({additions:e.additions+t.lines.filter(e=>e.kind===`add`).length,deletions:e.deletions+t.lines.filter(e=>e.kind===`remove`).length}),{additions:0,deletions:0})}function aU({canExpand:e,isRunning:t,autoExpandWhileRunning:n=!0}){let[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(!1),[s,c]=(0,k.useState)(t),l=(0,k.useRef)(null),u=(0,k.useRef)(t),d=(0,k.useRef)(!0);return s!==t&&(c(t),!t&&!a&&i(!1)),(0,k.useEffect)(()=>()=>{l.current!==null&&window.clearTimeout(l.current)},[]),(0,k.useEffect)(()=>{n&&t&&e&&!a&&!r&&(d.current||!u.current)&&(l.current=window.setTimeout(()=>{i(!0),l.current=null},XH)),t||l.current!==null&&(window.clearTimeout(l.current),l.current=null),u.current=t,d.current=!1},[n,e,r,a,t]),{expanded:r,onToggle:()=>{e&&(l.current!==null&&(window.clearTimeout(l.current),l.current=null),i(e=>!e),o(!0))}}}function oU(e){return QH(e)?{exitCode:typeof e.exitCode==`number`?e.exitCode:typeof e.exit_code==`number`?e.exit_code:null,workingDir:ZH(e.workingDir)??ZH(e.cwd)??ZH(e.working_directory)}:{}}function sU({card:e,toolLabel:t}){let n=e.statusTone===`running`,r=e.summary?.replace(/^(command|path|args|query|input):\s*/i,``),i=oU(e.outputData),a=QH(e.outputData)&&eU(e.outputData),o=nU(e.output,e.outputData)||(a?``:$H(void 0,e.outputData)),s=!!o,c=n||s||a||!!r?.trim(),{expanded:l,onToggle:u}=aU({canExpand:c,isRunning:n,autoExpandWhileRunning:!1});return(0,A.jsxs)(MV,{children:[(0,A.jsx)(WV,{card:e,toolLabel:t,icon:Dt,expanded:l,canExpand:c,trailingMeta:(0,A.jsx)(AH,{execution:e.execution,statusTone:e.statusTone}),onToggle:u}),(0,A.jsx)(lj,{open:l,children:()=>(0,A.jsx)(NV,{className:`bg-transparent py-0`,children:(0,A.jsx)(YH,{command:r,output:o,emptyLabel:e.emptyLabel,isRunning:n,hasOutput:s,isError:e.statusTone===`error`,exitCode:i.exitCode,workingDir:i.workingDir})})})]})}function cU(e,t){return!!e?.trim()||t!=null}function lU(e){return{previewLineCount:e.reduce((e,t)=>e+t.lines.length,0),previewCharCount:e.reduce((e,t)=>e+(t.rawText?.length??t.lines.reduce((e,t)=>e+t.text.length+1,0)),0)}}function uU(e){return[`edit_file`,`write_file`,`apply_patch`,`file_change`].includes(e)}function dU(e){let{card:t,previewCharCount:n,previewLineCount:r}=e;return rU(t.toolName)?!(t.statusTone===`running`&&t.toolName===`write_file`&&(r>24||n>1200)):!1}function fU({card:e,toolLabel:t,onFileOpen:n}){let r=e.statusTone===`running`,i=!!e.fileOperation?.blocks.length,a=cU(e.input,e.inputData),o=cU(e.output,e.outputData),s=a&&!i,c=i||a||o,l=e.fileOperation?.blocks??[],{previewCharCount:u,previewLineCount:d}=lU(l),f=dU({card:e,previewCharCount:u,previewLineCount:d}),{expanded:p,onToggle:m}=aU({canExpand:c||r,isRunning:r,autoExpandWhileRunning:f}),h=uU(e.toolName);return(0,A.jsxs)(MV,{children:[(0,A.jsx)(WV,{card:e,toolLabel:t,changeSummary:h?iU(l):void 0,icon:h?qe:at,expanded:p,canExpand:c||r,hideSummary:!1,onToggle:m}),(0,A.jsx)(lj,{open:p&&c,children:()=>{let t=$H(e.input,e.inputData),r=$H(e.output,e.outputData);return(0,A.jsxs)(NV,{className:`bg-transparent py-0`,children:[s?(0,A.jsx)(PV,{label:e.inputLabel?.trim()||`Input`,tone:`input`,children:t}):null,s&&r?(0,A.jsx)(`div`,{className:`h-2`}):null,i||r?(0,A.jsx)(bH,{card:r&&!e.output?{...e,output:r}:e,onFileOpen:n,showPathRow:!0}):null]})}})]})}function pU({card:e,toolLabel:t,icon:n=p}){let r=e.statusTone===`running`,i=!!e.output?.trim()||e.outputData!==null&&e.outputData!==void 0,{expanded:a,onToggle:o}=aU({canExpand:i||r,isRunning:r,autoExpandWhileRunning:!1});return(0,A.jsxs)(MV,{children:[(0,A.jsx)(WV,{card:e,toolLabel:t,icon:n,expanded:a,canExpand:i||r,onToggle:o}),(0,A.jsx)(lj,{open:a&&i,children:()=>(0,A.jsx)(NV,{className:`py-0`,children:(0,A.jsx)(`pre`,{className:`font-mono text-[12px] text-muted-foreground whitespace-pre-wrap break-all w-full max-w-full max-h-64 overflow-y-auto overflow-x-hidden min-w-0 custom-scrollbar leading-relaxed`,children:$H(e.output,e.outputData)})})})]})}function mU(e,t,n){let r=e.agentId&&n?n(e.agentId):null,i=e.action&&t?(0,A.jsx)(GV,{action:e.action,onAction:t}):null;return r||i?(0,A.jsxs)(A.Fragment,{children:[r,i]}):void 0}function hU({card:e,toolLabel:t,icon:n=jt,onToolAction:r,renderToolAgent:i}){let a=e.statusTone===`running`,o=!!e.input?.trim()||e.inputData!==null&&e.inputData!==void 0,s=!!e.output?.trim()||e.outputData!==null&&e.outputData!==void 0,c=o||s,l=mU(e,r,i),{expanded:u,onToggle:d}=aU({canExpand:c||a,isRunning:a,autoExpandWhileRunning:!1});return(0,A.jsxs)(MV,{children:[(0,A.jsx)(WV,{card:e,toolLabel:t,icon:n,expanded:u,canExpand:c||a,actionSlot:l,onToggle:d}),(0,A.jsx)(lj,{open:u&&c,children:()=>(0,A.jsxs)(NV,{className:`bg-transparent py-0`,children:[o?(0,A.jsx)(PV,{label:e.inputLabel?.trim()||`Input`,tone:`input`,children:$H(e.input,e.inputData)}):null,o&&s?(0,A.jsx)(`div`,{className:`h-2`}):null,s?(0,A.jsx)(PV,{label:e.outputLabel?.trim()||`Output`,tone:e.statusTone===`error`?`error`:`output`,children:$H(e.output,e.outputData)}):null]})})]})}function gU({card:e,onToolAction:t,renderPanelAppCard:n}){let{panelApp:r}=e;return r&&n?n(r):(0,A.jsx)(hU,{card:e,onToolAction:t})}function _U(e){let t=e.toLowerCase();return t===`exec`||t===`exec_command`||t===`execute_command`||t===`command_execution`||t===`bash`||t===`shell`||t.includes(`run_`)}function vU(e){let t=e.toLowerCase();return t===`read_file`||t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`}function yU(e){let t=e.toLowerCase();return t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`}function bU(e){let t=e.toLowerCase();return t===`grep_search`||t===`find_files`||t.includes(`search`)}var xU={list_dir:{statusKind:`directory`,icon:ut},web_fetch:{statusKind:`web`,icon:Xe},message:{statusKind:`message`,icon:wt},sessions_list:{statusKind:`session`,icon:je},sessions_history:{statusKind:`session`,icon:je},sessions_request:{statusKind:`session`,icon:je},spawn:{statusKind:`agent`,icon:Be},sessions_spawn:{statusKind:`agent`,icon:Be},subagents:{statusKind:`agent`,icon:Be},memory_search:{statusKind:`memory`,icon:Ve},memory_get:{statusKind:`memory`,icon:Ve},cron:{statusKind:`schedule`,icon:He},gateway:{statusKind:`system`,icon:Ae},view_image:{statusKind:`image`,icon:ft},show_file:{statusKind:`display`,icon:Ee},show_url:{statusKind:`display`,icon:Ee},show_panel_app:{statusKind:`display`,icon:Ee},show_content:{statusKind:`display`,icon:Ee}};function SU(e){return xU[e.toLowerCase()]??null}function CU({card:e,toolStatusLabels:t,onToolAction:n,onFileOpen:r,renderToolAgent:i,renderPanelAppCard:a}){if(e.panelApp)return(0,A.jsx)(gU,{card:e,onToolAction:n,renderPanelAppCard:a});let o=SU(e.toolName),s=o?t?.builtIn?.[o.statusKind]?.[e.statusTone]:void 0;return _U(e.toolName)?(0,A.jsx)(sU,{card:e,toolLabel:t?.terminal[e.statusTone]}):vU(e.toolName)?(0,A.jsx)(fU,{card:e,toolLabel:yU(e.toolName)?t?.fileEdit[e.statusTone]:t?.fileRead[e.statusTone],onFileOpen:r}):bU(e.toolName)?(0,A.jsx)(pU,{card:e,toolLabel:s??t?.search[e.statusTone],icon:o?.icon}):(0,A.jsx)(hU,{card:e,toolLabel:s,icon:o?.icon,onToolAction:n,renderToolAgent:i})}function wU({children:e,label:t}){let n=(0,k.useRef)(null),r=(0,k.useRef)(null);return(0,k.useLayoutEffect)(()=>{let e=n.current,t=r.current;if(!e||!t)return;let i=()=>{let t=e.scrollTop>1,n=e.scrollHeight-e.clientHeight-e.scrollTop>1,r=t||n?`linear-gradient(to bottom, ${t?`transparent, black 16px`:`black`}, ${n?`black calc(100% - 16px), transparent`:`black`})`:`none`;e.style.maskImage=r,e.style.webkitMaskImage=r};i(),e.addEventListener(`scroll`,i,{passive:!0});let a=typeof ResizeObserver>`u`?null:new ResizeObserver(i);return a?.observe(e),a?.observe(t),()=>{e.removeEventListener(`scroll`,i),a?.disconnect()}},[]),(0,A.jsx)(`div`,{ref:n,role:`region`,"aria-label":t,tabIndex:0,className:`max-h-[50dvh] overflow-y-auto custom-scrollbar focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border`,children:(0,A.jsx)(`div`,{ref:r,className:`text-[0.925rem] leading-[1.72]`,children:e})})}var TU=40;function EU({group:e,open:t,isUser:n,reasoningCharacterCountTemplates:r,toolStatusLabels:i,showMoreTemplate:a,onToolAction:o,onFileOpen:s,renderToolAgent:c,renderPanelAppCard:l,onOpenChange:u}){let[d,f]=(0,k.useState)(TU);(0,k.useEffect)(()=>{f(TU)},[e.key]);let p=e.parts.filter(e=>e.type===`tool-card`).length>1,m=e.parts.slice(0,d),h=Math.max(0,e.parts.length-m.length),g=Math.min(TU,h),_=(a??`Show next {count} ({remaining} remaining)`).replace(`{count}`,String(g)).replace(`{remaining}`,String(h));return(0,A.jsxs)(`div`,{className:`group/tool-activity`,children:[(0,A.jsx)(kV,{openGroup:`tool-activity`,open:t,icon:At,leadingIconClassName:`bg-card`,label:e.label,onClick:()=>u(!t)}),(0,A.jsx)(lj,{open:t,children:()=>(0,A.jsxs)(wU,{label:e.label,children:[m.map((t,a)=>{let u=a===m.length-1;return(0,A.jsxs)(`div`,{className:`relative min-w-0`,children:[p?(0,A.jsx)(DV,{position:a===0?`first`:u?`last`:`middle`}):null,t.type===`tool-card`?(0,A.jsx)(CU,{card:t.card,toolStatusLabels:i,onToolAction:o,onFileOpen:s,renderToolAgent:c,renderPanelAppCard:l}):(0,A.jsx)(jV,{label:t.label,text:t.text,characterCountTemplates:r,isUser:n,isInProgress:!1})]},t.type===`tool-card`&&t.card.toolCallId?`tool-group-call-${t.card.toolCallId}`:`tool-group-item-${e.startIndex+a}`)}),h>0?(0,A.jsx)(`button`,{type:`button`,className:`ml-6 mt-1 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>f(e=>e+TU),children:_}):null]})})]})}function DU({open:e,state:t,label:n,texts:r,onToggle:i,onRetry:a,children:o}){let s=r.toolPayloadLoadingLabel??`Loading details`,c=r.toolPayloadLoadFailedLabel??`Couldn’t load details. Try again`;return(0,A.jsxs)(`div`,{className:`group/process`,children:[(0,A.jsx)(`div`,{className:`mb-2 border-b border-border/60 pb-2`,children:(0,A.jsx)(kV,{openGroup:`process`,open:e,label:n,onClick:i})}),(0,A.jsx)(lj,{open:e,children:()=>t===`loading`||t===`summary`?(0,A.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`mb-4 space-y-3 py-2 text-sm text-muted-foreground`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(ke,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 animate-spin motion-reduce:animate-none`}),(0,A.jsx)(`span`,{children:s})]}),(0,A.jsxs)(`div`,{"aria-hidden":`true`,className:`space-y-2 border-l-2 border-border/60 pl-4 motion-safe:animate-pulse`,children:[(0,A.jsx)(`div`,{className:`h-3 w-2/5 rounded bg-muted`}),(0,A.jsx)(`div`,{className:`h-3 w-3/4 rounded bg-muted`}),(0,A.jsx)(`div`,{className:`h-3 w-1/2 rounded bg-muted`})]})]}):t===`error`?(0,A.jsx)(`div`,{role:`alert`,className:`mb-4 py-2 text-sm text-muted-foreground`,children:(0,A.jsx)(`button`,{type:`button`,className:`rounded text-left underline underline-offset-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,onClick:a,children:c})}):o()})]})}var OU=3;function kU(e){return e.type===`tool-card`}function AU(e){return e?.type===`reasoning`||e?.type===`tool-card`&&!e.card.panelApp}function jU(e){let t=e.toLowerCase();return t===`list_dir`?`directory`:t.includes(`show_content`)||t.includes(`panel_app`)||t.includes(`panel`)?`panel`:t===`spawn`||t.includes(`subagent`)||t.includes(`session_request`)||t.includes(`agent`)&&!t.includes(`read`)?`agent`:t.includes(`web_`)||t.includes(`_web`)||t.includes(`url`)||t.includes(`fetch`)||t.includes(`http`)?`web`:t===`grep_search`||t===`find_files`||t===`search_files`||t.includes(`search`)||t.includes(`grep`)?`search`:t===`exec`||t===`exec_command`||t===`execute_command`||t===`command_execution`||t===`bash`||t===`shell`||t===`terminal`||t.includes(`run_`)?`bash`:t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`||t===`multi_replace`||t.includes(`write_file`)||t.includes(`edit_file`)||t.includes(`apply_patch`)?`edit`:t===`read_file`||t===`read`||t===`view_file`||t.includes(`read_file`)||t.startsWith(`read_`)?`read`:`other`}function MU(e){return e===`error`?0:e===`cancelled`?1:e===`running`?2:3}function NU(e,t,n){if(t!==`read`&&t!==`edit`&&t!==`directory`)return[`call:${n}`];let r=e.fileOperation?.blocks.map(({path:e})=>e.trim()).filter(Boolean),i=e.summary?.replace(/^(path|file):\s*/i,``).trim();return r?.length?r:[i||`call:${n}`]}function PU(e,t){let n=t.segmentTemplates[e.family],r=e.count===1?n.one:n.other.split(`{count}`).join(String(e.count)),i=e.exceptionCounts?.error??(e.tone===`error`?e.count:0),a=e.exceptionCounts?.cancelled??(e.tone===`cancelled`?e.count:0);return i===e.count?`${r} ${t.failedLabel}`:a===e.count?`${r} ${t.cancelledLabel}`:[r,i>0?`${i}/${e.count} ${t.failedLabel}`:null,a>0?`${a}/${e.count} ${t.cancelledLabel}`:null].filter(Boolean).join(` · `)}function FU(e){let t=[],n=new Map;for(let[r,i]of e.entries()){let e=jU(i.toolName),a=NU(i,e,r),o=n.get(e);if(!o){t.push(e),n.set(e,{unitTones:new Map(a.map(e=>[e,i.statusTone]))});continue}a.forEach(e=>o.unitTones.set(e,i.statusTone))}let r=t.map(e=>{let t=n.get(e),r=[...t.unitTones.values()],i=r.reduce((e,t)=>MU(t)<MU(e)?t:e,`success`);return{family:e,count:t.unitTones.size,tone:i,exceptionCounts:{error:r.filter(e=>e===`error`).length,cancelled:r.filter(e=>e===`cancelled`).length}}});return r.sort((e,n)=>{let r=MU(e.tone)-MU(n.tone);return r===0?t.indexOf(e.family)-t.indexOf(n.family):r}),r}function IU(e){let{labels:t,segments:n}=e;if(n.length===0)return``;let r=n.slice(0,OU),i=n.length-r.length,a=r.map(e=>PU(e,t));return i>0&&a.push(`+${i}`),a.join(` · `)}function LU(e,t){let n=[],r=t,i=-1;for(;;){let t=e[r];if(!AU(t))break;n.push(t),t.type===`tool-card`&&(i=n.length-1),r+=1}return{candidateParts:n,lastToolOffset:i}}function RU(e,t){let n=[],r=0;for(;r<e.length;){let i=e[r];if(i.type!==`tool-card`||i.card.panelApp){n.push({kind:`part`,key:`part-${r}`,index:r,part:i}),r+=1;continue}let a=r,{candidateParts:o,lastToolOffset:s}=LU(e,a),c=o.filter(kU);if(c.length===1){n.push({kind:`part`,key:`part-${a}`,index:a,part:i}),r=a+1;continue}let l=o.slice(0,s+1);r=a+l.length;let u=FU(c.map(e=>e.card)),d=IU({segments:u,labels:t});n.push({kind:`tool-group`,key:`tool-group-${a}`,group:{key:`tool-group-${a}`,startIndex:a,endIndex:r-1,parts:l,segments:u,label:d}})}return n}var zU=new Set;function BU(e){let{messageId:t,onRequest:n,state:r}=e,[i,a]=(0,k.useState)(!1),[o,s]=(0,k.useState)(()=>new Set),c=r===void 0||r===`ready`,l=()=>{(r===`summary`||r===`error`)&&n?.(t)};return{handleProcessToggle:()=>{if(i)return a(!1);a(!0),l()},handleToolActivityOpenChange:(e,t)=>{t&&!c&&l(),s(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r}),t&&a(!0)},openToolGroupKeys:c?o:zU,processOpen:i}}var VU={segmentTemplates:{read:{one:`Read 1 file`,other:`Read {count} files`},edit:{one:`Edit 1 file`,other:`Edit {count} files`},directory:{one:`View 1 directory`,other:`View {count} directories`},search:{one:`Search 1 time`,other:`Search {count} times`},bash:{one:`Run 1 command`,other:`Run {count} commands`},web:{one:`Open 1 page`,other:`Open {count} pages`},agent:{one:`Start 1 subtask`,other:`Start {count} subtasks`},panel:{one:`Show 1 result`,other:`Show {count} results`},other:{one:`Use 1 tool`,other:`Use {count} tools`}},failedLabel:`failed`,cancelledLabel:`cancelled`};function HU(e){return{segmentTemplates:{...VU.segmentTemplates,...e.toolActivitySegmentTemplates??{}},failedLabel:e.toolActivityFailedLabel??VU.failedLabel,cancelledLabel:e.toolActivityCancelledLabel??VU.cancelledLabel}}function UU(e){return e.type===`reasoning`||e.type===`tool-card`||e.type===`custom`&&e.process===!0}function WU(e,t){if(e.role!==`assistant`||!e.processSummary||t)return null;let n=-1;for(let t=e.parts.length-1;t>=0;--t)if(UU(e.parts[t])){n=t;break}return n<0||n>=e.parts.length-1?null:{processParts:e.parts.slice(0,n+1),finalParts:e.parts.slice(n+1)}}function GU({index:e,isInProgress:t,isLastPart:n,isUser:r,onAttachmentOpen:i,onFileOpen:a,onInlineTokenClick:o,onToolAction:s,part:c,renderCustomPart:l,renderInlineDisplay:u,renderPanelAppCard:d,renderToolAgent:f,resolveFileContentUrl:p,role:m,texts:h}){let{type:g}=c;if(g===`custom`){let e=l?.(c);return e===void 0?null:(0,A.jsx)(`div`,{className:`min-w-0`,children:e},`custom-${c.customType}-${c.id}`)}if(g===`markdown`){let{inlineTokens:r,text:i}=c;return(0,A.jsx)(NB,{text:i,role:m,texts:h,isStreaming:t&&n,inlineTokens:r,onFileOpen:a,onInlineTokenClick:o,resolveFileContentUrl:p,renderInlineDisplay:u},`markdown-${e}`)}if(g===`reasoning`){let{label:i,text:a}=c;return(0,A.jsx)(jV,{label:i,text:a,characterCountTemplates:h.reasoningCharacterCountTemplates,isUser:r,isInProgress:t&&n},`reasoning-${e}`)}if(g===`tool-card`){let{card:t}=c;return(0,A.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,A.jsx)(DV,{position:`single`}),(0,A.jsx)(CU,{card:t,toolStatusLabels:h.toolStatusLabels,onToolAction:s,onFileOpen:a,renderToolAgent:f,renderPanelAppCard:d})]},`tool-${e}`)}if(g===`file`){let{file:t}=c;return(0,A.jsx)(cV,{file:t,isUser:r,texts:h,onOpen:i},`file-${e}`)}if(g===`unknown`){let{label:t,rawType:n,text:r}=c;return(0,A.jsxs)(`div`,{className:`rounded-lg border border-border bg-muted/60 px-2.5 py-2 text-xs text-muted-foreground`,children:[(0,A.jsxs)(`div`,{className:`font-semibold text-foreground`,children:[t,`: `,n]}),r?(0,A.jsx)(`pre`,{className:`mt-1 whitespace-pre-wrap break-words text-[11px] text-muted-foreground`,children:r}):null]},`unknown-${e}`)}return null}function KU(e){let{isInProgress:t,isUser:n,onAttachmentOpen:r,onFileOpen:i,onInlineTokenClick:a,onToolActivityOpenChange:o,onToolAction:s,openToolGroupKeys:c,parts:l,renderCustomPart:u,renderInlineDisplay:d,renderPanelAppCard:f,renderToolAgent:p,resolveFileContentUrl:m,role:h,texts:g,indexOffset:_=0}=e;return dV(RU(l,HU(g))).map(e=>e.kind===`image-group`?(0,A.jsx)(lV,{group:e,indexOffset:_,isUser:n,texts:g,onOpen:r},`${e.key}-${_}`):e.kind===`tool-group`?(0,A.jsx)(EU,{group:e.group,open:c.has(e.group.key),isUser:n,reasoningCharacterCountTemplates:g.reasoningCharacterCountTemplates,toolStatusLabels:g.toolStatusLabels,showMoreTemplate:g.toolActivityShowMoreTemplate,onToolAction:s,onFileOpen:i,renderToolAgent:p,renderPanelAppCard:f,onOpenChange:t=>o(e.group.key,t)},e.key):GU({part:e.part,index:_+e.index,role:h,isUser:n,isInProgress:t,isLastPart:_+e.index===_+l.length-1,texts:g,onToolAction:s,onFileOpen:i,onAttachmentOpen:r,onInlineTokenClick:a,resolveFileContentUrl:m,renderCustomPart:u,renderInlineDisplay:d,renderToolAgent:p,renderPanelAppCard:f}))}var qU=(0,k.memo)(function({layout:e,message:t,isInProgress:n,texts:r,onToolAction:i,toolPayloadState:a,onToolPayloadRequest:o,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,renderInlineDisplay:u,renderCustomPart:d,renderToolAgent:f,renderPanelAppCard:p,resolveFileContentUrl:m}){let{role:h}=t,g=h===`user`,_=e===`flat`&&!g,v=WU(t,n),{handleProcessToggle:y,handleToolActivityOpenChange:b,openToolGroupKeys:x,processOpen:S}=BU({messageId:t.id,state:a,onRequest:o});return(0,A.jsx)(`div`,{"data-chat-message-surface":_?`flat`:`card`,className:j(`max-w-full has-[[data-chat-message-wide-content=true]]:w-full`,_?`block w-full text-foreground`:`inline-block w-fit rounded-2xl border px-4 shadow-sm`,!_&&(g?`nextclaw-chat-message-user rounded-[1.45rem] border-primary bg-primary py-2.5 text-primary-foreground shadow-none`:h===`assistant`?`border-border bg-card pb-3 pt-4 text-card-foreground`:`border-border bg-muted/45 py-3 text-foreground`)),children:(0,A.jsx)(`div`,{className:`space-y-0`,children:v?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(DU,{open:S,state:a,label:t.processSummary?.label,texts:r,onToggle:y,onRetry:()=>void o?.(t.id),children:()=>KU({parts:v.processParts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p})}),KU({parts:v.finalParts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p,indexOffset:v.processParts.length})]}):KU({parts:t.parts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p})})})});function JU({messageText:e,texts:t}){let{copied:n,copy:r}=lR({text:e}),i=n?t.copiedMessageLabel:t.copyMessageLabel,{Tooltip:a,TooltipContent:o,TooltipProvider:s,TooltipTrigger:c}=Ki;return e?(0,A.jsx)(s,{delayDuration:250,children:(0,A.jsxs)(a,{children:[(0,A.jsx)(c,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:()=>void r(),className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,"aria-label":i,children:n?(0,A.jsx)(h,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ye,{className:`h-3.5 w-3.5`})})}),(0,A.jsx)(o,{side:`top`,className:`text-xs`,children:i})]})}):null}function YU({action:e,onAction:t}){let{Tooltip:n,TooltipContent:r,TooltipProvider:i,TooltipTrigger:a}=Ki;return(0,A.jsx)(i,{delayDuration:250,children:(0,A.jsxs)(n,{children:[(0,A.jsx)(a,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,"aria-label":e.label,className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-muted-foreground`,disabled:e.disabled,onClick:()=>t(e),children:e.icon===`edit`?(0,A.jsx)(bt,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ke,{"data-testid":`chat-continue-message-icon`,className:`h-3.5 w-3.5`})})}),(0,A.jsx)(r,{side:`top`,className:`text-xs`,children:e.label})]})})}function XU({action:e,open:t,onOpenChange:n,restoreFocusRef:r}){let{Dialog:i,DialogContent:a,DialogDescription:o,DialogHeader:s,DialogTitle:c}=Ki;return(0,A.jsx)(i,{open:t,onOpenChange:n,children:(0,A.jsxs)(a,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-xl`,closeLabel:e.dialog.closeLabel,onCloseAutoFocus:e=>{e.preventDefault(),r.current?.focus()},children:[(0,A.jsxs)(s,{className:`space-y-1 pr-8 text-left`,children:[(0,A.jsx)(c,{className:`text-lg font-semibold leading-tight text-foreground`,children:e.dialog.title}),e.dialog.description?(0,A.jsx)(o,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.dialog.description}):null]}),(0,A.jsx)(`dl`,{className:`divide-y divide-border/70 rounded-xl border border-border/80 bg-muted/20 px-4`,children:e.dialog.rows.map(e=>(0,A.jsxs)(`div`,{className:`grid gap-1 py-3 sm:grid-cols-[11rem_minmax(0,1fr)] sm:gap-4`,children:[(0,A.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e.label}),(0,A.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-xs leading-5 text-foreground`,children:e.value})]},e.label))})]})})}function ZU({message:e}){let[t,n]=(0,k.useState)(!1),[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(null),s=(0,k.useRef)(null),{moreActions:c}=e,{Popover:l,PopoverContent:u,PopoverTrigger:d,Tooltip:f,TooltipContent:p,TooltipProvider:m,TooltipTrigger:h}=Ki;return c?.items.length?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(l,{open:t,onOpenChange:n,children:[(0,A.jsx)(m,{delayDuration:250,children:(0,A.jsxs)(f,{children:[(0,A.jsx)(h,{asChild:!0,children:(0,A.jsx)(d,{asChild:!0,children:(0,A.jsx)(`button`,{ref:s,type:`button`,"aria-label":c.triggerLabel,className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,children:(0,A.jsx)(Ze,{className:`h-3.5 w-3.5`})})})}),(0,A.jsx)(p,{side:`top`,className:`text-xs`,children:c.triggerLabel})]})}),(0,A.jsx)(u,{align:`end`,variant:`menu`,role:`menu`,onCloseAutoFocus:e=>{r&&e.preventDefault()},children:c.items.map(e=>(0,A.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`${bi} text-foreground ${xi.item}`,onClick:()=>{n(!1),o(e),i(!0)},children:[e.icon?(0,A.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground`,children:e.icon}):null,(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label})]},e.key))})]}),a?(0,A.jsx)(XU,{action:a,open:r,onOpenChange:i,restoreFocusRef:s}):null]}):null}function QU({message:e,onAction:t,texts:n}){let r=(0,k.useMemo)(()=>e.parts.map(e=>e.type===`markdown`||e.type===`unknown`?e.text:``).filter(e=>!!e?.trim()).join(`
166
+ `,1;if(ce>1e5&&ce>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return ae+=a,a.length}let ee=ie(e);if(!ee)throw Me(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let te=Ve(ee),ne=``,D=a||te,re={},O=new l.__emitter(l);w();let ae=``,oe=0,se=0,ce=0,le=!1;try{if(ee.__emitTokens)ee.__emitTokens(n,O);else{for(D.matcher.considerAll();;){ce++,le?le=!1:D.matcher.considerAll(),D.matcher.lastIndex=se;let e=D.matcher.exec(n);if(!e)break;let t=E(n.substring(se,e.index),e);se=e.index+t}E(n.substring(se))}return O.finalize(),ne=O.toHTML(),{language:e,value:ne,relevance:oe,illegal:!1,_emitter:O,_top:D}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:Ke(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:se,context:n.slice(se-100,se+100),mode:t.mode,resultSoFar:ne},_emitter:O};if(o)return{language:e,value:Ke(n),illegal:!1,relevance:0,errorRaised:t,_emitter:O,_top:D};throw t}}function b(e){let t={value:Ke(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(ie).filter(oe).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(ie(e.language).supersetOf===t.language)return 1;if(ie(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(ue(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Ge(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),ue(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=qe(l,e)}let E=()=>{ne(),Pe(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function ee(){ne(),Pe(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let te=!1;function ne(){function e(){ne()}if(document.readyState===`loading`){te||window.addEventListener(`DOMContentLoaded`,e,!1),te=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function D(n,r){let i=null;try{i=r(e)}catch(e){if(Me(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)Me(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&ae(i.aliases,{languageName:n})}function re(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function O(){return Object.keys(t)}function ie(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function ae(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function oe(e){let t=ie(e);return t&&!t.disableAutodetect}function se(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function ce(e){se(e),a.push(e)}function le(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function ue(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function de(e){return Pe(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),Pe(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:ne,highlightElement:w,highlightBlock:de,configure:T,initHighlighting:E,initHighlightingOnLoad:ee,registerLanguage:D,unregisterLanguage:re,listLanguages:O,getLanguage:ie,registerAliases:ae,autoDetection:oe,inherit:qe,addPlugin:ce,removePlugin:le}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=We,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ve)typeof ve[e]==`object`&&n(ve[e]);return Object.assign(e,ve),e},Ze=Xe({});Ze.newInstance=()=>Xe({}),t.exports=Ze,Ze.HighlightJS=Ze,Ze.default=Ze}))()).default;function mR(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}var hR=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),gR=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),_R=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),vR=[...gR,..._R],yR=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),bR=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),xR=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),SR=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function CR(e){let t=e.regex,n=hR(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+bR.join(`|`)+`)`},{begin:`:(:)?(`+xR.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+SR.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:yR.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+vR.join(`|`)+`)\\b`}]}}function wR(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}var TR=`[A-Za-z$_][0-9A-Za-z$_]*`,ER=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),DR=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],OR=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),kR=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],AR=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],jR=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],MR=[].concat(AR,OR,kR);function NR(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=TR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:TR,keyword:ER,literal:DR,built_in:MR,"variable.language":jR},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...OR,...kR]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function ee(e){return t.concat(`(?!`,e.join(`|`),`)`)}let te={match:t.concat(/\b/,ee([...AR,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},D={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},re=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},O,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:re,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},ne,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},te,E,S,D,{match:/\$[(.]/}]}}function PR(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}function FR(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function IR(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function LR(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function RR(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}var zR=`[A-Za-z$_][0-9A-Za-z$_]*`,BR=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),VR=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],HR=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),UR=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],WR=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],GR=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],KR=[].concat(WR,HR,UR);function qR(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=zR,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:zR,keyword:BR,literal:VR,built_in:KR,"variable.language":GR},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...HR,...UR]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function ee(e){return t.concat(`(?!`,e.join(`|`),`)`)}let te={match:t.concat(/\b/,ee([...WR,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},ne={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},D={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},re=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},O,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:re,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},ne,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},te,E,S,D,{match:/\$[(.]/}]}}function JR(e){let t=e.regex,n=qR(e),r=zR,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:zR,keyword:BR.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:VR,built_in:KR.concat(i),"variable.language":GR},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function YR(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function XR(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var ZR=new Set([`text`,`txt`,`plain`,`plaintext`,`none`,`output`]),QR=[`typescript`,`javascript`,`json`,`bash`,`shell`,`python`,`css`,`xml`,`markdown`,`yaml`,`sql`,`diff`],$R=4,ez=[{name:`typescript`,language:JR,aliases:[`ts`,`tsx`]},{name:`javascript`,language:NR,aliases:[`js`,`jsx`,`mjs`,`cjs`]},{name:`json`,language:PR,aliases:[`jsonc`]},{name:`bash`,language:mR,aliases:[`sh`,`zsh`]},{name:`shell`,language:LR,aliases:[`console`,`terminal`]},{name:`python`,language:IR,aliases:[`py`]},{name:`css`,language:CR},{name:`xml`,language:YR,aliases:[`html`,`svg`]},{name:`markdown`,language:FR,aliases:[`md`,`mdx`]},{name:`yaml`,language:XR,aliases:[`yml`]},{name:`sql`,language:RR},{name:`diff`,language:wR,aliases:[`patch`]}];function tz(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function nz(e){return e.trim().toLowerCase()}var rz=new class{constructor(){this.highlight=(e,t)=>{let n=nz(t);if(!e||ZR.has(n))return this.createPlainTextResult(e,n||`text`);if(this.engine.getLanguage(n)){let t=this.engine.highlight(e,{language:n,ignoreIllegals:!0});return{html:t.value,language:t.language??n,highlighted:!0}}let r=this.engine.highlightAuto(e,QR);return r.language&&r.relevance>=$R?{html:r.value,language:r.language,highlighted:!0}:this.createPlainTextResult(e,n||`text`)},this.createPlainTextResult=(e,t)=>({html:tz(e),language:t,highlighted:!1}),this.engine=pR.newInstance(),ez.forEach(e=>{this.engine.registerLanguage(e.name,e.language),e.aliases&&this.engine.registerAliases(e.aliases,{languageName:e.name})})}},iz=/language-([a-z0-9-]+)/i;function az(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(az).join(``):``}function oz(e){let t=az(e);return t.endsWith(`
167
+ `)?t.slice(0,-1):t}function sz(e){return(e?iz.exec(e):null)?.[1]?.toLowerCase()||`text`}function cz({className:e,children:t,texts:n}){let r=(0,k.useMemo)(()=>sz(e),[e]),i=(0,k.useMemo)(()=>oz(t),[t]),a=(0,k.useMemo)(()=>rz.highlight(i,r),[i,r]),o=(0,k.useMemo)(()=>{let t=`language-${a.language}`;return j(`hljs`,e,e?.includes(`language-`)?void 0:t)},[e,a.language]),{copied:s,copy:c}=fR({text:i});return(0,A.jsxs)(`div`,{className:`chat-codeblock`,children:[(0,A.jsxs)(`div`,{className:`chat-codeblock-toolbar`,children:[(0,A.jsx)(`span`,{className:`chat-codeblock-language`,children:r}),(0,A.jsxs)(`button`,{type:`button`,className:`chat-codeblock-copy`,onClick:()=>void c(),"aria-label":s?n.copiedCodeLabel:n.copyCodeLabel,children:[s?(0,A.jsx)(h,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ye,{className:`h-3.5 w-3.5`}),(0,A.jsx)(`span`,{children:s?n.copiedCodeLabel:n.copyCodeLabel})]})]}),(0,A.jsx)(`pre`,{children:(0,A.jsx)(`code`,{className:o,"data-highlighted":a.highlighted?`true`:`false`,dangerouslySetInnerHTML:{__html:a.html}})})]})}var lz=`nextclaw-inline`,uz=/language-([a-z0-9-]+)/i,dz=new Set([`auto`,`source`,`rendered`]),fz=32,pz=64*1024;function mz(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hz(e){return typeof e==`string`&&e.trim().length>0?e.trim():void 0}function gz(e){return Number.isInteger(e)&&Number(e)>0?Number(e):void 0}function _z(e){let t=hz(e);return t&&dz.has(t)?t:void 0}function vz(e){let{payload:t}=e;return mz(t)?t:null}function yz(e,t){return e===null||typeof e==`string`||typeof e==`boolean`?!0:typeof e==`number`?Number.isFinite(e):t>=fz||typeof e!=`object`?!1:(Array.isArray(e)?e:Object.values(e)).every(e=>yz(e,t+1))}function bz(e){if(e!==void 0)return!mz(e)||!yz(e,0)?null:new TextEncoder().encode(JSON.stringify(e)).byteLength<=pz?e:null}function xz(e){let t=vz(e);if(!t)return null;let n=hz(t.path);if(!n)return null;let r=_z(t.viewer),i=bz(t.params);return i===null||i&&(r===`source`||!/\.html?$/i.test(n))?null:{type:`file`,payload:{path:n,line:gz(t.line),column:gz(t.column),viewer:r,params:i??void 0}}}function Sz(e){let t=vz(e);if(!t)return null;let n=hz(t.url);return n?{type:`url`,payload:{url:n}}:null}function Cz(e){let t=vz(e);if(!t)return null;let n=hz(t.appId);if(!n)return null;let r=bz(t.params);return r===null?null:{type:`panel_app`,payload:{appId:n,path:hz(t.path),params:r??void 0}}}function wz(e){let t=vz(e);return!t||!(`value`in t)?null:{type:`json`,payload:{value:t.value}}}function Tz(e){if(!mz(e))return null;let t=hz(e.type);return t===`file`?xz(e):t===`url`?Sz(e):t===`panel_app`?Cz(e):t===`json`?wz(e):null}function Ez(e){return(e?uz.exec(e):null)?.[1]?.toLowerCase()===lz}function Dz(e){let t=e.endsWith(`
168
+ `)?e.slice(0,-1):e,n;try{n=JSON.parse(t)}catch{return null}if(!mz(n))return null;let r=Tz(n.target);return r?{target:r,title:hz(n.title),description:hz(n.description)}:null}function Oz(e){if(e.title)return e.title;if(e.target.type===`file`){let t=e.target.payload.path.split(`/`).filter(Boolean);return t[t.length-1]??e.target.payload.path}return e.target.type===`url`?e.target.payload.url:e.target.type===`panel_app`?e.target.payload.appId:`JSON`}function kz(e){return e.target.type===`file`?e.target.payload.path:e.target.type===`url`?e.target.payload.url:e.target.type===`panel_app`?e.target.payload.appId:JSON.stringify(e.target.payload.value,null,2)}function Az({display:e}){let t=`h-3.5 w-3.5 shrink-0 text-muted-foreground`;return e.target.type===`file`?(0,A.jsx)(at,{className:t,"aria-hidden":!0}):e.target.type===`url`?(0,A.jsx)(Oe,{className:t,"aria-hidden":!0}):e.target.type===`panel_app`?(0,A.jsx)(Fe,{className:t,"aria-hidden":!0}):(0,A.jsx)(qe,{className:t,"aria-hidden":!0})}function jz(e){return e.length>1200?`${e.slice(0,1200)}\n...`:e}function Mz({display:e}){let t=Oz(e),n=kz(e),r=e.target.type===`json`?jz(n):n;return(0,A.jsxs)(`section`,{className:j(`my-2 max-w-full border-l-2 border-border bg-muted/30 px-3 py-2`,`text-xs leading-relaxed text-foreground`),"data-nextclaw-inline-display":`true`,"data-nextclaw-inline-display-type":e.target.type,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,A.jsx)(Az,{display:e}),(0,A.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:t})]}),e.description?(0,A.jsx)(`p`,{className:`mt-1 line-clamp-2 text-[12px] text-muted-foreground`,children:e.description}):null,(0,A.jsx)(`pre`,{className:j(`mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-words`,`font-mono text-[11px] leading-relaxed text-muted-foreground`),children:r})]})}function Nz({display:e,renderInlineDisplay:t}){let n=t?.(e);return n==null?(0,A.jsx)(Mz,{display:e}):(0,A.jsx)(A.Fragment,{children:n})}var Pz=.5,Fz=4,Iz=.25;function Lz({actions:e,className:t}){return(0,A.jsx)(`div`,{"data-chat-message-preview-toolbar":`true`,className:j(`absolute right-2 top-2 z-10 flex items-center gap-0.5 rounded-lg bg-black/55 p-1 text-white opacity-80 shadow-lg backdrop-blur-md transition-opacity duration-150 hover:opacity-100 focus-within:opacity-100`,t),children:e.map(e=>(0,A.jsx)(`button`,{type:`button`,"aria-label":e.label,title:e.label,disabled:e.disabled,className:`inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onSelect()},children:e.icon},e.id))})}function Rz({actions:e=[],children:t,closeLabel:n,label:r,onClose:i,resetZoomLabel:a=`Reset zoom`,zoomInLabel:o=`Zoom in`,zoomOutLabel:s=`Zoom out`}){let c=(0,k.useRef)(null),[l,u]=(0,k.useState)(!1),[d,f]=(0,k.useState)({scale:1,x:0,y:0}),p=(0,k.useCallback)(()=>{f({scale:1,x:0,y:0})},[]),m=(0,k.useCallback)((e,t={x:0,y:0})=>{f(n=>{let r=typeof e==`function`?e(n.scale):e,i=Math.min(Fz,Math.max(Pz,r));if(i<=1)return{scale:i,x:0,y:0};let a=i/n.scale;return{scale:i,x:t.x-(t.x-n.x)*a,y:t.y-(t.y-n.y)*a}})},[]);(0,k.useEffect)(()=>{let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=e=>{if(e.key===`Escape`){e.preventDefault(),i();return}e.key===`+`||e.key===`=`?(e.preventDefault(),m(e=>e+Iz)):e.key===`-`?(e.preventDefault(),m(e=>e-Iz)):e.key===`0`&&(e.preventDefault(),p())};return window.addEventListener(`keydown`,t),()=>{document.body.style.overflow=e,window.removeEventListener(`keydown`,t)}},[m,i,p]);let h=e=>{d.scale<=1||e.button!==0||(e.currentTarget.setPointerCapture(e.pointerId),c.current={pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,x:d.x,y:d.y},u(!0))},g=e=>{let t=c.current;!t||t.pointerId!==e.pointerId||f(n=>({...n,x:t.x+e.clientX-t.startX,y:t.y+e.clientY-t.startY}))},_=e=>{c.current?.pointerId===e.pointerId&&(e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),c.current=null,u(!1))},v=e=>{e.preventDefault();let t=e.currentTarget.getBoundingClientRect();m(t=>t+(e.deltaY<0?Iz:-Iz),{x:e.clientX-t.left-t.width/2,y:e.clientY-t.top-t.height/2})},y=`${Math.round(d.scale*100)}%`,b=[...e,{id:`close`,label:n,icon:(0,A.jsx)(Me,{className:`h-4 w-4`,strokeWidth:2}),onSelect:i}];return(0,Ch.createPortal)((0,A.jsxs)(`div`,{role:`dialog`,"aria-label":r,"aria-modal":`true`,className:`fixed inset-0 z-[var(--z-modal,10050)] overflow-hidden bg-black/90 backdrop-blur-[2px]`,onClick:i,children:[(0,A.jsx)(Lz,{actions:b,className:`right-4 top-4 opacity-100`}),(0,A.jsx)(`div`,{"data-chat-message-lightbox-viewport":`true`,className:j(`absolute inset-0 flex touch-none select-none items-center justify-center overflow-hidden p-6 sm:p-12`,d.scale>1&&(l?`cursor-grabbing`:`cursor-grab`)),onClick:e=>e.stopPropagation(),onDoubleClick:()=>{d.scale===1?m(2):p()},onPointerDown:h,onPointerMove:g,onPointerUp:_,onPointerCancel:_,onWheel:v,children:(0,A.jsx)(`div`,{"data-chat-message-lightbox-content":`true`,className:j(`flex h-full w-full items-center justify-center will-change-transform`,!l&&`transition-transform duration-150 ease-out`),style:{transform:`translate3d(${d.x}px, ${d.y}px, 0) scale(${d.scale})`},children:t})}),(0,A.jsxs)(`div`,{className:`absolute bottom-5 left-1/2 z-10 flex -translate-x-1/2 items-center gap-0.5 rounded-xl bg-black/60 p-1 text-white shadow-xl backdrop-blur-md`,children:[(0,A.jsx)(`button`,{type:`button`,"aria-label":s,title:s,disabled:d.scale<=Pz,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),m(e=>e-Iz)},children:(0,A.jsx)(vt,{className:`h-4 w-4`,strokeWidth:2})}),(0,A.jsx)(`output`,{"aria-label":y,className:`inline-flex h-9 min-w-16 items-center justify-center px-2 text-xs font-medium tabular-nums`,children:y}),(0,A.jsx)(`button`,{type:`button`,"aria-label":o,title:o,disabled:d.scale>=Fz,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),m(e=>e+Iz)},children:(0,A.jsx)(Ne,{className:`h-4 w-4`,strokeWidth:2})}),(0,A.jsx)(`span`,{"aria-hidden":`true`,className:`mx-0.5 h-5 w-px bg-white/20`}),(0,A.jsx)(`button`,{type:`button`,"aria-label":a,title:a,disabled:d.scale===1&&d.x===0&&d.y===0,className:`inline-flex h-9 w-9 items-center justify-center rounded-lg transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/80 disabled:cursor-not-allowed disabled:opacity-40`,onClick:e=>{e.stopPropagation(),p()},children:(0,A.jsx)(Ct,{className:`h-4 w-4`,strokeWidth:2})})]})]}),document.body)}var zz=200,Bz=null;function Vz(){return Bz??=u(()=>import(`./mermaid.core-GWlaVWz1.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),Bz}function Hz(){if(typeof document>`u`)return`default`;let e=document.documentElement;return e.getAttribute(`data-theme-appearance`)===`dark`||e.classList.contains(`dark`)?`dark`:`default`}function Uz(){let[e,t]=(0,k.useState)(Hz);return(0,k.useEffect)(()=>{let e=document.documentElement,n=new MutationObserver(()=>t(Hz()));return n.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme-appearance`]}),()=>n.disconnect()},[]),e}function Wz({isStreaming:e,source:t,texts:n,showToolbar:r=!0}){let i=(0,k.useId)().replace(/[^a-zA-Z0-9_-]/g,``),a=(0,k.useRef)(0),o=Uz(),s=t.trim(),c=`${o}:${s}`,l=(0,k.useRef)({isFinal:!e,key:c,source:s,theme:o}),u=(0,k.useRef)(null),d=(0,k.useRef)(!1),f=(0,k.useRef)(Date.now()),p=(0,k.useRef)(!0),[m,g]=(0,k.useState)(!1),[_,v]=(0,k.useState)(null),[y,b]=(0,k.useState)(null),x=n.mermaidDiagramLabel??`Mermaid diagram`,S=n.mermaidExpandLabel??`Expand diagram`,C=n.attachmentCloseLabel??`Close preview`,w=n.mermaidLoadingLabel??`Rendering diagram…`,T=n.mermaidRenderErrorLabel??`Diagram could not be rendered`,{copied:E,copy:ee}=fR({text:s}),te=E?n.copiedCodeLabel:n.copyCodeLabel,ne=(0,k.useCallback)(e=>{if(!p.current||d.current)return;if(u.current!==null){if(!e)return;window.clearTimeout(u.current),u.current=null}let t=Date.now()-f.current,n=e?0:Math.max(0,zz-t);u.current=window.setTimeout(()=>{u.current=null,v(l.current)},n)},[]);(0,k.useEffect)(()=>(p.current=!0,()=>{p.current=!1,u.current!==null&&(window.clearTimeout(u.current),u.current=null)}),[]),(0,k.useEffect)(()=>{l.current={isFinal:!e,key:c,source:s,theme:o},ne(!e)},[e,s,c,ne,o]),(0,k.useEffect)(()=>{if(!_)return;let e=!0;return(async()=>{d.current=!0,f.current=Date.now();try{let t=await Vz();if(!e||!p.current)return;a.current+=1;let n=`nextclaw-mermaid-${i}-${a.current}`;t.initialize({securityLevel:`strict`,startOnLoad:!1,suppressErrorRendering:!0,theme:_.theme});let r=await t.parse(_.source,{suppressErrors:!0});if(!e||!p.current)return;if(!r)throw Error(`Invalid Mermaid diagram`);let{svg:o}=await t.render(n,_.source);e&&p.current&&l.current.theme===_.theme&&b({key:_.key,status:`rendered`,svg:o})}catch{e&&p.current&&_.isFinal&&l.current.key===_.key&&b({key:_.key,status:`error`})}finally{d.current=!1;let t=l.current;e&&p.current&&(t.key!==_.key||t.isFinal!==_.isFinal)&&ne(t.isFinal)}})(),()=>{e=!1}},[i,_,ne]);let D=y?.key===c?y:null;if(D?.status===`error`)return(0,A.jsxs)(`div`,{"data-chat-mermaid-error":`true`,className:`my-3 overflow-hidden rounded-xl border border-border bg-muted/25`,children:[(0,A.jsx)(`div`,{className:`border-b border-border px-3 py-2 text-xs text-muted-foreground`,children:T}),(0,A.jsx)(cz,{className:`language-mermaid`,texts:n,children:s})]});let re=y?.status===`rendered`?y:null;return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`figure`,{"aria-label":x,"aria-busy":!D,"data-chat-mermaid-diagram":`true`,"data-chat-mermaid-pending":!re||void 0,"data-chat-mermaid-updating":!D||void 0,className:re?`group/mermaid relative my-3 min-h-24 overflow-auto py-2`:`my-3 flex min-h-14 items-center justify-center rounded-xl bg-muted/20 px-3 py-2`,children:re?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`button`,{type:`button`,"aria-label":S,title:S,className:`relative block min-w-full cursor-zoom-in border-0 bg-transparent p-0 text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>g(!0),children:(0,A.jsx)(`span`,{className:`block min-w-fit [&_svg]:mx-auto [&_svg]:h-auto [&_svg]:max-w-full`,dangerouslySetInnerHTML:{__html:re.svg}})}),r&&(0,A.jsx)(Lz,{actions:[{id:`copy-source`,label:te,icon:E?(0,A.jsx)(h,{className:`h-4 w-4`,strokeWidth:2}):(0,A.jsx)(Ye,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>void ee()},{id:`expand`,label:S,icon:(0,A.jsx)(Qe,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>g(!0)}]})]}):(0,A.jsxs)(`div`,{role:`status`,className:`inline-flex items-center gap-2 text-xs font-medium text-muted-foreground/80`,children:[(0,A.jsx)(ke,{"aria-hidden":`true`,className:`h-3.5 w-3.5 animate-spin motion-reduce:animate-none`}),(0,A.jsx)(`span`,{children:w})]})}),m&&re?(0,A.jsx)(Rz,{closeLabel:C,label:x,onClose:()=>g(!1),zoomInLabel:n.previewZoomInLabel,zoomOutLabel:n.previewZoomOutLabel,resetZoomLabel:n.previewResetZoomLabel,actions:[{id:`copy-source`,label:te,icon:E?(0,A.jsx)(h,{className:`h-4 w-4`,strokeWidth:2}):(0,A.jsx)(Ye,{className:`h-4 w-4`,strokeWidth:2}),onSelect:()=>void ee()}],children:(0,A.jsx)(`div`,{"data-chat-mermaid-expanded-canvas":`true`,className:`h-full w-full overflow-hidden rounded-xl bg-background p-4 shadow-2xl [&_svg]:mx-auto [&_svg]:!h-full [&_svg]:!w-full [&_svg]:!max-w-none`,dangerouslySetInnerHTML:{__html:re.svg}})}):null]})}function Gz({alt:e,expandLabel:t,closeLabel:n,resetZoomLabel:r,sizeLabel:i,src:a,zoomInLabel:o,zoomOutLabel:s,title:c,fallbackLabel:l,width:u}){let[d,f]=(0,k.useState)(!1),[p,m]=(0,k.useState)(null),h=()=>f(!0);return p===a?(0,A.jsx)(`span`,{className:`chat-image-fallback`,children:e||l||``}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`span`,{"data-chat-message-image-preview":!0,className:`group/image relative block w-fit max-w-[min(100%,32rem)] overflow-hidden rounded-lg`,style:Number(u)>0?{width:Number(u)}:void 0,children:[(0,A.jsx)(`button`,{type:`button`,className:`block w-fit max-w-[min(100%,32rem)] text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,style:Number(u)>0?{width:`100%`}:void 0,onClick:h,onDoubleClick:e=>{e.preventDefault(),h()},"aria-label":t,children:(0,A.jsx)(`img`,{src:a,alt:e,title:c,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>m(a),className:`block h-auto w-auto max-h-[26rem] max-w-full rounded-lg bg-transparent object-contain`,style:Number(u)>0?{width:`100%`}:void 0})}),c&&(0,A.jsx)(`span`,{className:`chat-image-caption`,children:c}),(0,A.jsx)(Lz,{actions:[{id:`expand`,label:t,icon:(0,A.jsx)(Qe,{className:`h-4 w-4`,strokeWidth:2}),onSelect:h}]}),i?(0,A.jsx)(`span`,{className:`pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-start bg-gradient-to-t from-black/50 via-black/15 to-transparent px-2.5 pb-2 pt-8 opacity-0 transition-opacity duration-150 group-hover/image:opacity-100 group-focus-within/image:opacity-100`,children:(0,A.jsx)(`span`,{className:`inline-flex items-center rounded-md bg-black/40 px-1.5 py-0.5 text-[10px] font-medium text-white/95 backdrop-blur-sm`,children:i})}):null]}),d?(0,A.jsx)(Rz,{closeLabel:n,label:e,onClose:()=>f(!1),resetZoomLabel:r,zoomInLabel:o,zoomOutLabel:s,children:(0,A.jsx)(`img`,{src:a,alt:e,className:`max-h-full max-w-full object-contain shadow-2xl`})}):null]})}var Kz=new Set([`nextclaw:`,`http:`,`https:`,`mailto:`,`tel:`]),qz=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Jz=/^[a-z]:[\\/]/i,Yz=/^\/[a-z]:[\\/]/i,Xz=`file:`;function Zz(e){return!e.startsWith(`//`)&&!qz.test(e)}function Qz(e){let t=Number(e);return Number.isSafeInteger(t)&&t>0?t:void 0}function $z(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==Xz||t.hostname&&t.hostname.toLowerCase()!==`localhost`)return null;let n;try{n=decodeURIComponent(t.pathname)}catch{return null}return Yz.test(n)&&(n=n.slice(1)),n?{path:n,query:t.searchParams,fragment:t.hash.slice(1)}:null}function eB(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):``,i=n.indexOf(`?`),a=i>=0?n.slice(0,i):n,o=i>=0?n.slice(i+1):``,s;try{s=decodeURIComponent(a)}catch{return null}return s?{path:s,query:new URLSearchParams(o),fragment:r}:null}function tB(e){let t=/^L(\d+)(?:C(\d+))?(?:-L\d+(?:C\d+)?)?$/i.exec(e),n=Qz(t?.[1]);return{line:n,column:n?Qz(t?.[2]):void 0}}function nB(e){if(Jz.test(e)||Zz(e))return e;try{let t=new URL(e);return Kz.has(t.protocol)||t.protocol===Xz&&$z(e)?e:``}catch{return``}}function rB(e){return e&&nB(e)||null}function iB(e){return/^https?:\/\//i.test(e)}function aB(e){let t=e.toLowerCase().startsWith(Xz)?$z(e):eB(e),n=t?.path;if(!n||n.startsWith(`#`)||n.startsWith(`//`)||!Jz.test(n)&&qz.test(n))return null;let r=t.query.get(`viewer`),i=tB(t.fragment),a=/^(.*?)(?::(\d+)(?::(\d+))?)$/.exec(n),o=a?.[1]??n,s=i.line??Qz(a?.[2]),c=i.column??(s?Qz(a?.[3]):void 0);return{path:o,label:o.split(/[\\/]/).filter(Boolean).pop()??o,viewMode:`preview`,...r===`source`||r===`rendered`?{previewViewer:r}:{},...typeof s==`number`?{line:s}:{},...typeof c==`number`?{column:c}:{}}}var oB=`data-chat-inline-token-kind`,sB=`data-chat-inline-token-key`,cB=`data-chat-inline-token-ref`,lB=`data-chat-inline-token-name`,uB=`data-chat-inline-token-source`,dB=`data-chat-inline-token-path`,fB=`data-chat-inline-token-label`,pB=`data-chat-inline-token-raw-text`,mB=`data-chat-inline-token-excerpt`,hB=`data-chat-inline-token-message-id`,gB=`data-chat-inline-token-role`,_B=`data-chat-inline-token-start-line`,vB=`data-chat-inline-token-end-line`;function yB(e){return e.filter(e=>e.rawText).sort((e,t)=>t.rawText.length-e.rawText.length)}function bB(e){let t={[oB]:e.kind,[fB]:e.label,[pB]:e.rawText};return`ref`in e?(t[cB]=e.ref,t[lB]=e.name,e.source&&(t[uB]=e.source),e.path&&(t[dB]=e.path)):(t[sB]=e.key,e.kind===`workspace_excerpt`&&`path`in e?(t[dB]=e.path,t[mB]=e.excerpt,e.startLine!==null&&(t[_B]=String(e.startLine)),e.endLine!==null&&(t[vB]=String(e.endLine))):e.kind===`conversation_excerpt`&&`messageId`in e&&(t[mB]=e.excerpt,t[hB]=e.messageId,t[gB]=e.role)),{type:`chatInlineToken`,data:{hName:`span`,hProperties:t,hChildren:[{type:`text`,value:e.label}]}}}function xB(e,t,n){let r=null;for(let i of n){let n=e.indexOf(i.rawText,t);n<0||(!r||n<r.index||n===r.index&&i.rawText.length>r.token.rawText.length)&&(r={index:n,token:i})}return r}var SB=class{constructor(e){this.tokens=e,this.occurrenceCounts=new Map,this.transform=e=>e.type===`code`||e.type===`inlineCode`||!e.children?e:{...e,children:e.children.flatMap(e=>e.type===`text`&&typeof e.value==`string`?this.splitTextNode(e.value):[this.transform(e)])},this.splitTextNode=e=>{let t=[],n=0;for(;n<e.length;){let r=xB(e,n,this.tokens);if(!r){t.push({type:`text`,value:e.slice(n)});break}r.index>n&&t.push({type:`text`,value:e.slice(n,r.index)});let i=this.tokens.filter(e=>e.rawText===r.token.rawText),a=this.occurrenceCounts.get(r.token.rawText)??0,o=i[Math.min(a,i.length-1)]??r.token;this.occurrenceCounts.set(r.token.rawText,a+1),t.push(bB(o)),n=r.index+r.token.rawText.length}return t.length>0?t:[{type:`text`,value:e}]}}};function CB(e){let t=yB(e);return function(){let e=this.data(),n={text:{36:t.filter(e=>e.rawText.startsWith(`$`)).map(e=>({tokenize:(t,n,r)=>{let i=0;return function a(o){return o===e.rawText.charCodeAt(i)?(i===0&&t.enter(`data`),t.consume(o),i+=1,i===e.rawText.length?(t.exit(`data`),n):a):r(o)}}}))}};return(e.micromarkExtensions??=[]).push(n),e=>t.length>0?new SB(t).transform(e):e}}function wB(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:null}function TB(e){let t=wB(e,uB);return t===`builtin`||t===`global`||t===`project`||t===`workspace`?t:null}function EB(e,t){let n=Number(wB(e,t));return Number.isInteger(n)&&n>0?n:null}function DB(e){let t=wB(e,oB),n=wB(e,fB),r=wB(e,pB);if(t===`skill`&&n&&r){let i=wB(e,cB),a=wB(e,lB);return i&&a?{kind:t,ref:i,name:a,source:TB(e),path:wB(e,dB),label:n,rawText:r}:null}let i=wB(e,sB);if(t===`workspace_excerpt`&&i&&n&&r){let a=wB(e,dB),o=wB(e,mB);return a&&o?{kind:t,key:i,path:a,label:n,excerpt:o,startLine:EB(e,_B),endLine:EB(e,vB),rawText:r}:null}if(t===`conversation_excerpt`&&i&&n&&r){let a=wB(e,mB),o=wB(e,hB),s=wB(e,gB);return a&&o&&(s===`assistant`||s===`user`)?{kind:t,key:i,messageId:o,role:s,label:n,excerpt:a,rawText:r}:null}return t&&i&&n&&r?{kind:t,key:i,label:n,rawText:r}:null}var OB=14e4,kB={"katex-display":{overflowX:`auto`,overflowY:`hidden`,paddingBlock:`0.25em`}};function AB(e){return e.length<=OB?e:`${e.slice(0,OB)}\n\n...`}function jB(e){let t=0;for(let n of e?.children??[]){if(n.type===`text`){let e=n.value??``;if(e.trim().length>0||e.includes(`
169
+ `)||e.includes(`\r`))return!1;continue}if(n.tagName!==`img`)return!1;t+=1}return t>=3}var MB=(0,k.createContext)(null),NB=(0,k.createContext)(!1);function PB(){let e=(0,k.useContext)(MB);if(!e)throw Error(`Chat message Markdown renderer requires its runtime context`);return e}var FB={pre:function({node:e,children:t,...n}){let r=e?.children.length===1?e.children[0]:null;return r?.type===`element`&&r.tagName===`code`?(0,A.jsx)(NB.Provider,{value:!0,children:t}):(0,A.jsx)(`pre`,{...n,children:t})},details:function({node:e,children:t,open:n}){let{texts:r}=PB();return(0,A.jsx)(KL,{node:e,open:n,label:r.detailsLabel??`Details`,children:t})},summary:({children:e})=>(0,A.jsx)(A.Fragment,{children:e}),div:function({node:e,children:t,...n}){let{texts:r}=PB(),i=n[`data-frontmatter`],a=n[`data-chat-math-pending`];return typeof i==`string`?(0,A.jsx)(pj,{source:i,label:r.frontmatterLabel??`Document properties`}):a?(0,A.jsx)(`div`,{...n,style:{minHeight:`3em`,display:`flex`,alignItems:`center`,justifyContent:`center`,opacity:.6},children:t}):(0,A.jsx)(`div`,{...n,children:t})},p:function({node:e,children:t}){let{inline:n}=PB();return n?(0,A.jsx)(A.Fragment,{children:t}):(0,A.jsx)(`p`,{"data-chat-image-row":jB(e)?`three-column`:void 0,children:t})},span:function({node:e,children:t,...n}){let{onInlineTokenClick:r,texts:i}=PB(),a=DB(n);if(a){let e=`excerpt`in a?a:null,t=a.kind===`workspace_excerpt`&&`path`in a?a:null;return(0,A.jsx)($L,{characterCountLabel:t?i.excerptCharacterCountTemplate?.replace(`{count}`,String(Wh(t.excerpt))):void 0,excerpt:e?.excerpt,kind:a.kind,label:a.label,location:t?.startLine?t.startLine===t.endLine||!t.endLine?`L${t.startLine}`:`L${t.startLine}–${t.endLine}`:void 0,path:t?.path,tooltip:`ref`in a?a.name:a.key,onClick:r&&a.kind!==`conversation_excerpt`?()=>r(a):void 0})}return(0,A.jsx)(`span`,{...n,style:{...n.style,...kB[n.className??``]},children:t})},a:function({node:e,href:t,children:n,...r}){let{onFileOpen:i}=PB(),a=rB(t),o=s_(a),s=a?iB(a):!1,c=s?null:a?aB(a):null,l=e=>{if(!a){e.preventDefault();return}!i||!c||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),i(c))};return(0,A.jsxs)(`a`,{...r,className:j(r.className,!a&&`chat-link-invalid`),href:a??`#`,"aria-disabled":!a||void 0,onClick:l,target:s?`_blank`:void 0,rel:s?`noreferrer noopener`:void 0,children:[o&&(0,A.jsx)(`span`,{"aria-hidden":`true`,className:`inline-flex empty:hidden`,style:{marginInlineEnd:`0.25em`,verticalAlign:`-0.1em`},children:o}),n]})},table:function({node:e,children:t,width:n,...r}){let i=Number(n);return(0,A.jsx)(`div`,{className:`chat-table-wrap`,children:(0,A.jsx)(`table`,{...r,style:Number.isFinite(i)&&i>0?{width:i}:void 0,children:t})})},input:function({node:e,type:t,checked:n,...r}){return t===`checkbox`?(0,A.jsx)(`input`,{...r,type:`checkbox`,checked:n,readOnly:!0,disabled:!0,className:`chat-task-checkbox`}):(0,A.jsx)(`input`,{...r,type:t})},img:function({node:e,src:t,alt:n,title:r,width:i}){let{resolveFileContentUrl:a,texts:o}=PB(),s=rB(t);if(!s)return(0,A.jsx)(`span`,{className:`chat-image-fallback`,children:n||o.imageAltLabel||``});let c=aB(s),l=c&&a?a(c):s;return l?(0,A.jsx)(Gz,{alt:n||``,closeLabel:o.attachmentCloseLabel??`Close preview`,expandLabel:o.attachmentExpandLabel??`Expand image`,resetZoomLabel:o.previewResetZoomLabel,sizeLabel:null,src:l,title:r,width:i,fallbackLabel:o.imageAltLabel,zoomInLabel:o.previewZoomInLabel,zoomOutLabel:o.previewZoomOutLabel}):null},code:function({node:e,className:t,children:n,...r}){let{isStreaming:i,renderInlineDisplay:a,renderCodeBlock:o,texts:s}=PB(),c=String(n??``);if(!(0,k.useContext)(NB))return(0,A.jsx)(`code`,{...r,className:j(`chat-inline-code`,t),children:n});let l=Ez(t)?Dz(c):null;return l?(0,A.jsx)(Nz,{display:l,renderInlineDisplay:a}):o?o({source:c,language:/language-([^\s]+)/.exec(t??``)?.[1]??`text`,isStreaming:i}):t?.split(` `).includes(`language-mermaid`)?(0,A.jsx)(Wz,{isStreaming:i,source:c,texts:s}):(0,A.jsx)(cz,{className:t,texts:s,children:n})}};function IB({text:e,role:t,texts:n,inline:r=!1,isStreaming:i=!1,inlineTokens:a,onFileOpen:o,onInlineTokenClick:s,resolveFileContentUrl:c,renderInlineDisplay:l,renderCodeBlock:u,allowHtml:d=!0,urlTransform:f=nB}){let p=t===`user`,m=(0,k.useId)(),h=(0,k.useMemo)(()=>HL(`chat-${m.replace(/[^a-zA-Z0-9_-]/g,``)}-`),[m]),g=AB(e),_=a?.length?[JE,Tj,JL(g),CB(a)]:[JE,Tj,JL(g)];i&&_.push(ZL(g)),r||_.unshift(yD,uj,QE),p&&_.push(ZE);let v=r?`span`:`div`;return(0,A.jsx)(MB.Provider,{value:{inline:r,isStreaming:i,isUser:p,onFileOpen:o,onInlineTokenClick:s,renderInlineDisplay:l,renderCodeBlock:u,resolveFileContentUrl:c,texts:n},children:(0,A.jsx)(v,{"data-stream-phase":i?e.length%3:void 0,className:j(`chat-markdown`,p?`chat-markdown-user`:`chat-markdown-assistant`),children:(0,A.jsx)(HC,{skipHtml:r||!d,remarkRehypeOptions:{footnoteLabel:n.footnoteLabel??`Footnotes`,footnoteBackLabel:n.footnoteBackLabel??`Back to reference`},remarkPlugins:_,rehypePlugins:[...!r&&d?[xL,[BL,UL]]:[],h,[wM,{trust:!1,maxExpand:1e3,...i?{errorColor:`currentColor`}:{}}],...i?[QL]:[]],components:FB,urlTransform:f,children:g})})})}var LB={archive:`bg-muted text-muted-foreground`,audio:`bg-muted text-muted-foreground`,code:`bg-muted text-muted-foreground`,data:`bg-muted text-muted-foreground`,document:`bg-muted text-muted-foreground`,generic:`bg-muted text-muted-foreground`,image:`bg-muted text-muted-foreground`,pdf:`bg-muted text-muted-foreground`,sheet:`bg-muted text-muted-foreground`,video:`bg-muted text-muted-foreground`},RB=new Set([`c`,`cpp`,`css`,`go`,`html`,`java`,`js`,`jsx`,`md`,`php`,`py`,`rb`,`rs`,`sh`,`sql`,`svg`,`ts`,`tsx`]),zB=new Set([`graphql`,`json`,`toml`,`xml`,`yaml`,`yml`]),BB=new Set([`avif`,`bmp`,`gif`,`heic`,`heif`,`ico`,`jpeg`,`jpg`,`png`,`svg`,`tif`,`tiff`,`webp`]),VB=new Set([`aac`,`flac`,`m4a`,`mp3`,`ogg`,`opus`,`wav`,`weba`]),HB=new Set([`avi`,`m4v`,`mov`,`mp4`,`mkv`,`webm`,`wmv`]),UB=new Set([`doc`,`docx`,`odt`,`pages`,`rtf`,`txt`]),WB=new Set([`csv`,`numbers`,`ods`,`tsv`,`xls`,`xlsx`]),GB=new Set([`7z`,`bz2`,`gz`,`rar`,`tar`,`tgz`,`zip`]);function KB(e){if(!Number.isFinite(e)||e==null||e<0)return null;if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;let i=n>=10||r===0?0:1;return`${n.toFixed(i).replace(/\.0$/,``)} ${t[r]}`}function qB(e,t){let n=JB(e);if(n)return n.toUpperCase();let r=(t.split(`/`)[1]??``).split(/[+.;-]/)[0]?.trim();return r?r.slice(0,6).toUpperCase():`FILE`}function JB(e){return/\.([a-z0-9]{1,12})$/i.exec(e.trim())?.[1]?.toLowerCase()??``}function YB(e){return typeof e==`string`&&/^data:image\//i.test(e.trim())}function XB(e){return BB.has(e)?e===`jpg`||e===`jpeg`?`image/jpeg`:e===`svg`?`image/svg+xml`:`image/${e}`:VB.has(e)?e===`mp3`?`audio/mpeg`:e===`m4a`?`audio/mp4`:e===`weba`?`audio/webm`:`audio/${e}`:HB.has(e)?e===`mov`?`video/quicktime`:e===`m4v`?`video/mp4`:`video/${e}`:e===`pdf`?`application/pdf`:null}function ZB(e){let t=JB(e);return t?XB(t):null}function QB(e){let t=e.mimeType.trim().toLowerCase();return t.length>0&&t!==`application/octet-stream`?t:ZB(e.label)}function $B(e){let t=e.mimeType.trim().toLowerCase(),n=JB(e.label);return e.isImage||t.startsWith(`image/`)||BB.has(n)||YB(e.dataUrl)}function eV(e,t){let n=JB(e),r=t.toLowerCase();return r.startsWith(`image/`)||BB.has(n)?`image`:r.startsWith(`audio/`)||VB.has(n)?`audio`:r.startsWith(`video/`)||HB.has(n)?`video`:r.includes(`pdf`)||n===`pdf`?`pdf`:GB.has(n)||/(zip|tar|gzip|rar|compressed|archive)/.test(r)?`archive`:WB.has(n)||/(spreadsheet|sheet|excel|csv)/.test(r)?`sheet`:zB.has(n)||/(json|xml|yaml|toml)/.test(r)?`data`:RB.has(n)||/(javascript|typescript|jsx|tsx|css|html)/.test(r)?`code`:UB.has(n)||/(msword|document|opendocument|rtf|text\/)/.test(r)?`document`:`generic`}function tV(e){let t=eV(e.label,e.mimeType),n=KB(e.sizeBytes);return{category:t,extension:qB(e.label,e.mimeType),sizeLabel:n}}var nV={archive:`Archive`,audio:`Audio`,code:`Code file`,data:`Data file`,document:`Document`,generic:`File`,image:`Image`,pdf:`PDF document`,sheet:`Spreadsheet`,video:`Video`},rV={archive:$e,audio:et,code:tt,data:rt,document:at,generic:st,image:nt,pdf:at,sheet:it,video:ot};function iV(e,t){return t?.attachmentCategoryLabels?.[e]??nV[e]}function aV(e,t,n){return(0,A.jsx)(`div`,{className:j(`mt-0.5 text-[11px] leading-4`,n?`text-foreground/55`:`text-muted-foreground`),children:t?`${e} · ${t}`:e})}function oV(e,t,n){return(0,A.jsx)(`span`,{className:j(`inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-medium`,n?t?`bg-black/5 text-foreground/75`:`bg-muted text-muted-foreground`:t?`bg-black/[0.03] text-foreground/45`:`bg-muted/70 text-muted-foreground/70`),children:e})}function sV(e){let{label:t,href:n,isUser:r,onOpen:i}=e,a=j(`inline-flex items-center rounded-md px-2 py-0.5 text-[11px] font-medium transition-colors`,r?`bg-black/5 text-foreground/75 hover:bg-black/10 hover:text-foreground`:`bg-muted text-muted-foreground hover:bg-[var(--interaction-hover)] hover:text-foreground`);return i?(0,A.jsx)(`button`,{type:`button`,className:a,onClick:e=>{e.preventDefault(),e.stopPropagation(),i()},children:t}):n?(0,A.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:a,children:t}):oV(t,r,!1)}function cV({category:e,isUser:t}){let n=rV[e];return(0,A.jsx)(`div`,{className:j(`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg`,t?`bg-black/5 text-foreground/70`:LB[e]),children:(0,A.jsx)(n,{className:j(`h-4 w-4`,t?`text-foreground/70`:`text-current`),strokeWidth:2})})}function lV(e){let{category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,action:o}=e;return(0,A.jsxs)(`div`,{className:`flex items-center gap-2.5 px-2.5 py-2`,children:[(0,A.jsx)(cV,{category:t,isUser:a}),(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`div`,{className:`truncate text-[13px] font-medium leading-5`,children:n.label}),aV(r,i,a)]}),o]})})]})}function uV(e){let{category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,shellClasses:o,actionLabel:s,onOpen:c}=e;if(!n.dataUrl||t!==`audio`&&t!==`video`)return null;let l=QB(n);return(0,A.jsxs)(`div`,{className:o,children:[lV({category:t,file:n,categoryLabel:r,sizeLabel:i,isUser:a,action:sV({label:s,href:n.dataUrl,isUser:a,onOpen:c?()=>c(n):void 0})}),(0,A.jsx)(`div`,{className:`px-2.5 pb-2.5`,children:t===`audio`?(0,A.jsx)(`audio`,{controls:!0,preload:`metadata`,"aria-label":n.label,className:`block w-full`,children:(0,A.jsx)(`source`,{src:n.dataUrl,...l?{type:l}:{}})}):(0,A.jsx)(`div`,{className:j(`overflow-hidden rounded-lg`,a?`bg-black/10`:`bg-muted ring-1 ring-border/70`),children:(0,A.jsx)(`video`,{controls:!0,preload:`metadata`,playsInline:!0,"aria-label":n.label,className:`block max-h-[28rem] w-full bg-black`,children:(0,A.jsx)(`source`,{src:n.dataUrl,...l?{type:l}:{}})})})})]})}function dV({file:e,isUser:t=!1,texts:n,onOpen:r}){let{category:i,sizeLabel:a}=tV(e),o=$B(e)&&!!e.dataUrl,s=i===`audio`&&!!e.dataUrl,c=i===`video`&&!!e.dataUrl,l=!!e.dataUrl,u=l?n?.attachmentOpenLabel??`Open`:n?.attachmentAttachedLabel??`Attached`,d=n?.attachmentExpandLabel??`Expand image`,f=n?.attachmentCloseLabel??`Close preview`,p=iV(i,n),m=j(`block overflow-hidden rounded-xl border transition-colors`,t?`border-black/8 bg-black/[0.03] text-foreground`:`border-border/70 bg-card text-card-foreground`,l&&(t?`hover:bg-black/[0.05]`:`hover:bg-muted/50`));if(o&&e.dataUrl)return(0,A.jsx)(Gz,{alt:e.label,expandLabel:d,closeLabel:f,resetZoomLabel:n?.previewResetZoomLabel,sizeLabel:a,src:e.dataUrl,zoomInLabel:n?.previewZoomInLabel,zoomOutLabel:n?.previewZoomOutLabel});if(s||c)return uV({category:i,file:e,categoryLabel:p,sizeLabel:a,isUser:t,shellClasses:m,actionLabel:u,onOpen:r});let h=lV({category:i,file:e,categoryLabel:p,sizeLabel:a,isUser:t,action:oV(u,t,l)});return!l||!e.dataUrl?(0,A.jsx)(`div`,{className:m,children:h}):r?(0,A.jsx)(`button`,{type:`button`,className:j(m,`group w-full text-left`),onClick:()=>r(e),children:h}):(0,A.jsx)(`a`,{href:e.dataUrl,target:`_blank`,rel:`noreferrer`,className:j(m,`group`),children:h})}function fV({group:e,indexOffset:t,isUser:n,texts:r,onOpen:i}){return(0,A.jsx)(`div`,{"data-chat-message-image-row":`three-column`,"data-chat-message-wide-content":`true`,className:`grid w-full grid-cols-3 items-start gap-3`,children:e.items.map(({index:e,part:a})=>(0,A.jsx)(dV,{file:a.file,isUser:n,texts:r,onOpen:i},`file-${t+e}`))})}function pV(e){return!!(e?.kind===`part`&&e.part.type===`file`&&e.part.file.isImage&&e.part.file.dataUrl)}function mV(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(!pV(r)){r&&t.push(r),n+=1;continue}let i=n,a=[];for(;pV(e[n]);)a.push(e[n]),n+=1;if(a.length<3){t.push(...a);continue}t.push({kind:`image-group`,key:`image-group-${i}`,items:a})}return t}function hV(e){let{isInProgress:t}=e,[n,r]=(0,k.useState)(t),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(t);(0,k.useEffect)(()=>{let e=o.current;!e&&t?(r(!0),a(!1)):e&&!t&&!i&&r(!1),o.current=t},[t,i]);function s(e){e.preventDefault();let i=!n;if(r(i),!i){a(!1);return}t&&a(!0)}return{isOpen:n,onSummaryClick:s}}var gV=10,_V=1500,vV=new Set([`ArrowDown`,`ArrowUp`,`PageDown`,`PageUp`,`Home`,`End`,` `]);function yV(e,t=gV){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function bV(e,t){return t?t.getBoundingClientRect().bottom-e.getBoundingClientRect().top-e.clientTop-e.clientHeight:e.scrollHeight-e.scrollTop-e.clientHeight}function xV(e){return e instanceof KeyboardEvent&&e.key!==`Enter`&&e.key!==` `?!1:!!((e.target instanceof Element?e.target:e.target instanceof Node?e.target.parentElement:null)?.closest(`button, a, input, textarea, select, [role="button"], summary`))?.matches(`[aria-expanded="false"]:not([aria-haspopup]):not(:disabled), details:not([open]) > summary`)}function SV(e,t){let n=e=>{xV(e)&&t()};return e?.addEventListener(`click`,n,!0),e?.addEventListener(`keydown`,n,!0),()=>{e?.removeEventListener(`click`,n,!0),e?.removeEventListener(`keydown`,n,!0)}}function CV(e,t){if(!e)return()=>void 0;let n=e=>{let{target:n}=e;!vV.has(e.key)||n instanceof Element&&n.closest(`input, textarea, select, [contenteditable="true"]`)||t()},r=n=>{n.target===e&&t()};return e.addEventListener(`wheel`,t),e.addEventListener(`touchmove`,t),e.addEventListener(`keydown`,n),e.addEventListener(`pointerdown`,r),()=>{e.removeEventListener(`wheel`,t),e.removeEventListener(`touchmove`,t),e.removeEventListener(`keydown`,n),e.removeEventListener(`pointerdown`,r)}}function wV(e,t,n){if(!e||typeof ResizeObserver>`u`)return()=>void 0;let r=new ResizeObserver(n);return r.observe(e),t&&r.observe(t),()=>r.disconnect()}function TV(e,t,n,r){let i=e.getBoundingClientRect().top,a=n?n.getBoundingClientRect().top-i+e.scrollTop:r,o=t.getBoundingClientRect().top-i+e.scrollTop;return{offset:a,height:a===null?0:Math.max(0,a-o+e.clientHeight-24)}}function EV({contentRef:e,contentVersion:t,hasContent:n,isLoading:r,resetKey:i,scrollRef:a,stickyThresholdPx:o,initialScrollTop:s,turnSpace:c}){let[l,u]=(0,k.useState)(!0),d=(0,k.useRef)(s===void 0),f=(0,k.useRef)(null),p=(0,k.useRef)(!1),m=(0,k.useRef)(null),h=(0,k.useRef)(c?.key),g=(0,k.useRef)(null),_=(0,k.useRef)(null),v=(0,k.useRef)(0),y=(0,k.useRef)(c);(0,k.useLayoutEffect)(()=>{y.current=c});let b=(0,k.useCallback)(()=>{let e=y.current,t=a.current;if(!e?.frameRef.current||!t)return;let n=TV(t,e.frameRef.current,_.current===e.key?e.anchorRef.current:null,g.current);g.current=n.offset,e.frameRef.current.style.minHeight=`${n.height}px`},[a]),x=(0,k.useCallback)(()=>{let t=a.current;t&&u(bV(t,e?.current??void 0)<=(o??gV))},[e,a,o]),S=(0,k.useCallback)(e=>{d.current=e,x()},[x]),C=(0,k.useCallback)(()=>{let e=m.current;e!==null&&(cancelAnimationFrame(e),m.current=null)},[]),w=(0,k.useCallback)((e=`auto`)=>{C(),m.current=requestAnimationFrame(()=>{m.current=null;let t=a.current;t&&(b(),typeof t.scrollTo==`function`?t.scrollTo({top:t.scrollHeight,behavior:e}):t.scrollTop=t.scrollHeight,x())})},[C,a,b,x]),T=(0,k.useCallback)(()=>{v.current=0,S(!0),w()},[w,S]),E=(0,k.useCallback)(()=>{let e=a.current;if(e){if(Date.now()<=v.current){let t=yV(e,o);t||C(),d.current=t}x()}},[C,o,a,x]);return(0,k.useEffect)(()=>CV(a.current,()=>{v.current=Date.now()+_V}),[i,a]),(0,k.useEffect)(()=>SV(a.current,()=>{p.current=!1,v.current=0,C(),S(!1)}),[C,n,i,a,S]),(0,k.useLayoutEffect)(()=>{if(f.current===i)return;let e=f.current===null&&h.current===null;f.current=i,e||(h.current=y.current?.key),_.current=null,v.current=0,g.current=null,b(),S(s===void 0),p.current=s===void 0},[i,s,S,b]),(0,k.useLayoutEffect)(()=>{let e=c?.key;e!==h.current&&(h.current=e,!(!e||r||!d.current)&&(_.current=e,b(),v.current=0,S(!1),w()))},[r,w,c?.key,S,b]),(0,k.useEffect)(()=>C,[C]),(0,k.useEffect)(()=>{if(n)return wV(e?.current??null,a.current,()=>{b(),x(),d.current&&w()})},[e,n,w,i,a,b,x]),(0,k.useLayoutEffect)(()=>{!p.current||r||!n||(p.current=!1,w())},[n,r,w]),(0,k.useLayoutEffect)(()=>{!d.current||!n||w()},[t,n,w]),{isAtBottom:l,onScroll:E,scrollToBottom:T}}var DV=`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-current`,OV=`group/process-row flex w-full min-w-0 items-center gap-1.5 py-0 text-[0.925rem] font-normal leading-[1.72] text-muted-foreground/80`;function kV({children:e,className:t}){return(0,A.jsx)(`span`,{"data-theme-control":`process-icon`,className:j(DV,t),children:e})}function AV({position:e}){return(0,A.jsx)(`span`,{"aria-hidden":`true`,"data-tool-workflow-rail":`true`,className:j(`pointer-events-none absolute left-[0.575em] w-px -translate-x-1/2 bg-border/70`,e===`first`?`bottom-0 top-[0.86em]`:e===`last`?`top-0 h-[0.86em]`:`inset-y-0`)})}function jV({children:e,className:t,interactive:n=!1,onClick:r,role:i,tabIndex:a,onKeyDown:o,"aria-expanded":s}){return(0,A.jsx)(`div`,{"data-chat-process-meta-row":`true`,className:j(OV,n?`cursor-pointer transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`:null,t),onClick:r,role:i,tabIndex:a,onKeyDown:o,"aria-expanded":n?s:void 0,children:e})}function MV({label:e,openGroup:t,open:n=!1,icon:r,className:i,leadingIconClassName:a,labelClassName:o,onClick:s}){return(0,A.jsxs)(`button`,{type:`button`,"data-chat-process-meta-row":`true`,className:j(OV,`m-0 w-full border-0 bg-transparent p-0 text-left shadow-none transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,i),"aria-expanded":n,onClick:s,children:[r?(0,A.jsx)(kV,{className:j(`relative z-[1] rounded-sm`,a),children:(0,A.jsx)(r,{className:`h-[1.05em] w-[1.05em]`,strokeWidth:2.25})}):null,(0,A.jsx)(`span`,{className:j(`min-w-0 shrink truncate`,o),children:e}),(0,A.jsx)(`span`,{className:j(`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-muted-foreground/80 transition-opacity`,n?`opacity-100`:`opacity-0 group-hover/process-row:opacity-100 focus-visible:opacity-100`),children:(0,A.jsx)(We,{className:j(`h-[1.05em] w-[1.05em] transition-transform duration-200 motion-reduce:transition-none`,n&&`rotate-90`),strokeWidth:2.25})})]})}function NV(e,t,n){let r=Array.from(t).length;return(n??`${e} · {count}`).split(`{count}`).join(String(r))}function PV({label:e,text:t,characterCountTemplates:n,isUser:r,isInProgress:i}){let{isOpen:a,onSummaryClick:o}=hV({isInProgress:i}),s=(0,k.useRef)(null),c=NV(e,t,i?n?.inProgress:n?.completed),{onScroll:l}=EV({scrollRef:s,resetKey:`reasoning`,isLoading:!1,hasContent:t.length>0,contentVersion:t,stickyThresholdPx:20});return(0,A.jsxs)(`div`,{className:`group/reasoning`,children:[(0,A.jsx)(MV,{openGroup:`reasoning`,open:a,icon:Ve,leadingIconClassName:r?`bg-primary`:`bg-card`,label:c,labelClassName:r?`text-primary-100`:void 0,onClick:o}),(0,A.jsx)(fj,{open:a,children:()=>(0,A.jsx)(`div`,{ref:s,onScroll:l,"data-reasoning-scroll":`true`,className:j(`mt-1 w-fit max-w-[500px] max-h-56 overflow-y-auto rounded-lg custom-scrollbar`,r?`bg-primary/70`:`bg-muted`),children:(0,A.jsx)(`pre`,{className:`min-w-0 whitespace-pre-wrap break-all p-2 text-[11px]`,children:t})})})]})}function FV({children:e,className:t}){return(0,A.jsx)(`div`,{className:j(`relative my-0 flex w-full min-w-0 max-w-full flex-col text-[0.925rem] leading-[1.72] text-muted-foreground`,t),children:e})}function IV({children:e,className:t}){return(0,A.jsx)(`div`,{className:j(`mt-0.5 w-full max-w-full min-w-0 overflow-hidden pl-[calc(1.15em+0.375rem)] text-[0.925rem] leading-[1.72] text-muted-foreground`,t),children:e})}function LV({label:e,tone:t,children:n}){let r={input:{dot:`bg-muted-foreground/60`,body:`text-foreground`},output:{dot:`bg-primary/70`,body:`text-foreground`},error:{dot:`bg-rose-500/80`,body:`text-rose-950/85`}}[t];return(0,A.jsxs)(`section`,{className:`overflow-hidden rounded-md border border-border/70 bg-muted/20`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/60 px-2.5 py-1.5 text-[10px] font-medium tracking-wide text-muted-foreground`,children:[(0,A.jsx)(`span`,{className:j(`h-1.5 w-1.5 rounded-full`,r.dot)}),(0,A.jsx)(`span`,{className:`normal-case tracking-normal`,children:e})]}),(0,A.jsx)(`div`,{className:`w-full overflow-hidden`,children:(0,A.jsx)(`pre`,{className:j(`w-full max-w-full min-w-0 max-h-64 overflow-x-auto overflow-y-auto px-2.5 py-2 font-mono text-[12px] leading-relaxed whitespace-pre custom-scrollbar`,r.body),children:n})})]})}var RV={running:{text:`text-muted-foreground`,icon:ke,spin:!0},success:{text:`text-muted-foreground/75`,icon:h,spin:!1},error:{text:`text-destructive`,icon:kt,spin:!1},cancelled:{text:`text-muted-foreground/70`,icon:vt,spin:!1}};function zV({card:e,iconOnly:t=!1}){let n=RV[e.statusTone]||RV.cancelled,r=n.icon,i=!t&&(e.statusTone===`running`||e.statusTone===`error`);return(0,A.jsxs)(`span`,{className:j(`inline-flex shrink-0 items-center gap-1 text-[0.925rem] font-normal leading-[1.72]`,n.text),"aria-label":t?e.statusLabel:void 0,children:[(0,A.jsx)(r,{"aria-hidden":`true`,className:j(`h-[1.05em] w-[1.05em]`,n.spin&&`animate-spin`),strokeWidth:2.25}),i?e.statusLabel:null]})}function BV(e){return e.kind===`show-content`?{icon:Ee,label:e.label,toneClassName:`border-border/70 bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:ring-primary/35`}:{icon:Ie,label:e.label??(e.sessionKind===`child`?`Open child session`:`Open session`),toneClassName:`border-border/70 bg-transparent text-muted-foreground hover:bg-muted/60 hover:text-foreground focus-visible:ring-primary/35`}}function VV({action:e,onAction:t}){let{Tooltip:n,TooltipContent:r,TooltipProvider:i,TooltipTrigger:a}=Ki,o=BV(e),s=o.icon;return(0,A.jsx)(i,{delayDuration:250,children:(0,A.jsxs)(n,{children:[(0,A.jsx)(a,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),t(e)},className:j(`inline-flex h-6 w-6 items-center justify-center rounded-md border transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1`,o.toneClassName),"aria-label":o.label,title:o.label,children:(0,A.jsx)(s,{className:`h-3.5 w-3.5`,strokeWidth:2.25})})}),(0,A.jsx)(r,{side:`top`,className:`text-xs`,children:o.label})]})})}function HV(e){return e.replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim()}function UV(e,t){e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t())}function WV({label:e,summary:t}){return(0,A.jsxs)(`span`,{className:`min-w-0 shrink truncate`,children:[e,t?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:`mx-1.5 select-none text-muted-foreground/45`,children:`·`}),(0,A.jsx)(`span`,{title:t,children:t})]}):null]})}function GV({expanded:e}){return(0,A.jsx)(`span`,{className:j(`inline-flex h-[1.15em] w-[1.15em] shrink-0 items-center justify-center text-muted-foreground/80 transition-opacity`,e?`opacity-100`:`opacity-0 group-hover/process-row:opacity-100 group-focus-within/process-row:opacity-100`),children:(0,A.jsx)(We,{className:j(`h-[1.05em] w-[1.05em] transition-transform duration-200 motion-reduce:transition-none`,e&&`rotate-90`),strokeWidth:2.25})})}function KV({additions:e,deletions:t}){if(e===0&&t===0)return null;let n=[e>0?`+${e}`:null,t>0?`-${t}`:null].filter(Boolean).join(` `);return(0,A.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1.5 tabular-nums text-muted-foreground/75`,"aria-label":n,children:[e>0?(0,A.jsxs)(`span`,{className:`transition-colors group-hover/process-row:text-emerald-600`,children:[`+`,e]}):null,t>0?(0,A.jsxs)(`span`,{className:`transition-colors group-hover/process-row:text-rose-600`,children:[`-`,t]}):null]})}function qV({card:e,toolLabel:t,changeSummary:n,icon:r,expanded:i,canExpand:a,hideSummary:o=!1,trailingMeta:s,actionSlot:c,onToggle:l}){let u=o?``:e.summary?.replace(/^(command|path|args|query|input):\s*/i,``)??``,d=t??HV(e.toolName);return(0,A.jsxs)(jV,{interactive:a,onClick:a?()=>l():void 0,role:a?`button`:void 0,"aria-expanded":i,tabIndex:a?0:void 0,onKeyDown:a?e=>UV(e,l):void 0,children:[(0,A.jsx)(kV,{className:`relative z-[1] rounded-sm bg-card`,children:(0,A.jsx)(r,{className:`h-[1.05em] w-[1.05em]`,strokeWidth:2.25})}),(0,A.jsx)(WV,{label:d,summary:u}),n?(0,A.jsx)(KV,{...n}):null,(0,A.jsx)(zV,{card:e,iconOnly:!!t}),s,a?(0,A.jsx)(GV,{expanded:i}):null,c?(0,A.jsx)(`span`,{className:`inline-flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover/process-row:opacity-100 group-focus-within/process-row:opacity-100`,children:c}):null]})}function JV({action:e,onAction:t}){return(0,A.jsx)(VV,{action:e,onAction:t})}var YV=`font-mono text-[11px] leading-5`,XV=`flex h-5 w-full ${YV}`,ZV=`flex h-5 items-center justify-center px-2.5 tabular-nums select-none`;function QV(e){return String(e.newLineNumber??e.oldLineNumber??``)}function $V(e,t){return typeof t==`number`&&(e.newLineNumber??e.oldLineNumber)===t}function eH(e,t,n){return`${e}-${n}-${t.oldLineNumber??`x`}-${t.newLineNumber??`x`}`}function tH(e){return typeof e.newLineNumber==`number`||typeof e.oldLineNumber==`number`}function nH(e){return e.lines.some(tH)}function rH(e){let t=e.lines.reduce((e,t)=>tH(t)?Math.max(e,QV(t).length):e,0);return`${Math.max(6,Math.min(7.5,t+3))}ch`}function iH(e){return`calc(${e.lines.reduce((e,t)=>Math.max(e,Math.max(1,t.text.length)),1)}ch + 1.25rem)`}function aH(e){let t=e.split(/[\\/]/).filter(Boolean).pop()??e,n=t.split(/[?#]/)[0]??t,r=n.lastIndexOf(`.`);return r<=0||r===n.length-1?null:n.slice(r+1).toLowerCase()}function oH(e){return e.languageHint?.trim()||aH(e.path)||`text`}function sH(e){let t=e.toLowerCase().replace(/[^a-z0-9-]/g,`-`);return t?`language-${t}`:`language-text`}function cH(e){return e.kind===`remove`?`border-r border-rose-200 bg-rose-50 text-rose-700`:e.kind===`add`?`border-r border-emerald-200 bg-emerald-50 text-emerald-700`:`border-r border-border bg-muted text-muted-foreground`}function lH(e){return e.kind===`remove`?`bg-rose-50 text-rose-950`:e.kind===`add`?`bg-emerald-50 text-emerald-950`:`bg-card text-foreground`}function uH({layout:e,line:t,lineNumberColumnWidth:n,target:r,targetRef:i}){return(0,A.jsx)(`span`,{ref:i,"data-file-line-number-cell":`true`,style:e===`compact`?{width:n,minWidth:n}:void 0,className:j(ZV,e===`compact`?`sticky left-0 z-[1]`:`w-full shrink-0`,cH(t),r?`bg-gray-200 font-medium text-gray-950`:null),children:QV(t)})}function dH({language:e,line:t,target:n,targetColumn:r,targetRef:i}){let a=(0,k.useMemo)(()=>rz.highlight(t.text||` `,e),[e,t.text]),o=typeof r==`number`&&Number.isSafeInteger(r)&&r>0?Math.min(r,t.text.length+1):null;return(0,A.jsxs)(`span`,{ref:o?void 0:i,"data-file-code-row":`true`,"data-file-code-language":a.language,"data-highlighted":a.highlighted?`true`:`false`,"data-file-target-column":o??void 0,className:j(`chat-file-code-syntax hljs relative block min-w-0 flex-1 whitespace-pre px-2.5`,sH(a.language),lH(t),n?`bg-gray-100/90`:null),children:[(0,A.jsx)(`span`,{dangerouslySetInnerHTML:{__html:a.html}}),o?(0,A.jsx)(`span`,{ref:i,"aria-hidden":`true`,"data-file-target-caret":`true`,className:`pointer-events-none absolute inset-y-0 w-px bg-primary`,style:{left:`calc(0.625rem + ${o-1}ch)`}}):null]})}function fH({language:e,line:t,showLineNumbers:n,lineNumberColumnWidth:r}){return(0,A.jsxs)(`div`,{"data-file-line-row":`true`,className:XV,children:[n?(0,A.jsx)(uH,{layout:`compact`,line:t,lineNumberColumnWidth:r}):null,(0,A.jsx)(dH,{language:e,line:t})]})}function pH({block:e,targetColumn:t,targetLine:n}){let r=nH(e),i=rH(e),a=iH(e),o=oH(e),s=(0,k.useRef)(null);return(0,k.useLayoutEffect)(()=>{s.current?.scrollIntoView({block:`center`,inline:t?`center`:`nearest`})},[e,t,n]),(0,A.jsxs)(`div`,{"data-file-code-surface":`true`,"data-file-code-surface-layout":`workspace`,className:`flex h-full min-h-full min-w-full bg-card`,children:[r?(0,A.jsxs)(`div`,{"data-file-code-gutter":`true`,style:{width:i,minWidth:i},className:j(`flex h-full min-h-full shrink-0 flex-col`,YV),children:[e.lines.map((e,r)=>(0,A.jsx)(uH,{layout:`workspace`,line:e,lineNumberColumnWidth:i,target:$V(e,n),targetRef:!t&&$V(e,n)?s:void 0},eH(`gutter`,e,r))),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 border-r border-border bg-muted`})]}):null,(0,A.jsxs)(`div`,{"data-file-code-canvas":`true`,className:`flex h-full min-h-full min-w-0 flex-1 flex-col bg-card`,children:[(0,A.jsx)(`div`,{"data-file-code-stack":`true`,className:`min-w-full`,style:{minWidth:a},children:e.lines.map((e,i)=>{let a=$V(e,n);return(0,A.jsx)(`div`,{"data-file-code-canvas-row":`true`,"data-file-target-line":a?`true`:void 0,"aria-current":a?`location`:void 0,className:XV,children:(0,A.jsx)(dH,{language:o,line:e,target:a,targetColumn:a?t:null,targetRef:a&&(t||!r)?s:void 0})},eH(`code`,e,i))})}),(0,A.jsx)(`div`,{className:`min-h-0 flex-1 bg-card`})]})]})}function mH({block:e,layout:t=`compact`,targetColumn:n,targetLine:r}){if(t===`workspace`)return(0,A.jsx)(pH,{block:e,targetColumn:n,targetLine:r});let i=nH(e),a=rH(e),o=iH(e),s=i?`calc(${a} + ${o})`:o,c=oH(e);return(0,A.jsx)(`div`,{"data-file-code-surface":`true`,"data-file-code-surface-layout":`compact`,className:`overflow-x-auto custom-scrollbar bg-card`,children:(0,A.jsx)(`div`,{"data-file-code-stack":`true`,className:`min-w-full`,style:{minWidth:s},children:e.lines.map((e,t)=>(0,A.jsx)(fH,{language:c,line:e,showLineNumbers:i,lineNumberColumnWidth:a},eH(`row`,e,t)))})})}function hH({block:e}){return(0,A.jsx)(mH,{block:e,layout:`compact`})}function gH(e){return e.display===`preview`}function _H(e){return e.rawText?e.rawText:e.lines.map(e=>[e.kind,e.oldLineNumber??``,e.newLineNumber??``,e.text].join(`:`)).join(`
170
+ `)}function vH(e){return/^\+\d+$/.test(e)?`text-emerald-700`:/^-\d+$/.test(e)?`text-rose-700`:`text-muted-foreground`}function yH(e){let t=e.split(`·`).map(e=>e.trim()).filter(e=>/^\+\d+$/.test(e)||/^-\d+$/.test(e));return t.length===0?null:(0,A.jsx)(`div`,{className:`flex shrink-0 items-center gap-x-1 whitespace-nowrap text-[10px] font-medium uppercase tracking-[0.08em]`,children:t.map((e,t)=>(0,A.jsxs)(k.Fragment,{children:[t>0?(0,A.jsx)(`span`,{className:`text-muted-foreground/45`,children:`·`}):null,(0,A.jsx)(`span`,{className:j(vH(e)),children:e})]},`${e}-${t}`))})}function bH(e){return{path:e.path,label:e.path.split(`/`).filter(Boolean).pop()??e.path,viewMode:e.display===`diff`?`diff`:`preview`,...e.rawText?{rawText:e.rawText}:{},...e.beforeText?{beforeText:e.beforeText}:{},...e.afterText?{afterText:e.afterText}:{},...e.patchText?{patchText:e.patchText}:{},...typeof e.oldStartLine==`number`?{oldStartLine:e.oldStartLine}:{},...typeof e.newStartLine==`number`?{newStartLine:e.newStartLine}:{},fullLines:e.fullLines??e.lines}}function xH({children:e,contentVersion:t,resetKey:n,className:r,scrollKind:i}){let a=(0,k.useRef)(null),{onScroll:o}=EV({scrollRef:a,resetKey:n,isLoading:!1,hasContent:!0,contentVersion:t,stickyThresholdPx:20});return(0,A.jsx)(`div`,{ref:a,onScroll:o,"data-file-scroll-kind":i,className:j(`overflow-y-auto bg-card custom-scrollbar`,r),children:e})}function SH({block:e,showPathRow:t,isFirst:n,onFileOpen:r}){let{Tooltip:i,TooltipContent:a,TooltipProvider:o,TooltipTrigger:s}=Ki,c=gH(e),l=t||!!e.caption;return(0,A.jsxs)(`section`,{className:j(`overflow-hidden bg-card`,!n&&`border-t border-border`),children:[l?(0,A.jsxs)(`div`,{className:j(`flex min-h-9 items-center justify-between gap-4 border-b border-border px-3 text-muted-foreground`,t?`py-2`:`py-1.5`),children:[(0,A.jsx)(`div`,{className:`min-w-0 flex-1`,children:t?(0,A.jsx)(o,{delayDuration:250,children:(0,A.jsxs)(i,{children:[(0,A.jsx)(s,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:()=>{r&&r(bH(e))},className:j(`w-full truncate whitespace-nowrap text-left font-mono text-[12px] font-medium leading-5 text-foreground`,r&&`transition-colors hover:text-primary hover:underline`),title:e.path,children:e.path})}),(0,A.jsx)(a,{side:`top`,className:`max-w-[420px] text-xs font-mono break-all`,children:e.path})]})}):null}),e.caption?yH(e.caption):null]}):null,e.lines.length>0?(0,A.jsx)(xH,{resetKey:`block:${e.key}`,contentVersion:_H(e),className:`max-h-72`,scrollKind:`block`,children:(0,A.jsx)(hH,{block:e})}):e.rawText?(0,A.jsx)(xH,{resetKey:`raw:${e.key}`,contentVersion:e.rawText,className:`max-h-72`,scrollKind:`raw`,children:(0,A.jsx)(`div`,{className:`overflow-x-auto custom-scrollbar`,children:(0,A.jsx)(`pre`,{className:`min-w-max whitespace-pre bg-card px-3 py-2 font-mono text-[11px] leading-5 text-foreground`,children:e.rawText})})}):null,e.truncated&&!c?(0,A.jsx)(`div`,{className:`border-t border-border bg-muted px-3 py-2 text-[10px] text-muted-foreground`,children:`Showing a shortened diff preview.`}):null]})}function CH({card:e,className:t,onFileOpen:n,showPathRow:r=!0}){let i=e.fileOperation?.blocks??[],a=e.output?.trim()??``;return i.length===0&&!a?null:(0,A.jsxs)(`div`,{className:j(`overflow-hidden rounded-md border border-border/70 bg-card`,t),children:[i.map((e,t)=>(0,A.jsx)(SH,{block:e,showPathRow:r,isFirst:t===0,onFileOpen:n},e.key)),a?(0,A.jsx)(xH,{resetKey:`output:${e.toolName}:${e.summary??`none`}`,contentVersion:a,className:j(`max-h-56`,i.length>0&&`border-t border-border`),scrollKind:`output`,children:(0,A.jsx)(`div`,{className:`overflow-x-auto custom-scrollbar`,children:(0,A.jsx)(`pre`,{className:`min-w-max whitespace-pre bg-card px-3 py-2 font-mono text-[11px] leading-5 text-foreground`,children:a})})}):null]})}function wH(e){if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null}function TH(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:null}function EH(e){let t=TH(e?.durationMs);if(t!=null)return t;let n=wH(e?.startedAt),r=wH(e?.endedAt);return n!=null&&r!=null&&r>=n?r-n:null}function DH(e){let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${String(r).padStart(2,`0`)}m ${String(i).padStart(2,`0`)}s`:r>0?`${r}m ${String(i).padStart(2,`0`)}s`:`${i}s`}function OH(e){return!Number.isFinite(e)||e<0?null:DH(e)}function kH(e){return!Number.isFinite(e)||e<0?null:e<1e3?`${Math.round(e)}ms`:e<6e4?`${Number((e/1e3).toFixed(2))}s`:DH(e)}function AH(){return globalThis.performance?.now()??Date.now()}function jH(e){return Math.max(0,e.baselineMs+AH()-e.monotonicStartedAt)}function MH(e,t){let n=wH(e?.startedAt),r=TH(e?.durationMs)!=null||e?.endedAt!=null,i=t&&n!=null&&!r,[a,o]=(0,k.useState)(null);return(0,k.useEffect)(()=>{if(!i||n==null||!e?.startedAt){o(null);return}let t={key:e.startedAt,baselineMs:Math.max(0,Date.now()-n),monotonicStartedAt:AH()};o({key:t.key,elapsedMs:jH(t)});let r,a=()=>{if(document.visibilityState===`hidden`)return;let e=jH(t),n=Math.max(50,1e3-e%1e3);r=setTimeout(()=>{o({key:t.key,elapsedMs:jH(t)}),a()},n)},s=()=>{r&&clearTimeout(r),r=void 0,document.visibilityState!==`hidden`&&(o({key:t.key,elapsedMs:jH(t)}),a())};return document.addEventListener(`visibilitychange`,s),a(),()=>{r&&clearTimeout(r),document.removeEventListener(`visibilitychange`,s)}},[i,e?.startedAt,n]),!i||!e?.startedAt?null:a?.key===e.startedAt?a.elapsedMs:null}function NH({execution:e,statusTone:t}){let n=EH(e),r=MH(e,t===`running`&&n==null),i=n==null?r==null?null:OH(r):kH(n);return i?(0,A.jsx)(`span`,{className:`inline-flex shrink-0 tabular-nums text-muted-foreground/75`,children:i}):null}var PH=`\x1B`,FH=RegExp(`${PH}\\[(.*?)([ -/]*[@-~])`,`g`);function IH(e){return e.includes(`${PH}[`)}function LH(e){return e.replace(RegExp(`${PH}\\[[0-?]*[ -/]*[@-~]`,`g`),``)}function RH(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}var zH={bold:!1,dim:!1,italic:!1,underline:!1,inverse:!1},BH={1:{bold:!0},2:{dim:!0},3:{italic:!0},4:{underline:!0},7:{inverse:!0},22:{bold:!1,dim:!1},23:{italic:!1},24:{underline:!1},27:{inverse:!1},39:{fg:void 0},49:{bg:void 0}},VH={30:`black`,31:`red`,32:`green`,33:`yellow`,34:`blue`,35:`magenta`,36:`cyan`,37:`white`,90:`bright-black`,91:`bright-red`,92:`bright-green`,93:`bright-yellow`,94:`bright-blue`,95:`bright-magenta`,96:`bright-cyan`,97:`bright-white`},HH={40:`black`,41:`red`,42:`green`,43:`yellow`,44:`blue`,45:`magenta`,46:`cyan`,47:`white`,100:`bright-black`,101:`bright-red`,102:`bright-green`,103:`bright-yellow`,104:`bright-blue`,105:`bright-magenta`,106:`bright-cyan`,107:`bright-white`};function UH(e,t){let n=e[t+1];return n===5&&typeof e[t+2]==`number`?{color:`ansi-256-${e[t+2]}`,consumed:2}:n===2&&typeof e[t+2]==`number`&&typeof e[t+3]==`number`&&typeof e[t+4]==`number`?{color:`rgb(${e[t+2]},${e[t+3]},${e[t+4]})`,consumed:4}:null}function WH(e,t){let n={...e};for(let e=0;e<t.length;e+=1){let r=t[e];if(r===0)return{...zH};let i=BH[r];if(i){n={...n,...i};continue}if(r===38||r===48){let i=UH(t,e);i&&(n=r===38?{...n,fg:i.color}:{...n,bg:i.color},e+=i.consumed);continue}if(VH[r]){n={...n,fg:VH[r]};continue}HH[r]&&(n={...n,bg:HH[r]})}return n}function GH(e){let t=[`ansi`];return e.bold&&t.push(`ansi-bold`),e.dim&&t.push(`ansi-dim`),e.italic&&t.push(`ansi-italic`),e.underline&&t.push(`ansi-underline`),e.inverse&&t.push(`ansi-inverse`),e.fg&&(e.fg.startsWith(`rgb(`)?t.push(`ansi-fg-custom`):e.fg.startsWith(`ansi-256-`)?(t.push(`ansi-fg-256`),t.push(e.fg)):t.push(`ansi-fg-${e.fg}`)),e.bg&&(e.bg.startsWith(`rgb(`)?t.push(`ansi-bg-custom`):e.bg.startsWith(`ansi-256-`)?(t.push(`ansi-bg-256`),t.push(e.bg)):t.push(`ansi-bg-${e.bg}`)),t.join(` `)}function KH(e){let t=[];return e.fg?.startsWith(`rgb(`)&&t.push(`color:${e.fg}`),e.bg?.startsWith(`rgb(`)&&t.push(`background-color:${e.bg}`),t.length>0?t.join(`;`):void 0}function qH(e){let t=GH(e),n=KH(e);return n?`<span class="${t}" style="${n}">`:`<span class="${t}">`}function JH(e){if(!e)return``;if(!IH(e))return RH(e);let t=``,n=0,r={...zH},i=!1,a=e=>{e&&(i||=(t+=qH(r),!0),t+=RH(e))},o=()=>{i&&=(t+=`</span>`,!1)};return e.replace(FH,(t,i,s,c)=>{if(a(e.slice(n,c)),n=c+t.length,s!==`m`)return t;let l=i.trim().length===0?[0]:i.split(`;`).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e));return o(),r=WH(r,l.length>0?l:[0]),t}),a(e.slice(n)),o(),t}var YH=12e4;function XH(e){return e.length<=YH?e:`${e.slice(0,YH)}\n…`}function ZH({code:e,language:t,preferAnsi:n=!1,className:r}){let i=XH(e),a=(0,k.useMemo)(()=>{if(n&&IH(i))return{html:JH(i),language:`ansi`,highlighted:!0};let e=LH(i);return rz.highlight(e,t)},[t,n,i]);return(0,A.jsx)(`code`,{className:j(`hljs chat-terminal-code`,`language-${a.language}`,r),"data-highlighted":a.highlighted?`true`:`false`,dangerouslySetInnerHTML:{__html:a.html}})}function QH({command:e,output:t,emptyLabel:n,isRunning:r,hasOutput:i,isError:a=!1}){return(0,A.jsx)(`div`,{className:j(`chat-terminal-surface`,a?`chat-terminal-surface-error`:void 0),"data-testid":`chat-terminal-surface`,children:(0,A.jsxs)(`div`,{className:`chat-terminal-body custom-scrollbar`,children:[(0,A.jsxs)(`div`,{className:`chat-terminal-line chat-terminal-line-command`,children:[(0,A.jsx)(`span`,{className:`chat-terminal-gutter`,"aria-hidden":`true`,children:`$`}),(0,A.jsx)(`div`,{className:`chat-terminal-line-content`,children:e?(0,A.jsxs)(`pre`,{className:`chat-terminal-pre`,children:[(0,A.jsx)(ZH,{code:e,language:`bash`}),r&&!i?(0,A.jsx)(`span`,{className:`chat-terminal-caret`,"aria-hidden":`true`}):null]}):(0,A.jsx)(`div`,{className:`chat-terminal-skeleton`})})]}),(i||!r)&&(0,A.jsx)(`div`,{className:`chat-terminal-output-block`,children:i?(0,A.jsxs)(`pre`,{className:j(`chat-terminal-pre chat-terminal-output`,a?`chat-terminal-pre-error`:void 0),children:[(0,A.jsx)(ZH,{code:t,language:a?`text`:`shell`,preferAnsi:!0,className:a?`chat-terminal-code-error`:void 0}),r?(0,A.jsx)(`span`,{className:`chat-terminal-caret`,"aria-hidden":`true`}):null]}):(0,A.jsx)(`div`,{className:`chat-terminal-empty`,children:n})})]})})}var $H=200;function eU(e){return typeof e==`string`&&e.length>0?e:null}function tU(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function nU(e,t){if(e?.trim())return e.trim();if(t==null)return``;if(typeof t==`string`)return t.trim();if(typeof t==`number`||typeof t==`boolean`)return String(t);try{return JSON.stringify(t,null,2)}catch{return String(t)}}function rU(e){return`command`in e||`workingDir`in e||`exitCode`in e||`durationMs`in e||`stdout`in e||`stderr`in e||`aggregated_output`in e||`combinedOutput`in e}function iU(e){let t=eU(e.aggregated_output)??eU(e.combinedOutput)??eU(e.output);if(t)return t;let n=eU(e.stdout),r=eU(e.stderr);return!n&&!r?null:[n,r].filter(e=>!!e).join(`
171
+ `)}function aU(e,t){if(tU(t)){let e=iU(t);if(e)return e;if(rU(t))return``}if(!e)return``;let n=e.trim();if(!n.startsWith(`{`))return e;try{let t=JSON.parse(n);return tU(t)?iU(t)||(rU(t)?``:e):e}catch{return e}}function oU(e){return e===`write_file`||e===`edit_file`}function sU(e){return e.reduce((e,t)=>({additions:e.additions+t.lines.filter(e=>e.kind===`add`).length,deletions:e.deletions+t.lines.filter(e=>e.kind===`remove`).length}),{additions:0,deletions:0})}function cU({canExpand:e,isRunning:t,autoExpandWhileRunning:n=!0}){let[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(!1),[s,c]=(0,k.useState)(t),l=(0,k.useRef)(null),u=(0,k.useRef)(t),d=(0,k.useRef)(!0);return s!==t&&(c(t),!t&&!a&&i(!1)),(0,k.useEffect)(()=>()=>{l.current!==null&&window.clearTimeout(l.current)},[]),(0,k.useEffect)(()=>{n&&t&&e&&!a&&!r&&(d.current||!u.current)&&(l.current=window.setTimeout(()=>{i(!0),l.current=null},$H)),t||l.current!==null&&(window.clearTimeout(l.current),l.current=null),u.current=t,d.current=!1},[n,e,r,a,t]),{expanded:r,onToggle:()=>{e&&(l.current!==null&&(window.clearTimeout(l.current),l.current=null),i(e=>!e),o(!0))}}}function lU(e){return tU(e)?{exitCode:typeof e.exitCode==`number`?e.exitCode:typeof e.exit_code==`number`?e.exit_code:null,workingDir:eU(e.workingDir)??eU(e.cwd)??eU(e.working_directory)}:{}}function uU({card:e,toolLabel:t}){let n=e.statusTone===`running`,r=e.summary?.replace(/^(command|path|args|query|input):\s*/i,``),i=lU(e.outputData),a=tU(e.outputData)&&rU(e.outputData),o=aU(e.output,e.outputData)||(a?``:nU(void 0,e.outputData)),s=!!o,c=n||s||a||!!r?.trim(),{expanded:l,onToggle:u}=cU({canExpand:c,isRunning:n,autoExpandWhileRunning:!1});return(0,A.jsxs)(FV,{children:[(0,A.jsx)(qV,{card:e,toolLabel:t,icon:Dt,expanded:l,canExpand:c,trailingMeta:(0,A.jsx)(NH,{execution:e.execution,statusTone:e.statusTone}),onToggle:u}),(0,A.jsx)(fj,{open:l,children:()=>(0,A.jsx)(IV,{className:`bg-transparent py-0`,children:(0,A.jsx)(QH,{command:r,output:o,emptyLabel:e.emptyLabel,isRunning:n,hasOutput:s,isError:e.statusTone===`error`,exitCode:i.exitCode,workingDir:i.workingDir})})})]})}function dU(e,t){return!!e?.trim()||t!=null}function fU(e){return{previewLineCount:e.reduce((e,t)=>e+t.lines.length,0),previewCharCount:e.reduce((e,t)=>e+(t.rawText?.length??t.lines.reduce((e,t)=>e+t.text.length+1,0)),0)}}function pU(e){return[`edit_file`,`write_file`,`apply_patch`,`file_change`].includes(e)}function mU(e){let{card:t,previewCharCount:n,previewLineCount:r}=e;return oU(t.toolName)?!(t.statusTone===`running`&&t.toolName===`write_file`&&(r>24||n>1200)):!1}function hU({card:e,toolLabel:t,onFileOpen:n}){let r=e.statusTone===`running`,i=!!e.fileOperation?.blocks.length,a=dU(e.input,e.inputData),o=dU(e.output,e.outputData),s=a&&!i,c=i||a||o,l=e.fileOperation?.blocks??[],{previewCharCount:u,previewLineCount:d}=fU(l),f=mU({card:e,previewCharCount:u,previewLineCount:d}),{expanded:p,onToggle:m}=cU({canExpand:c||r,isRunning:r,autoExpandWhileRunning:f}),h=pU(e.toolName);return(0,A.jsxs)(FV,{children:[(0,A.jsx)(qV,{card:e,toolLabel:t,changeSummary:h?sU(l):void 0,icon:h?qe:at,expanded:p,canExpand:c||r,hideSummary:!1,onToggle:m}),(0,A.jsx)(fj,{open:p&&c,children:()=>{let t=nU(e.input,e.inputData),r=nU(e.output,e.outputData);return(0,A.jsxs)(IV,{className:`bg-transparent py-0`,children:[s?(0,A.jsx)(LV,{label:e.inputLabel?.trim()||`Input`,tone:`input`,children:t}):null,s&&r?(0,A.jsx)(`div`,{className:`h-2`}):null,i||r?(0,A.jsx)(CH,{card:r&&!e.output?{...e,output:r}:e,onFileOpen:n,showPathRow:!0}):null]})}})]})}function gU({card:e,toolLabel:t,icon:n=p}){let r=e.statusTone===`running`,i=!!e.output?.trim()||e.outputData!==null&&e.outputData!==void 0,{expanded:a,onToggle:o}=cU({canExpand:i||r,isRunning:r,autoExpandWhileRunning:!1});return(0,A.jsxs)(FV,{children:[(0,A.jsx)(qV,{card:e,toolLabel:t,icon:n,expanded:a,canExpand:i||r,onToggle:o}),(0,A.jsx)(fj,{open:a&&i,children:()=>(0,A.jsx)(IV,{className:`py-0`,children:(0,A.jsx)(`pre`,{className:`font-mono text-[12px] text-muted-foreground whitespace-pre-wrap break-all w-full max-w-full max-h-64 overflow-y-auto overflow-x-hidden min-w-0 custom-scrollbar leading-relaxed`,children:nU(e.output,e.outputData)})})})]})}function _U(e,t,n){let r=e.agentId&&n?n(e.agentId):null,i=e.action&&t?(0,A.jsx)(JV,{action:e.action,onAction:t}):null;return r||i?(0,A.jsxs)(A.Fragment,{children:[r,i]}):void 0}function vU({card:e,toolLabel:t,icon:n=jt,onToolAction:r,renderToolAgent:i}){let a=e.statusTone===`running`,o=!!e.input?.trim()||e.inputData!==null&&e.inputData!==void 0,s=!!e.output?.trim()||e.outputData!==null&&e.outputData!==void 0,c=o||s,l=_U(e,r,i),{expanded:u,onToggle:d}=cU({canExpand:c||a,isRunning:a,autoExpandWhileRunning:!1});return(0,A.jsxs)(FV,{children:[(0,A.jsx)(qV,{card:e,toolLabel:t,icon:n,expanded:u,canExpand:c||a,actionSlot:l,onToggle:d}),(0,A.jsx)(fj,{open:u&&c,children:()=>(0,A.jsxs)(IV,{className:`bg-transparent py-0`,children:[o?(0,A.jsx)(LV,{label:e.inputLabel?.trim()||`Input`,tone:`input`,children:nU(e.input,e.inputData)}):null,o&&s?(0,A.jsx)(`div`,{className:`h-2`}):null,s?(0,A.jsx)(LV,{label:e.outputLabel?.trim()||`Output`,tone:e.statusTone===`error`?`error`:`output`,children:nU(e.output,e.outputData)}):null]})})]})}function yU({card:e,onToolAction:t,renderPanelAppCard:n}){let{panelApp:r}=e;return r&&n?n(r):(0,A.jsx)(vU,{card:e,onToolAction:t})}function bU(e){let t=e.toLowerCase();return t===`exec`||t===`exec_command`||t===`execute_command`||t===`command_execution`||t===`bash`||t===`shell`||t.includes(`run_`)}function xU(e){let t=e.toLowerCase();return t===`read_file`||t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`}function SU(e){let t=e.toLowerCase();return t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`}function CU(e){let t=e.toLowerCase();return t===`grep_search`||t===`find_files`||t.includes(`search`)}var wU={list_dir:{statusKind:`directory`,icon:ut},web_fetch:{statusKind:`web`,icon:Xe},message:{statusKind:`message`,icon:wt},sessions_list:{statusKind:`session`,icon:je},sessions_history:{statusKind:`session`,icon:je},sessions_request:{statusKind:`session`,icon:je},spawn:{statusKind:`agent`,icon:Be},sessions_spawn:{statusKind:`agent`,icon:Be},subagents:{statusKind:`agent`,icon:Be},memory_search:{statusKind:`memory`,icon:Ve},memory_get:{statusKind:`memory`,icon:Ve},cron:{statusKind:`schedule`,icon:He},gateway:{statusKind:`system`,icon:Ae},view_image:{statusKind:`image`,icon:ft},show_file:{statusKind:`display`,icon:Ee},show_url:{statusKind:`display`,icon:Ee},show_panel_app:{statusKind:`display`,icon:Ee},show_content:{statusKind:`display`,icon:Ee}};function TU(e){return wU[e.toLowerCase()]??null}function EU({card:e,toolStatusLabels:t,onToolAction:n,onFileOpen:r,renderToolAgent:i,renderPanelAppCard:a}){if(e.panelApp)return(0,A.jsx)(yU,{card:e,onToolAction:n,renderPanelAppCard:a});let o=TU(e.toolName),s=o?t?.builtIn?.[o.statusKind]?.[e.statusTone]:void 0;return bU(e.toolName)?(0,A.jsx)(uU,{card:e,toolLabel:t?.terminal[e.statusTone]}):xU(e.toolName)?(0,A.jsx)(hU,{card:e,toolLabel:SU(e.toolName)?t?.fileEdit[e.statusTone]:t?.fileRead[e.statusTone],onFileOpen:r}):CU(e.toolName)?(0,A.jsx)(gU,{card:e,toolLabel:s??t?.search[e.statusTone],icon:o?.icon}):(0,A.jsx)(vU,{card:e,toolLabel:s,icon:o?.icon,onToolAction:n,renderToolAgent:i})}function DU({children:e,label:t}){let n=(0,k.useRef)(null),r=(0,k.useRef)(null);return(0,k.useLayoutEffect)(()=>{let e=n.current,t=r.current;if(!e||!t)return;let i=()=>{let t=e.scrollTop>1,n=e.scrollHeight-e.clientHeight-e.scrollTop>1,r=t||n?`linear-gradient(to bottom, ${t?`transparent, black 16px`:`black`}, ${n?`black calc(100% - 16px), transparent`:`black`})`:`none`;e.style.maskImage=r,e.style.webkitMaskImage=r};i(),e.addEventListener(`scroll`,i,{passive:!0});let a=typeof ResizeObserver>`u`?null:new ResizeObserver(i);return a?.observe(e),a?.observe(t),()=>{e.removeEventListener(`scroll`,i),a?.disconnect()}},[]),(0,A.jsx)(`div`,{ref:n,role:`region`,"aria-label":t,tabIndex:0,className:`max-h-[50dvh] overflow-y-auto custom-scrollbar focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border`,children:(0,A.jsx)(`div`,{ref:r,className:`text-[0.925rem] leading-[1.72]`,children:e})})}var OU=40;function kU({group:e,open:t,isUser:n,reasoningCharacterCountTemplates:r,toolStatusLabels:i,showMoreTemplate:a,onToolAction:o,onFileOpen:s,renderToolAgent:c,renderPanelAppCard:l,onOpenChange:u}){let[d,f]=(0,k.useState)(OU);(0,k.useEffect)(()=>{f(OU)},[e.key]);let p=e.parts.filter(e=>e.type===`tool-card`).length>1,m=e.parts.slice(0,d),h=Math.max(0,e.parts.length-m.length),g=Math.min(OU,h),_=(a??`Show next {count} ({remaining} remaining)`).replace(`{count}`,String(g)).replace(`{remaining}`,String(h));return(0,A.jsxs)(`div`,{className:`group/tool-activity`,children:[(0,A.jsx)(MV,{openGroup:`tool-activity`,open:t,icon:At,leadingIconClassName:`bg-card`,label:e.label,onClick:()=>u(!t)}),(0,A.jsx)(fj,{open:t,children:()=>(0,A.jsxs)(DU,{label:e.label,children:[m.map((t,a)=>{let u=a===m.length-1;return(0,A.jsxs)(`div`,{className:`relative min-w-0`,children:[p?(0,A.jsx)(AV,{position:a===0?`first`:u?`last`:`middle`}):null,t.type===`tool-card`?(0,A.jsx)(EU,{card:t.card,toolStatusLabels:i,onToolAction:o,onFileOpen:s,renderToolAgent:c,renderPanelAppCard:l}):(0,A.jsx)(PV,{label:t.label,text:t.text,characterCountTemplates:r,isUser:n,isInProgress:!1})]},t.type===`tool-card`&&t.card.toolCallId?`tool-group-call-${t.card.toolCallId}`:`tool-group-item-${e.startIndex+a}`)}),h>0?(0,A.jsx)(`button`,{type:`button`,className:`ml-6 mt-1 rounded-md px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border`,onClick:()=>f(e=>e+OU),children:_}):null]})})]})}function AU({open:e,state:t,label:n,texts:r,onToggle:i,onRetry:a,children:o}){let s=r.toolPayloadLoadingLabel??`Loading details`,c=r.toolPayloadLoadFailedLabel??`Couldn’t load details. Try again`;return(0,A.jsxs)(`div`,{className:`group/process`,children:[(0,A.jsx)(`div`,{className:`mb-2 border-b border-border/60 pb-2`,children:(0,A.jsx)(MV,{openGroup:`process`,open:e,label:n,onClick:i})}),(0,A.jsx)(fj,{open:e,children:()=>t===`loading`||t===`summary`?(0,A.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`mb-4 space-y-3 py-2 text-sm text-muted-foreground`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(ke,{"aria-hidden":`true`,className:`h-4 w-4 shrink-0 animate-spin motion-reduce:animate-none`}),(0,A.jsx)(`span`,{children:s})]}),(0,A.jsxs)(`div`,{"aria-hidden":`true`,className:`space-y-2 border-l-2 border-border/60 pl-4 motion-safe:animate-pulse`,children:[(0,A.jsx)(`div`,{className:`h-3 w-2/5 rounded bg-muted`}),(0,A.jsx)(`div`,{className:`h-3 w-3/4 rounded bg-muted`}),(0,A.jsx)(`div`,{className:`h-3 w-1/2 rounded bg-muted`})]})]}):t===`error`?(0,A.jsx)(`div`,{role:`alert`,className:`mb-4 py-2 text-sm text-muted-foreground`,children:(0,A.jsx)(`button`,{type:`button`,className:`rounded text-left underline underline-offset-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,onClick:a,children:c})}):o()})]})}var jU=3;function MU(e){return e.type===`tool-card`}function NU(e){return e?.type===`reasoning`||e?.type===`tool-card`&&!e.card.panelApp}function PU(e){let t=e.toLowerCase();return t===`list_dir`?`directory`:t.includes(`show_content`)||t.includes(`panel_app`)||t.includes(`panel`)?`panel`:t===`spawn`||t.includes(`subagent`)||t.includes(`session_request`)||t.includes(`agent`)&&!t.includes(`read`)?`agent`:t.includes(`web_`)||t.includes(`_web`)||t.includes(`url`)||t.includes(`fetch`)||t.includes(`http`)?`web`:t===`grep_search`||t===`find_files`||t===`search_files`||t.includes(`search`)||t.includes(`grep`)?`search`:t===`exec`||t===`exec_command`||t===`execute_command`||t===`command_execution`||t===`bash`||t===`shell`||t===`terminal`||t.includes(`run_`)?`bash`:t===`write_file`||t===`edit_file`||t===`apply_patch`||t===`file_change`||t===`multi_replace`||t.includes(`write_file`)||t.includes(`edit_file`)||t.includes(`apply_patch`)?`edit`:t===`read_file`||t===`read`||t===`view_file`||t.includes(`read_file`)||t.startsWith(`read_`)?`read`:`other`}function FU(e){return e===`error`?0:e===`cancelled`?1:e===`running`?2:3}function IU(e,t,n){if(t!==`read`&&t!==`edit`&&t!==`directory`)return[`call:${n}`];let r=e.fileOperation?.blocks.map(({path:e})=>e.trim()).filter(Boolean),i=e.summary?.replace(/^(path|file):\s*/i,``).trim();return r?.length?r:[i||`call:${n}`]}function LU(e,t){let n=t.segmentTemplates[e.family],r=e.count===1?n.one:n.other.split(`{count}`).join(String(e.count)),i=e.exceptionCounts?.error??(e.tone===`error`?e.count:0),a=e.exceptionCounts?.cancelled??(e.tone===`cancelled`?e.count:0);return i===e.count?`${r} ${t.failedLabel}`:a===e.count?`${r} ${t.cancelledLabel}`:[r,i>0?`${i}/${e.count} ${t.failedLabel}`:null,a>0?`${a}/${e.count} ${t.cancelledLabel}`:null].filter(Boolean).join(` · `)}function RU(e){let t=[],n=new Map;for(let[r,i]of e.entries()){let e=PU(i.toolName),a=IU(i,e,r),o=n.get(e);if(!o){t.push(e),n.set(e,{unitTones:new Map(a.map(e=>[e,i.statusTone]))});continue}a.forEach(e=>o.unitTones.set(e,i.statusTone))}let r=t.map(e=>{let t=n.get(e),r=[...t.unitTones.values()],i=r.reduce((e,t)=>FU(t)<FU(e)?t:e,`success`);return{family:e,count:t.unitTones.size,tone:i,exceptionCounts:{error:r.filter(e=>e===`error`).length,cancelled:r.filter(e=>e===`cancelled`).length}}});return r.sort((e,n)=>{let r=FU(e.tone)-FU(n.tone);return r===0?t.indexOf(e.family)-t.indexOf(n.family):r}),r}function zU(e){let{labels:t,segments:n}=e;if(n.length===0)return``;let r=n.slice(0,jU),i=n.length-r.length,a=r.map(e=>LU(e,t));return i>0&&a.push(`+${i}`),a.join(` · `)}function BU(e,t){let n=[],r=t,i=-1;for(;;){let t=e[r];if(!NU(t))break;n.push(t),t.type===`tool-card`&&(i=n.length-1),r+=1}return{candidateParts:n,lastToolOffset:i}}function VU(e,t){let n=[],r=0;for(;r<e.length;){let i=e[r];if(i.type!==`tool-card`||i.card.panelApp){n.push({kind:`part`,key:`part-${r}`,index:r,part:i}),r+=1;continue}let a=r,{candidateParts:o,lastToolOffset:s}=BU(e,a),c=o.filter(MU);if(c.length===1){n.push({kind:`part`,key:`part-${a}`,index:a,part:i}),r=a+1;continue}let l=o.slice(0,s+1);r=a+l.length;let u=RU(c.map(e=>e.card)),d=zU({segments:u,labels:t});n.push({kind:`tool-group`,key:`tool-group-${a}`,group:{key:`tool-group-${a}`,startIndex:a,endIndex:r-1,parts:l,segments:u,label:d}})}return n}var HU=new Set;function UU(e){let{messageId:t,onRequest:n,state:r}=e,[i,a]=(0,k.useState)(!1),[o,s]=(0,k.useState)(()=>new Set),c=r===void 0||r===`ready`,l=()=>{(r===`summary`||r===`error`)&&n?.(t)};return{handleProcessToggle:()=>{if(i)return a(!1);a(!0),l()},handleToolActivityOpenChange:(e,t)=>{t&&!c&&l(),s(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r}),t&&a(!0)},openToolGroupKeys:c?o:HU,processOpen:i}}var WU={segmentTemplates:{read:{one:`Read 1 file`,other:`Read {count} files`},edit:{one:`Edit 1 file`,other:`Edit {count} files`},directory:{one:`View 1 directory`,other:`View {count} directories`},search:{one:`Search 1 time`,other:`Search {count} times`},bash:{one:`Run 1 command`,other:`Run {count} commands`},web:{one:`Open 1 page`,other:`Open {count} pages`},agent:{one:`Start 1 subtask`,other:`Start {count} subtasks`},panel:{one:`Show 1 result`,other:`Show {count} results`},other:{one:`Use 1 tool`,other:`Use {count} tools`}},failedLabel:`failed`,cancelledLabel:`cancelled`};function GU(e){return{segmentTemplates:{...WU.segmentTemplates,...e.toolActivitySegmentTemplates??{}},failedLabel:e.toolActivityFailedLabel??WU.failedLabel,cancelledLabel:e.toolActivityCancelledLabel??WU.cancelledLabel}}function KU(e){return e.type===`reasoning`||e.type===`tool-card`||e.type===`custom`&&e.process===!0}function qU(e,t){if(e.role!==`assistant`||!e.processSummary||t)return null;let n=-1;for(let t=e.parts.length-1;t>=0;--t)if(KU(e.parts[t])){n=t;break}return n<0||n>=e.parts.length-1?null:{processParts:e.parts.slice(0,n+1),finalParts:e.parts.slice(n+1)}}function JU({index:e,isInProgress:t,isLastPart:n,isUser:r,onAttachmentOpen:i,onFileOpen:a,onInlineTokenClick:o,onToolAction:s,part:c,renderCustomPart:l,renderInlineDisplay:u,renderPanelAppCard:d,renderToolAgent:f,resolveFileContentUrl:p,role:m,texts:h}){let{type:g}=c;if(g===`custom`){let e=l?.(c);return e===void 0?null:(0,A.jsx)(`div`,{className:`min-w-0`,children:e},`custom-${c.customType}-${c.id}`)}if(g===`markdown`){let{inlineTokens:r,text:i}=c;return(0,A.jsx)(IB,{text:i,role:m,texts:h,isStreaming:t&&n,inlineTokens:r,onFileOpen:a,onInlineTokenClick:o,resolveFileContentUrl:p,renderInlineDisplay:u},`markdown-${e}`)}if(g===`reasoning`){let{label:i,text:a}=c;return(0,A.jsx)(PV,{label:i,text:a,characterCountTemplates:h.reasoningCharacterCountTemplates,isUser:r,isInProgress:t&&n},`reasoning-${e}`)}if(g===`tool-card`){let{card:t}=c;return(0,A.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,A.jsx)(AV,{position:`single`}),(0,A.jsx)(EU,{card:t,toolStatusLabels:h.toolStatusLabels,onToolAction:s,onFileOpen:a,renderToolAgent:f,renderPanelAppCard:d})]},`tool-${e}`)}if(g===`file`){let{file:t}=c;return(0,A.jsx)(dV,{file:t,isUser:r,texts:h,onOpen:i},`file-${e}`)}if(g===`unknown`){let{label:t,rawType:n,text:r}=c;return(0,A.jsxs)(`div`,{className:`rounded-lg border border-border bg-muted/60 px-2.5 py-2 text-xs text-muted-foreground`,children:[(0,A.jsxs)(`div`,{className:`font-semibold text-foreground`,children:[t,`: `,n]}),r?(0,A.jsx)(`pre`,{className:`mt-1 whitespace-pre-wrap break-words text-[11px] text-muted-foreground`,children:r}):null]},`unknown-${e}`)}return null}function YU(e){let{isInProgress:t,isUser:n,onAttachmentOpen:r,onFileOpen:i,onInlineTokenClick:a,onToolActivityOpenChange:o,onToolAction:s,openToolGroupKeys:c,parts:l,renderCustomPart:u,renderInlineDisplay:d,renderPanelAppCard:f,renderToolAgent:p,resolveFileContentUrl:m,role:h,texts:g,indexOffset:_=0}=e;return mV(VU(l,GU(g))).map(e=>e.kind===`image-group`?(0,A.jsx)(fV,{group:e,indexOffset:_,isUser:n,texts:g,onOpen:r},`${e.key}-${_}`):e.kind===`tool-group`?(0,A.jsx)(kU,{group:e.group,open:c.has(e.group.key),isUser:n,reasoningCharacterCountTemplates:g.reasoningCharacterCountTemplates,toolStatusLabels:g.toolStatusLabels,showMoreTemplate:g.toolActivityShowMoreTemplate,onToolAction:s,onFileOpen:i,renderToolAgent:p,renderPanelAppCard:f,onOpenChange:t=>o(e.group.key,t)},e.key):JU({part:e.part,index:_+e.index,role:h,isUser:n,isInProgress:t,isLastPart:_+e.index===_+l.length-1,texts:g,onToolAction:s,onFileOpen:i,onAttachmentOpen:r,onInlineTokenClick:a,resolveFileContentUrl:m,renderCustomPart:u,renderInlineDisplay:d,renderToolAgent:p,renderPanelAppCard:f}))}var XU=(0,k.memo)(function({layout:e,message:t,isInProgress:n,texts:r,onToolAction:i,toolPayloadState:a,onToolPayloadRequest:o,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,renderInlineDisplay:u,renderCustomPart:d,renderToolAgent:f,renderPanelAppCard:p,resolveFileContentUrl:m}){let{role:h}=t,g=h===`user`,_=e===`flat`&&!g,v=qU(t,n),{handleProcessToggle:y,handleToolActivityOpenChange:b,openToolGroupKeys:x,processOpen:S}=UU({messageId:t.id,state:a,onRequest:o});return(0,A.jsx)(`div`,{"data-chat-message-surface":_?`flat`:`card`,className:j(`max-w-full has-[[data-chat-message-wide-content=true]]:w-full`,_?`block w-full text-foreground`:`inline-block w-fit rounded-2xl border px-4 shadow-sm`,!_&&(g?`nextclaw-chat-message-user rounded-[1.45rem] border-primary bg-primary py-2.5 text-primary-foreground shadow-none`:h===`assistant`?`border-border bg-card pb-3 pt-4 text-card-foreground`:`border-border bg-muted/45 py-3 text-foreground`)),children:(0,A.jsx)(`div`,{className:`space-y-0`,children:v?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(AU,{open:S,state:a,label:t.processSummary?.label,texts:r,onToggle:y,onRetry:()=>void o?.(t.id),children:()=>YU({parts:v.processParts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p})}),YU({parts:v.finalParts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p,indexOffset:v.processParts.length})]}):YU({parts:t.parts,role:h,isUser:g,isInProgress:n,texts:r,onToolAction:i,onFileOpen:s,onAttachmentOpen:c,onInlineTokenClick:l,resolveFileContentUrl:m,openToolGroupKeys:x,onToolActivityOpenChange:b,renderCustomPart:d,renderInlineDisplay:u,renderToolAgent:f,renderPanelAppCard:p})})})});function ZU({messageText:e,texts:t}){let{copied:n,copy:r}=fR({text:e}),i=n?t.copiedMessageLabel:t.copyMessageLabel,{Tooltip:a,TooltipContent:o,TooltipProvider:s,TooltipTrigger:c}=Ki;return e?(0,A.jsx)(s,{delayDuration:250,children:(0,A.jsxs)(a,{children:[(0,A.jsx)(c,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,onClick:()=>void r(),className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,"aria-label":i,children:n?(0,A.jsx)(h,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ye,{className:`h-3.5 w-3.5`})})}),(0,A.jsx)(o,{side:`top`,className:`text-xs`,children:i})]})}):null}function QU({action:e,onAction:t}){let{Tooltip:n,TooltipContent:r,TooltipProvider:i,TooltipTrigger:a}=Ki;return(0,A.jsx)(i,{delayDuration:250,children:(0,A.jsxs)(n,{children:[(0,A.jsx)(a,{asChild:!0,children:(0,A.jsx)(`button`,{type:`button`,"aria-label":e.label,className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-muted-foreground`,disabled:e.disabled,onClick:()=>t(e),children:e.icon===`edit`?(0,A.jsx)(bt,{className:`h-3.5 w-3.5`}):(0,A.jsx)(Ke,{"data-testid":`chat-continue-message-icon`,className:`h-3.5 w-3.5`})})}),(0,A.jsx)(r,{side:`top`,className:`text-xs`,children:e.label})]})})}function $U({action:e,open:t,onOpenChange:n,restoreFocusRef:r}){let{Dialog:i,DialogContent:a,DialogDescription:o,DialogHeader:s,DialogTitle:c}=Ki;return(0,A.jsx)(i,{open:t,onOpenChange:n,children:(0,A.jsxs)(a,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-xl`,closeLabel:e.dialog.closeLabel,onCloseAutoFocus:e=>{e.preventDefault(),r.current?.focus()},children:[(0,A.jsxs)(s,{className:`space-y-1 pr-8 text-left`,children:[(0,A.jsx)(c,{className:`text-lg font-semibold leading-tight text-foreground`,children:e.dialog.title}),e.dialog.description?(0,A.jsx)(o,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.dialog.description}):null]}),(0,A.jsx)(`dl`,{className:`divide-y divide-border/70 rounded-xl border border-border/80 bg-muted/20 px-4`,children:e.dialog.rows.map(e=>(0,A.jsxs)(`div`,{className:`grid gap-1 py-3 sm:grid-cols-[11rem_minmax(0,1fr)] sm:gap-4`,children:[(0,A.jsx)(`dt`,{className:`text-xs font-medium text-muted-foreground`,children:e.label}),(0,A.jsx)(`dd`,{className:`min-w-0 break-all font-mono text-xs leading-5 text-foreground`,children:e.value})]},e.label))})]})})}function eW({message:e}){let[t,n]=(0,k.useState)(!1),[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(null),s=(0,k.useRef)(null),{moreActions:c}=e,{Popover:l,PopoverContent:u,PopoverTrigger:d,Tooltip:f,TooltipContent:p,TooltipProvider:m,TooltipTrigger:h}=Ki;return c?.items.length?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(l,{open:t,onOpenChange:n,children:[(0,A.jsx)(m,{delayDuration:250,children:(0,A.jsxs)(f,{children:[(0,A.jsx)(h,{asChild:!0,children:(0,A.jsx)(d,{asChild:!0,children:(0,A.jsx)(`button`,{ref:s,type:`button`,"aria-label":c.triggerLabel,className:`flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-[var(--interaction-hover)] hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35`,children:(0,A.jsx)(Ze,{className:`h-3.5 w-3.5`})})})}),(0,A.jsx)(p,{side:`top`,className:`text-xs`,children:c.triggerLabel})]})}),(0,A.jsx)(u,{align:`end`,variant:`menu`,role:`menu`,onCloseAutoFocus:e=>{r&&e.preventDefault()},children:c.items.map(e=>(0,A.jsxs)(`button`,{type:`button`,role:`menuitem`,className:`${bi} text-foreground ${xi.item}`,onClick:()=>{n(!1),o(e),i(!0)},children:[e.icon?(0,A.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground`,children:e.icon}):null,(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label})]},e.key))})]}),a?(0,A.jsx)($U,{action:a,open:r,onOpenChange:i,restoreFocusRef:s}):null]}):null}function tW({message:e,onAction:t,texts:n}){let r=(0,k.useMemo)(()=>e.parts.map(e=>e.type===`markdown`||e.type===`unknown`?e.text:``).filter(e=>!!e?.trim()).join(`
172
172
 
173
- `),[e.parts]);return(0,A.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 [@container_message-list_(max-width:520px)]:[&>button]:min-h-7 [@container_message-list_(max-width:520px)]:[&>button]:min-w-7`,children:[t?e.actions?.map(e=>(0,A.jsx)(YU,{action:e,onAction:t},e.key)):null,(0,A.jsx)(JU,{messageText:r,texts:n}),(0,A.jsx)(ZU,{message:e})]})}var $U=/\u200B|\u200C|\u200D|\u2060|\uFEFF/g,eW=`
173
+ `),[e.parts]);return(0,A.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 [@container_message-list_(max-width:520px)]:[&>button]:min-h-7 [@container_message-list_(max-width:520px)]:[&>button]:min-w-7`,children:[t?e.actions?.map(e=>(0,A.jsx)(QU,{action:e,onAction:t},e.key)):null,(0,A.jsx)(ZU,{messageText:r,texts:n}),(0,A.jsx)(eW,{message:e})]})}var nW=/\u200B|\u200C|\u200D|\u2060|\uFEFF/g,rW=`
174
174
  @keyframes nextclaw-chat-typing-text-sheen {
175
175
  0% {
176
176
  background-position: 160% 0;
@@ -207,4 +207,4 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
207
207
  -webkit-text-fill-color: currentColor;
208
208
  }
209
209
  }
210
- `;function tW(e){let t=e.trim();return t?t.replace($U,``).trim().length>0:!1}function nW(e){return(e.role===`assistant`||e.role===`user`)&&e.status!==`streaming`&&e.status!==`pending`}function rW(e){return e.role!==`user`&&(e.status===`streaming`||e.status===`pending`)}function iW(e,t){return e.role===`user`&&e.status===`pending`?{label:t.pendingInputLabel??`Waiting for the next step`,role:`status`}:{label:`${e.roleLabel} · ${e.timestampLabel}`}}function aW(e){return e.parts.some(e=>e.type===`markdown`||e.type===`reasoning`?tW(e.text):!0)}function oW(e,t){return e===`flat`&&!t}function sW(){return(0,A.jsx)(`div`,{className:`flex items-center gap-2 px-1 py-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsxs)(`div`,{className:`flex space-x-1 items-center h-full`,children:[(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse`}),(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse [animation-delay:200ms]`}),(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse [animation-delay:400ms]`})]})})}function cW({label:e,layout:t}){return(0,A.jsxs)(`div`,{"data-chat-message-surface":t===`flat`?`flat`:`card`,className:j(`text-sm text-muted-foreground`,t===`flat`?`py-1`:`rounded-2xl border border-border bg-card px-4 py-3 shadow-sm`),children:[(0,A.jsx)(`style`,{children:eW}),(0,A.jsx)(`span`,{className:`nextclaw-chat-typing-indicator__text`,children:e})]})}function lW({assistantAvatarIcon:e,showAssistantHeader:t=!0,className:n,isSending:r,layout:i=`card`,messages:a,onAttachmentOpen:o,onFileOpen:s,onInlineTokenClick:c,onMessageAction:l,onToolAction:u,resolveMessageToolPayloadState:d,onMessageToolPayloadRequest:f,renderCustomPart:p,renderInlineDisplay:m,renderMessageContent:h,renderPanelAppCard:g,renderToolAgent:_,resolveFileContentUrl:v,texts:y}){let b=oW(i,t),x=a.filter(aW),S=r?a.findLast(rW):void 0,C=S?aW(S):!1;return(0,A.jsxs)(`div`,{className:j(`nextclaw-message-list space-y-5 [container:message-list/inline-size]`,n),children:[x.map(t=>{let n=t.role===`user`,r=t.id===S?.id,a=iW(t,y),x=nW(t),C=(0,A.jsx)(qU,{layout:i,message:t,isInProgress:r,texts:y,onToolAction:u,toolPayloadState:d?.(t.id),onToolPayloadRequest:f,onFileOpen:s,onAttachmentOpen:o,onInlineTokenClick:c,resolveFileContentUrl:v,renderCustomPart:p,renderInlineDisplay:m,renderToolAgent:_,renderPanelAppCard:g}),w=h?.(t)??C;return i===`flat`&&!n?(0,A.jsxs)(`article`,{"data-chat-message-id":t.id,"data-chat-message-layout":`flat`,"data-chat-message-role":t.role,"data-chat-message-role-label":t.roleLabel,"data-chat-message-selectable":String(x),className:`w-full min-w-0 space-y-2`,children:[(0,A.jsxs)(`div`,{"data-chat-message-header":`flat`,hidden:b,className:j(`flex min-w-0 items-center gap-2.5`,{hidden:b}),children:[(0,A.jsx)(i_,{assistantIcon:e,role:t.role,size:`compact`}),(0,A.jsx)(`span`,{className:`truncate text-sm font-semibold text-foreground`,children:t.roleLabel})]}),(0,A.jsx)(`div`,{"data-chat-message-body":`flat`,className:`min-w-0 w-full`,children:w}),r?(0,A.jsx)(`div`,{className:`w-full`,children:(0,A.jsx)(sW,{})}):(0,A.jsxs)(`div`,{"data-chat-message-footer":`flat`,className:`flex min-w-0 items-center gap-1`,children:[(0,A.jsxs)(`span`,{className:`min-w-0 truncate px-1 text-[11px] leading-4 text-muted-foreground`,title:t.timestampLabel,children:[t.timestampLabel,t.executionSummaryLabel?(0,A.jsxs)(`span`,{className:`[@container_message-list_(max-width:520px)]:hidden`,children:[` · `,t.executionSummaryLabel]}):null]}),(0,A.jsx)(QU,{message:t,onAction:e=>l?.(t,e),texts:y})]})]},t.id):(0,A.jsxs)(`div`,{"data-chat-message-id":t.id,"data-chat-message-layout":`card`,"data-chat-message-role":t.role,"data-chat-message-role-label":t.roleLabel,"data-chat-message-selectable":String(x),className:j(`flex gap-3`,n?`justify-end`:`justify-start`),children:[n?null:(0,A.jsx)(i_,{assistantIcon:e,role:t.role}),(0,A.jsxs)(`div`,{className:j(`w-fit max-w-[92%] space-y-2 has-[[data-chat-message-wide-content=true]]:w-full`,n&&`flex flex-col items-end`),children:[w,(0,A.jsx)(`div`,{className:j(`flex min-w-0 max-w-full items-center gap-1`,n&&`justify-end`),children:r?(0,A.jsx)(sW,{}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{role:a.role,className:j(`min-w-0 truncate px-1 text-[11px] leading-4 text-muted-foreground`,n?`text-right`:`text-left`),children:[a.label,t.executionSummaryLabel?(0,A.jsxs)(`span`,{className:`[@container_message-list_(max-width:520px)]:hidden`,children:[` · `,t.executionSummaryLabel]}):null]}),(0,A.jsx)(QU,{message:t,onAction:e=>l?.(t,e),texts:y})]})})]}),n?(0,A.jsx)(i_,{role:t.role}):null]},t.id)}),r&&!C?(0,A.jsxs)(`div`,{"data-chat-message-layout":i,className:`flex justify-start gap-3`,children:[(0,A.jsx)(`div`,{hidden:b,className:j({hidden:b}),children:(0,A.jsx)(i_,{assistantIcon:e,role:`assistant`,size:i===`flat`?`compact`:`default`})}),(0,A.jsx)(cW,{label:y.typingLabel,layout:i})]}):null]})}var uW=12,dW=10;function fW(e,t){return t.rangeCount>0&&!t.isCollapsed&&e.contains(t.getRangeAt(0).commonAncestorContainer)}function pW(e){return typeof e.getClientRects==`function`?Array.from(e.getClientRects()).filter(e=>e.width>0||e.height>0):[]}function mW(e){if(e.commonAncestorContainer.nodeType===Node.TEXT_NODE)return pW(e);let t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=[];for(let r=t.nextNode();r;r=t.nextNode()){if(!(r instanceof Text)||!r.data||!e.intersectsNode(r))continue;let t=document.createRange();t.selectNodeContents(r),r===e.startContainer&&t.setStart(r,e.startOffset),r===e.endContainer&&t.setEnd(r,e.endOffset),n.push(...pW(t))}return n}function hW(e){let t=mW(e),n=t.length>0?t:pW(e),r=n.length>0?n:[e.getBoundingClientRect()],i=r.map(e=>({bottom:Math.min(e.bottom,window.innerHeight),left:Math.max(e.left,0),right:Math.min(e.right,window.innerWidth),top:Math.max(e.top,0)})).filter(e=>e.right>e.left&&e.bottom>e.top),a=i.length>0?i:r,o=Math.min(...a.map(e=>e.left)),s=Math.max(...a.map(e=>e.right));return{bottom:Math.max(...a.map(e=>e.bottom)),center:o+(s-o)/2,top:Math.min(...a.map(e=>e.top))}}function gW(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function _W({actionLabel:e,children:t,className:n=`contents`,isSelectionAllowed:r,maxCharacters:i,onAddToChat:a,selectionTooLongLabel:o}){let s=(0,k.useRef)(null),c=(0,k.useRef)(null),l=(0,k.useRef)(!1),u=(0,k.useRef)(null),[d,f]=(0,k.useState)(null),[p,m]=(0,k.useState)(null),h=(0,k.useCallback)(()=>{let e=s.current,t=window.getSelection();if(!e||!t||!fW(e,t)){f(null);return}let n=t.toString().trim();if(!n){f(null);return}let a=t.getRangeAt(0),o=hW(a),c={range:a.cloneRange(),text:n};if(r&&!r(c)){f(null);return}m(null),f({anchorBottom:o.bottom,anchorCenter:o.center,anchorTop:o.top,selection:c,tooLong:n.length>i})},[r,i]),g=(0,k.useCallback)(()=>{u.current!==null&&window.cancelAnimationFrame(u.current),u.current=window.requestAnimationFrame(()=>{u.current=null,h()})},[h]),_=(0,k.useCallback)(e=>{if(c.current=e,!d||!e)return;let t=e.getBoundingClientRect(),n=gW(d.anchorCenter-t.width/2,uW,window.innerWidth-uW-t.width),r=d.anchorBottom+dW,i=d.anchorTop-dW-t.height;m({left:n,top:gW(i>=uW?i:r,uW,window.innerHeight-uW-t.height)})},[d]);return(0,k.useEffect)(()=>{let e=()=>{let e=window.getSelection();if(!e||e.isCollapsed){f(null);return}l.current||g()},t=e=>{let t=s.current;l.current=!!(t&&e.target instanceof Node&&t.contains(e.target)),l.current&&f(null)},n=e=>{if(c.current?.contains(e.target))return;let t=l.current;l.current=!1,t&&g()},r=e=>{e.key===`Escape`&&f(null)},i=()=>f(null);return document.addEventListener(`selectionchange`,e),document.addEventListener(`pointerdown`,t,!0),document.addEventListener(`pointerup`,n,!0),document.addEventListener(`keydown`,r),document.addEventListener(`scroll`,i,!0),window.addEventListener(`resize`,i),()=>{document.removeEventListener(`selectionchange`,e),document.removeEventListener(`pointerdown`,t,!0),document.removeEventListener(`pointerup`,n,!0),document.removeEventListener(`keydown`,r),document.removeEventListener(`scroll`,i,!0),window.removeEventListener(`resize`,i),u.current!==null&&window.cancelAnimationFrame(u.current)}},[g]),(0,A.jsxs)(`div`,{ref:s,className:n,children:[t,d&&a?(0,Ch.createPortal)((0,A.jsxs)(`button`,{ref:_,type:`button`,className:`fixed z-[var(--z-popover,10100)] inline-flex max-w-[calc(100vw-24px)] items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-xl border border-border bg-popover px-3 py-2 text-xs font-medium text-popover-foreground shadow-lg transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:text-muted-foreground`,style:{left:p?.left??0,top:p?.top??0,visibility:p?`visible`:`hidden`},disabled:d.tooLong,onMouseDown:e=>e.preventDefault(),onClick:()=>{d.tooLong||(a(d.selection),window.getSelection()?.removeAllRanges(),f(null))},children:[(0,A.jsx)(gt,{"aria-hidden":`true`,className:`h-3.5 w-3.5 shrink-0`}),(0,A.jsx)(`span`,{className:`truncate`,children:d.tooLong?o:e})]}),document.body):null]})}function vW({item:e}){return(0,A.jsxs)(A.Fragment,{children:[e.icon?(0,A.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground`,children:e.icon}):null,(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.children?(0,A.jsx)(We,{className:`h-4 w-4 shrink-0`}):null]})}function yW({item:e,open:t,onOpenChange:n,onClose:i,className:a,children:o}){let s=(0,k.useRef)(null),c=(0,k.useRef)(null),[l,u]=(0,k.useState)(),d=(0,k.useCallback)(e=>{s.current=e,u(e?.closest(`[data-context-menu-layer]`)??void 0)},[]),f=(0,k.useRef)(),p=(0,k.useRef)(!1),m=()=>clearTimeout(f.current),h=e=>{m(),f.current=setTimeout(()=>n(e),e?100:250)};(0,k.useEffect)(()=>()=>clearTimeout(f.current),[]);let g=()=>{m(),n(!1),s.current?.focus()},_=()=>{m(),p.current=!0,n(!0),c.current?.querySelector(`[role="menuitem"]:not(:disabled)`)?.focus()};return(0,A.jsxs)(mi,{open:t,onOpenChange:n,children:[(0,A.jsx)(gi,{asChild:!0,children:(0,A.jsx)(`button`,{ref:d,type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":t,disabled:e.disabled,"data-menu-key":e.key,className:r(a,t&&`bg-[var(--interaction-hover)]`),onPointerEnter:e=>{e.pointerType!==`touch`&&(p.current=!1,h(!0))},onPointerLeave:()=>h(!1),onClick:e=>{e.preventDefault(),e.stopPropagation(),_()},onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),e.stopPropagation(),_())},children:o})}),(0,A.jsx)(_i,{container:l,children:(0,A.jsx)(vi,{ref:c,role:`menu`,"aria-label":e.label,"data-menu-escape-owner":``,"data-theme-overlay":`menu`,side:`right`,align:`start`,sideOffset:2,collisionPadding:8,className:r(yi,`z-[var(--z-tooltip)]`),style:{minWidth:`min(13rem, var(--radix-popover-content-available-width))`,maxWidth:`min(18rem, var(--radix-popover-content-available-width))`,maxHeight:`var(--radix-popover-content-available-height)`},onPointerEnter:m,onPointerLeave:()=>h(!1),onPointerDown:e=>e.stopPropagation(),onOpenAutoFocus:e=>{p.current||e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onEscapeKeyDown:e=>{e.preventDefault(),g()},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`Escape`)&&(e.preventDefault(),e.stopPropagation(),g())},children:(0,A.jsx)(bW,{groups:e.children,onClose:i})})})]})}function bW({groups:e,onClose:t}){let[n,i]=(0,k.useState)(null),a=(0,k.useRef)(null);return(0,A.jsx)(`div`,{ref:a,"data-menu-level":``,"data-menu-escape-owner":n?``:void 0,onKeyDown:e=>{if(e.target.closest(`[data-menu-level]`)===a.current){if(e.key===`Escape`&&n)e.preventDefault(),e.stopPropagation(),a.current?.querySelector(`[aria-expanded="true"]`)?.focus(),i(null);else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault(),e.stopPropagation();let t=Array.from(a.current?.querySelectorAll(`[role="menuitem"]:not(:disabled)`)??[]).filter(e=>e.closest(`[data-menu-level]`)===a.current),n=t.indexOf(document.activeElement),r=e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length;i(null),t[r]?.focus()}}},children:e.filter(e=>e.items.length).map((e,a)=>(0,A.jsxs)(`div`,{role:`group`,children:[a>0?(0,A.jsx)(`div`,{className:`mx-2 my-1 h-px bg-border/50`}):null,e.items.map(e=>{let a=r(bi,e.destructive?xi.destructive:`text-foreground ${xi.item}`),o=(0,A.jsx)(vW,{item:e});if(e.children)return(0,A.jsx)(yW,{item:e,open:n===e.key,onOpenChange:t=>i(n=>t?e.key:n===e.key?null:n),onClose:t,className:a,children:o},e.key);let s=()=>{e.onSelect?.(),t(e.href?!1:e.restoreFocus!==!1)};return e.href?(0,A.jsx)(`a`,{role:`menuitem`,className:a,href:e.href,download:e.download,onPointerEnter:()=>i(null),onClick:e=>{e.stopPropagation(),s()},children:o},e.key):(0,A.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:e.disabled,"aria-pressed":e.pressed,"data-menu-key":e.key,className:a,onPointerEnter:()=>i(null),onClick:e=>{e.stopPropagation(),s()},children:o},e.key)})]},e.key))})}var xW=(0,k.createContext)(null),SW=8;function CW(e){return!(e.target instanceof Element)||!e.target.closest(`[data-menu-escape-owner]`)?!1:(e.preventDefault(),!0)}function wW({groups:e,label:t,onClose:n,position:i}){let a=(0,k.useRef)(null),o=i.trigger.closest(`[role="dialog"]`)??document.body,s=o!==document.body;return(0,k.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{let t=s?o.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,height:window.innerHeight};e.style.maxHeight=`${Math.max(0,t.height-SW*2)}px`;let n=e.getBoundingClientRect(),r=i.align===`end`?i.x-n.width:i.x,a=Math.max(t.left+SW,Math.min(r,t.right-n.width-SW)),c=Math.max(t.top+SW,Math.min(i.y,t.bottom-n.height-SW));e.style.left=`${a-t.left}px`,e.style.top=`${c-t.top}px`};t(),e.querySelector(`[role="menuitem"]:not(:disabled)`)?.focus();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[i,o,s]),(0,Ch.createPortal)((0,A.jsx)(`div`,{className:r(`pointer-events-auto inset-0 z-[var(--z-tooltip)]`,s?`absolute`:`fixed`),"data-context-menu-layer":``,onContextMenu:e=>e.preventDefault(),onPointerDown:()=>n(!0),children:(0,A.jsx)(`div`,{ref:a,role:`menu`,"data-menu-escape-owner":``,"data-theme-overlay":`menu`,"aria-label":t,className:r(yi,s?`absolute`:`fixed`),style:{left:i.x,top:i.y},onPointerDown:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n(!0))},children:(0,A.jsx)(bW,{groups:e,onClose:n})})}),o)}function TW({children:e,groups:t,label:n}){let[r,i]=(0,k.useState)(null),a=t.filter(e=>e.items.length>0),o=e=>{let t=r?.trigger;i(null),e&&t&&window.setTimeout(()=>t.isConnected&&t.focus(),0)},s=e=>{if(r?.trigger===e){o(!0);return}if(a.length===0)return;let t=e.getBoundingClientRect();i({align:`end`,x:t.right,y:t.bottom,trigger:e})},c=(0,k.cloneElement)(e,{"data-context-menu-open":r?``:void 0,onContextMenu:t=>{if(e.props.onContextMenu?.(t),t.defaultPrevented||a.length===0)return;t.preventDefault();let n=t.currentTarget,r=n.getBoundingClientRect();i({align:`start`,x:t.clientX||r.left,y:t.clientY||r.bottom,trigger:n})}});return(0,A.jsxs)(xW.Provider,{value:{isOpen:!!r,toggleFromButton:s},children:[c,r?(0,A.jsx)(wW,{groups:a,label:n,position:r,onClose:o}):null]})}function EW({children:e}){let t=(0,k.useContext)(xW);if(!t)throw Error(`ContextMenuTrigger must be rendered inside ContextMenu`);return(0,k.cloneElement)(e,{"aria-expanded":t.isOpen,"aria-haspopup":`menu`,onClick:n=>{e.props.onClick?.(n),!n.defaultPrevented&&(n.stopPropagation(),t.toggleFromButton(n.currentTarget))}})}export{vt as $,Ar as A,xn as B,Ir as C,jr as D,Mr as E,Nn as F,kt as G,yn as H,An as I,Ct as J,Et as K,Bn as L,kn as M,Tn as N,kr as O,En as P,yt as Q,Mn as R,gi as S,Fe as St,Fr as T,bn as U,vn as V,jt as W,xt as X,St as Y,bt as Z,yi as _,He as _t,_W as a,ut as at,_i as b,Le as bt,CV as c,at as ct,lj as d,Xe as dt,_t as et,o_ as f,Ye as ft,bi as g,Ue as gt,xi as h,We as ht,bW as i,dt as it,Cn as j,Pr as k,NB as l,tt as lt,Qg as m,Ge as mt,EW as n,ht as nt,lW as o,lt as ot,r_ as p,qe as pt,Tt as q,CW as r,pt as rt,dH as s,st,TW as t,gt as tt,sR as u,Ze as ut,hi as v,Ve as vt,Nr as w,mi as x,Ie as xt,vi as y,Be as yt,Sn as z};
210
+ `;function iW(e){let t=e.trim();return t?t.replace(nW,``).trim().length>0:!1}function aW(e){return(e.role===`assistant`||e.role===`user`)&&e.status!==`streaming`&&e.status!==`pending`}function oW(e){return e.role!==`user`&&(e.status===`streaming`||e.status===`pending`)}function sW(e,t){return e.role===`user`&&e.status===`pending`?{label:t.pendingInputLabel??`Waiting for the next step`,role:`status`}:{label:`${e.roleLabel} · ${e.timestampLabel}`}}function cW(e){return e.parts.some(e=>e.type===`markdown`||e.type===`reasoning`?iW(e.text):!0)}function lW(e,t){return e===`flat`&&!t}function uW(){return(0,A.jsx)(`div`,{className:`flex items-center gap-2 px-1 py-0.5 text-[11px] text-muted-foreground`,children:(0,A.jsxs)(`div`,{className:`flex space-x-1 items-center h-full`,children:[(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse`}),(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse [animation-delay:200ms]`}),(0,A.jsx)(`div`,{className:`h-1.5 w-1.5 rounded-full bg-muted-foreground animate-pulse [animation-delay:400ms]`})]})})}function dW({label:e,layout:t}){return(0,A.jsxs)(`div`,{"data-chat-message-surface":t===`flat`?`flat`:`card`,className:j(`text-sm text-muted-foreground`,t===`flat`?`py-1`:`rounded-2xl border border-border bg-card px-4 py-3 shadow-sm`),children:[(0,A.jsx)(`style`,{children:rW}),(0,A.jsx)(`span`,{className:`nextclaw-chat-typing-indicator__text`,children:e})]})}function fW({assistantAvatarIcon:e,showAssistantHeader:t=!0,className:n,isSending:r,layout:i=`card`,messages:a,onAttachmentOpen:o,onFileOpen:s,onInlineTokenClick:c,onMessageAction:l,onToolAction:u,resolveMessageToolPayloadState:d,onMessageToolPayloadRequest:f,renderCustomPart:p,renderInlineDisplay:m,renderMessageContent:h,renderPanelAppCard:g,renderToolAgent:_,resolveFileContentUrl:v,texts:y}){let b=lW(i,t),x=a.filter(cW),S=r?a.findLast(oW):void 0,C=S?cW(S):!1;return(0,A.jsxs)(`div`,{className:j(`nextclaw-message-list space-y-5 [container:message-list/inline-size]`,n),children:[x.map(t=>{let n=t.role===`user`,r=t.id===S?.id,a=sW(t,y),x=aW(t),C=(0,A.jsx)(XU,{layout:i,message:t,isInProgress:r,texts:y,onToolAction:u,toolPayloadState:d?.(t.id),onToolPayloadRequest:f,onFileOpen:s,onAttachmentOpen:o,onInlineTokenClick:c,resolveFileContentUrl:v,renderCustomPart:p,renderInlineDisplay:m,renderToolAgent:_,renderPanelAppCard:g}),w=h?.(t)??C;return i===`flat`&&!n?(0,A.jsxs)(`article`,{"data-chat-message-id":t.id,"data-chat-message-layout":`flat`,"data-chat-message-role":t.role,"data-chat-message-role-label":t.roleLabel,"data-chat-message-selectable":String(x),className:`w-full min-w-0 space-y-2`,children:[(0,A.jsxs)(`div`,{"data-chat-message-header":`flat`,hidden:b,className:j(`flex min-w-0 items-center gap-2.5`,{hidden:b}),children:[(0,A.jsx)(i_,{assistantIcon:e,role:t.role,size:`compact`}),(0,A.jsx)(`span`,{className:`truncate text-sm font-semibold text-foreground`,children:t.roleLabel})]}),(0,A.jsx)(`div`,{"data-chat-message-body":`flat`,className:`min-w-0 w-full`,children:w}),r?(0,A.jsx)(`div`,{className:`w-full`,children:(0,A.jsx)(uW,{})}):(0,A.jsxs)(`div`,{"data-chat-message-footer":`flat`,className:`flex min-w-0 items-center gap-1`,children:[(0,A.jsxs)(`span`,{className:`min-w-0 truncate px-1 text-[11px] leading-4 text-muted-foreground`,title:t.timestampLabel,children:[t.timestampLabel,t.executionSummaryLabel?(0,A.jsxs)(`span`,{className:`[@container_message-list_(max-width:520px)]:hidden`,children:[` · `,t.executionSummaryLabel]}):null]}),(0,A.jsx)(tW,{message:t,onAction:e=>l?.(t,e),texts:y})]})]},t.id):(0,A.jsxs)(`div`,{"data-chat-message-id":t.id,"data-chat-message-layout":`card`,"data-chat-message-role":t.role,"data-chat-message-role-label":t.roleLabel,"data-chat-message-selectable":String(x),className:j(`flex gap-3`,n?`justify-end`:`justify-start`),children:[n?null:(0,A.jsx)(i_,{assistantIcon:e,role:t.role}),(0,A.jsxs)(`div`,{className:j(`w-fit max-w-[92%] space-y-2 has-[[data-chat-message-wide-content=true]]:w-full`,n&&`flex flex-col items-end`),children:[w,(0,A.jsx)(`div`,{className:j(`flex min-w-0 max-w-full items-center gap-1`,n&&`justify-end`),children:r?(0,A.jsx)(uW,{}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{role:a.role,className:j(`min-w-0 truncate px-1 text-[11px] leading-4 text-muted-foreground`,n?`text-right`:`text-left`),children:[a.label,t.executionSummaryLabel?(0,A.jsxs)(`span`,{className:`[@container_message-list_(max-width:520px)]:hidden`,children:[` · `,t.executionSummaryLabel]}):null]}),(0,A.jsx)(tW,{message:t,onAction:e=>l?.(t,e),texts:y})]})})]}),n?(0,A.jsx)(i_,{role:t.role}):null]},t.id)}),r&&!C?(0,A.jsxs)(`div`,{"data-chat-message-layout":i,className:`flex justify-start gap-3`,children:[(0,A.jsx)(`div`,{hidden:b,className:j({hidden:b}),children:(0,A.jsx)(i_,{assistantIcon:e,role:`assistant`,size:i===`flat`?`compact`:`default`})}),(0,A.jsx)(dW,{label:y.typingLabel,layout:i})]}):null]})}var pW=12,mW=10;function hW(e,t){return t.rangeCount>0&&!t.isCollapsed&&e.contains(t.getRangeAt(0).commonAncestorContainer)}function gW(e){return typeof e.getClientRects==`function`?Array.from(e.getClientRects()).filter(e=>e.width>0||e.height>0):[]}function _W(e){if(e.commonAncestorContainer.nodeType===Node.TEXT_NODE)return gW(e);let t=document.createTreeWalker(e.commonAncestorContainer,NodeFilter.SHOW_TEXT),n=[];for(let r=t.nextNode();r;r=t.nextNode()){if(!(r instanceof Text)||!r.data||!e.intersectsNode(r))continue;let t=document.createRange();t.selectNodeContents(r),r===e.startContainer&&t.setStart(r,e.startOffset),r===e.endContainer&&t.setEnd(r,e.endOffset),n.push(...gW(t))}return n}function vW(e){let t=_W(e),n=t.length>0?t:gW(e),r=n.length>0?n:[e.getBoundingClientRect()],i=r.map(e=>({bottom:Math.min(e.bottom,window.innerHeight),left:Math.max(e.left,0),right:Math.min(e.right,window.innerWidth),top:Math.max(e.top,0)})).filter(e=>e.right>e.left&&e.bottom>e.top),a=i.length>0?i:r,o=Math.min(...a.map(e=>e.left)),s=Math.max(...a.map(e=>e.right));return{bottom:Math.max(...a.map(e=>e.bottom)),center:o+(s-o)/2,top:Math.min(...a.map(e=>e.top))}}function yW(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function bW({actionLabel:e,children:t,className:n=`contents`,isSelectionAllowed:r,maxCharacters:i,onAddToChat:a,selectionTooLongLabel:o}){let s=(0,k.useRef)(null),c=(0,k.useRef)(null),l=(0,k.useRef)(!1),u=(0,k.useRef)(null),[d,f]=(0,k.useState)(null),[p,m]=(0,k.useState)(null),h=(0,k.useCallback)(()=>{let e=s.current,t=window.getSelection();if(!e||!t||!hW(e,t)){f(null);return}let n=t.toString().trim();if(!n){f(null);return}let a=t.getRangeAt(0),o=vW(a),c={range:a.cloneRange(),text:n};if(r&&!r(c)){f(null);return}m(null),f({anchorBottom:o.bottom,anchorCenter:o.center,anchorTop:o.top,selection:c,tooLong:n.length>i})},[r,i]),g=(0,k.useCallback)(()=>{u.current!==null&&window.cancelAnimationFrame(u.current),u.current=window.requestAnimationFrame(()=>{u.current=null,h()})},[h]),_=(0,k.useCallback)(e=>{if(c.current=e,!d||!e)return;let t=e.getBoundingClientRect(),n=yW(d.anchorCenter-t.width/2,pW,window.innerWidth-pW-t.width),r=d.anchorBottom+mW,i=d.anchorTop-mW-t.height;m({left:n,top:yW(i>=pW?i:r,pW,window.innerHeight-pW-t.height)})},[d]);return(0,k.useEffect)(()=>{let e=()=>{let e=window.getSelection();if(!e||e.isCollapsed){f(null);return}l.current||g()},t=e=>{let t=s.current;l.current=!!(t&&e.target instanceof Node&&t.contains(e.target)),l.current&&f(null)},n=e=>{if(c.current?.contains(e.target))return;let t=l.current;l.current=!1,t&&g()},r=e=>{e.key===`Escape`&&f(null)},i=()=>f(null);return document.addEventListener(`selectionchange`,e),document.addEventListener(`pointerdown`,t,!0),document.addEventListener(`pointerup`,n,!0),document.addEventListener(`keydown`,r),document.addEventListener(`scroll`,i,!0),window.addEventListener(`resize`,i),()=>{document.removeEventListener(`selectionchange`,e),document.removeEventListener(`pointerdown`,t,!0),document.removeEventListener(`pointerup`,n,!0),document.removeEventListener(`keydown`,r),document.removeEventListener(`scroll`,i,!0),window.removeEventListener(`resize`,i),u.current!==null&&window.cancelAnimationFrame(u.current)}},[g]),(0,A.jsxs)(`div`,{ref:s,className:n,children:[t,d&&a?(0,Ch.createPortal)((0,A.jsxs)(`button`,{ref:_,type:`button`,className:`fixed z-[var(--z-popover,10100)] inline-flex max-w-[calc(100vw-24px)] items-center gap-1.5 overflow-hidden whitespace-nowrap rounded-xl border border-border bg-popover px-3 py-2 text-xs font-medium text-popover-foreground shadow-lg transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 disabled:cursor-not-allowed disabled:text-muted-foreground`,style:{left:p?.left??0,top:p?.top??0,visibility:p?`visible`:`hidden`},disabled:d.tooLong,onMouseDown:e=>e.preventDefault(),onClick:()=>{d.tooLong||(a(d.selection),window.getSelection()?.removeAllRanges(),f(null))},children:[(0,A.jsx)(gt,{"aria-hidden":`true`,className:`h-3.5 w-3.5 shrink-0`}),(0,A.jsx)(`span`,{className:`truncate`,children:d.tooLong?o:e})]}),document.body):null]})}function xW({item:e}){return(0,A.jsxs)(A.Fragment,{children:[e.icon?(0,A.jsx)(`span`,{className:`inline-flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground`,children:e.icon}):null,(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.children?(0,A.jsx)(We,{className:`h-4 w-4 shrink-0`}):null]})}function SW({item:e,open:t,onOpenChange:n,onClose:i,className:a,children:o}){let s=(0,k.useRef)(null),c=(0,k.useRef)(null),[l,u]=(0,k.useState)(),d=(0,k.useCallback)(e=>{s.current=e,u(e?.closest(`[data-context-menu-layer]`)??void 0)},[]),f=(0,k.useRef)(),p=(0,k.useRef)(!1),m=()=>clearTimeout(f.current),h=e=>{m(),f.current=setTimeout(()=>n(e),e?100:250)};(0,k.useEffect)(()=>()=>clearTimeout(f.current),[]);let g=()=>{m(),n(!1),s.current?.focus()},_=()=>{m(),p.current=!0,n(!0),c.current?.querySelector(`[role="menuitem"]:not(:disabled)`)?.focus()};return(0,A.jsxs)(mi,{open:t,onOpenChange:n,children:[(0,A.jsx)(gi,{asChild:!0,children:(0,A.jsx)(`button`,{ref:d,type:`button`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":t,disabled:e.disabled,"data-menu-key":e.key,className:r(a,t&&`bg-[var(--interaction-hover)]`),onPointerEnter:e=>{e.pointerType!==`touch`&&(p.current=!1,h(!0))},onPointerLeave:()=>h(!1),onClick:e=>{e.preventDefault(),e.stopPropagation(),_()},onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),e.stopPropagation(),_())},children:o})}),(0,A.jsx)(_i,{container:l,children:(0,A.jsx)(vi,{ref:c,role:`menu`,"aria-label":e.label,"data-menu-escape-owner":``,"data-theme-overlay":`menu`,side:`right`,align:`start`,sideOffset:2,collisionPadding:8,className:r(yi,`z-[var(--z-tooltip)]`),style:{minWidth:`min(13rem, var(--radix-popover-content-available-width))`,maxWidth:`min(18rem, var(--radix-popover-content-available-width))`,maxHeight:`var(--radix-popover-content-available-height)`},onPointerEnter:m,onPointerLeave:()=>h(!1),onPointerDown:e=>e.stopPropagation(),onOpenAutoFocus:e=>{p.current||e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onEscapeKeyDown:e=>{e.preventDefault(),g()},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`Escape`)&&(e.preventDefault(),e.stopPropagation(),g())},children:(0,A.jsx)(CW,{groups:e.children,onClose:i})})})]})}function CW({groups:e,onClose:t}){let[n,i]=(0,k.useState)(null),a=(0,k.useRef)(null);return(0,A.jsx)(`div`,{ref:a,"data-menu-level":``,"data-menu-escape-owner":n?``:void 0,onKeyDown:e=>{if(e.target.closest(`[data-menu-level]`)===a.current){if(e.key===`Escape`&&n)e.preventDefault(),e.stopPropagation(),a.current?.querySelector(`[aria-expanded="true"]`)?.focus(),i(null);else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault(),e.stopPropagation();let t=Array.from(a.current?.querySelectorAll(`[role="menuitem"]:not(:disabled)`)??[]).filter(e=>e.closest(`[data-menu-level]`)===a.current),n=t.indexOf(document.activeElement),r=e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length;i(null),t[r]?.focus()}}},children:e.filter(e=>e.items.length).map((e,a)=>(0,A.jsxs)(`div`,{role:`group`,children:[a>0?(0,A.jsx)(`div`,{className:`mx-2 my-1 h-px bg-border/50`}):null,e.items.map(e=>{let a=r(bi,e.destructive?xi.destructive:`text-foreground ${xi.item}`),o=(0,A.jsx)(xW,{item:e});if(e.children)return(0,A.jsx)(SW,{item:e,open:n===e.key,onOpenChange:t=>i(n=>t?e.key:n===e.key?null:n),onClose:t,className:a,children:o},e.key);let s=()=>{e.onSelect?.(),t(e.href?!1:e.restoreFocus!==!1)};return e.href?(0,A.jsx)(`a`,{role:`menuitem`,className:a,href:e.href,download:e.download,target:e.target,rel:e.rel,referrerPolicy:e.referrerPolicy,onPointerEnter:()=>i(null),onClick:e=>{e.stopPropagation(),s()},children:o},e.key):(0,A.jsx)(`button`,{type:`button`,role:`menuitem`,disabled:e.disabled,"aria-pressed":e.pressed,"data-menu-key":e.key,className:a,onPointerEnter:()=>i(null),onClick:e=>{e.stopPropagation(),s()},children:o},e.key)})]},e.key))})}var wW=(0,k.createContext)(null),TW=8;function EW(e){return!(e.target instanceof Element)||!e.target.closest(`[data-menu-escape-owner]`)?!1:(e.preventDefault(),!0)}function DW({groups:e,label:t,onClose:n,position:i}){let a=(0,k.useRef)(null),o=i.trigger.closest(`[role="dialog"]`)??document.body,s=o!==document.body;return(0,k.useLayoutEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{let t=s?o.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,height:window.innerHeight};e.style.maxHeight=`${Math.max(0,t.height-TW*2)}px`;let n=e.getBoundingClientRect(),r=i.align===`end`?i.x-n.width:i.x,a=Math.max(t.left+TW,Math.min(r,t.right-n.width-TW)),c=Math.max(t.top+TW,Math.min(i.y,t.bottom-n.height-TW));e.style.left=`${a-t.left}px`,e.style.top=`${c-t.top}px`};t(),e.querySelector(`[role="menuitem"]:not(:disabled)`)?.focus();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[i,o,s]),(0,Ch.createPortal)((0,A.jsx)(`div`,{className:r(`pointer-events-auto inset-0 z-[var(--z-tooltip)]`,s?`absolute`:`fixed`),"data-context-menu-layer":``,onContextMenu:e=>e.preventDefault(),onPointerDown:()=>n(!0),children:(0,A.jsx)(`div`,{ref:a,role:`menu`,"data-menu-escape-owner":``,"data-theme-overlay":`menu`,"aria-label":t,className:r(yi,s?`absolute`:`fixed`),style:{left:i.x,top:i.y},onPointerDown:e=>e.stopPropagation(),onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n(!0))},children:(0,A.jsx)(CW,{groups:e,onClose:n})})}),o)}function OW({children:e,groups:t,label:n}){let[r,i]=(0,k.useState)(null),a=t.filter(e=>e.items.length>0),o=e=>{let t=r?.trigger;i(null),e&&t&&window.setTimeout(()=>t.isConnected&&t.focus(),0)},s=e=>{if(r?.trigger===e){o(!0);return}if(a.length===0)return;let t=e.getBoundingClientRect();i({align:`end`,x:t.right,y:t.bottom,trigger:e})},c=(0,k.cloneElement)(e,{"data-context-menu-open":r?``:void 0,onContextMenu:t=>{if(e.props.onContextMenu?.(t),t.defaultPrevented||a.length===0)return;t.preventDefault();let n=t.currentTarget,r=n.getBoundingClientRect();i({align:`start`,x:t.clientX||r.left,y:t.clientY||r.bottom,trigger:n})}});return(0,A.jsxs)(wW.Provider,{value:{isOpen:!!r,toggleFromButton:s},children:[c,r?(0,A.jsx)(DW,{groups:a,label:n,position:r,onClose:o}):null]})}function kW({children:e}){let t=(0,k.useContext)(wW);if(!t)throw Error(`ContextMenuTrigger must be rendered inside ContextMenu`);return(0,k.cloneElement)(e,{"aria-expanded":t.isOpen,"aria-haspopup":`menu`,onClick:n=>{e.props.onClick?.(n),!n.defaultPrevented&&(n.stopPropagation(),t.toggleFromButton(n.currentTarget))}})}export{vt as $,Ar as A,xn as B,Ir as C,jr as D,Mr as E,Nn as F,kt as G,yn as H,An as I,Ct as J,Et as K,Bn as L,kn as M,Tn as N,kr as O,En as P,yt as Q,Mn as R,gi as S,Fe as St,Fr as T,bn as U,vn as V,jt as W,xt as X,St as Y,bt as Z,yi as _,He as _t,bW as a,ut as at,_i as b,Le as bt,EV as c,at as ct,fj as d,Xe as dt,_t as et,o_ as f,Ye as ft,bi as g,Ue as gt,xi as h,We as ht,CW as i,dt as it,Cn as j,Pr as k,IB as l,tt as lt,Qg as m,Ge as mt,kW as n,ht as nt,fW as o,lt as ot,r_ as p,qe as pt,Tt as q,EW as r,pt as rt,mH as s,st,OW as t,gt as tt,uR as u,Ze as ut,hi as v,Ve as vt,Nr as w,mi as x,Ie as xt,vi as y,Be as yt,Sn as z};