plan-review 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/browser/app.js +38 -38
- package/dist/browser/index.html +129 -38
- package/dist/index.js +30 -305
- package/dist/index.js.map +7 -1
- package/package.json +12 -13
- package/dist/formatter.d.ts +0 -2
- package/dist/formatter.js +0 -60
- package/dist/formatter.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/navigator.d.ts +0 -5
- package/dist/navigator.js +0 -94
- package/dist/navigator.js.map +0 -1
- package/dist/output.d.ts +0 -7
- package/dist/output.js +0 -93
- package/dist/output.js.map +0 -1
- package/dist/parser.d.ts +0 -3
- package/dist/parser.js +0 -265
- package/dist/parser.js.map +0 -1
- package/dist/renderer.d.ts +0 -3
- package/dist/renderer.js +0 -78
- package/dist/renderer.js.map +0 -1
- package/dist/server/assets.d.ts +0 -1
- package/dist/server/assets.js +0 -25
- package/dist/server/assets.js.map +0 -1
- package/dist/server/routes.d.ts +0 -14
- package/dist/server/routes.js +0 -192
- package/dist/server/routes.js.map +0 -1
- package/dist/server/server.d.ts +0 -7
- package/dist/server/server.js +0 -23
- package/dist/server/server.js.map +0 -1
- package/dist/session.d.ts +0 -25
- package/dist/session.js +0 -133
- package/dist/session.js.map +0 -1
- package/dist/transport.d.ts +0 -32
- package/dist/transport.js +0 -62
- package/dist/transport.js.map +0 -1
- package/dist/types.d.ts +0 -34
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/examples/demo-browser.gif +0 -0
- package/examples/demo-plan.md +0 -129
- package/examples/renderer-fixture.md +0 -246
- package/skills/plan-review/SKILL.md +0 -70
package/dist/browser/index.html
CHANGED
|
@@ -538,6 +538,7 @@ section.footnotes a[data-footnote-backref]:hover { text-decoration: underline; }
|
|
|
538
538
|
margin-bottom: 6px;
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
+
<<<<<<< HEAD
|
|
541
542
|
/* ── Mermaid node coloring ──────────────────────────────────
|
|
542
543
|
Mermaid renders each node as <g class="node"> with an inner
|
|
543
544
|
rect/polygon/path. We tag the <g> with data-role (set by
|
|
@@ -647,38 +648,128 @@ pre.mermaid[data-processed="true"] g.edgeLabel.edge-yes-label foreignObject span
|
|
|
647
648
|
pre.mermaid[data-processed="true"] g.edgeLabel.edge-no-label foreignObject span::before {
|
|
648
649
|
content: "✗";
|
|
649
650
|
}
|
|
651
|
+
.banner { padding: 0.5rem 1rem; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
|
|
652
|
+
.banner-warn { background: #6b4a00; color: #fff; }
|
|
653
|
+
.banner button { margin-left: auto; }
|
|
654
|
+
|
|
655
|
+
.submit-panel {
|
|
656
|
+
position: relative;
|
|
657
|
+
display: inline-block;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.submit-panel .submit-btn .caret {
|
|
661
|
+
margin-left: 0.4em;
|
|
662
|
+
font-size: 0.8em;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.submit-popover {
|
|
666
|
+
position: absolute;
|
|
667
|
+
top: calc(100% + 6px);
|
|
668
|
+
right: 0;
|
|
669
|
+
min-width: 320px;
|
|
670
|
+
padding: 12px;
|
|
671
|
+
background: var(--bg-secondary);
|
|
672
|
+
color: var(--text-primary);
|
|
673
|
+
border: 1px solid var(--border);
|
|
674
|
+
border-radius: 6px;
|
|
675
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
676
|
+
z-index: 10;
|
|
677
|
+
display: flex;
|
|
678
|
+
flex-direction: column;
|
|
679
|
+
gap: 8px;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.submit-radio {
|
|
683
|
+
display: flex;
|
|
684
|
+
align-items: center;
|
|
685
|
+
gap: 6px;
|
|
686
|
+
cursor: pointer;
|
|
687
|
+
font-size: 14px;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.submit-summary {
|
|
691
|
+
width: 100%;
|
|
692
|
+
min-height: 80px;
|
|
693
|
+
padding: 6px 8px;
|
|
694
|
+
font-family: inherit;
|
|
695
|
+
font-size: 13px;
|
|
696
|
+
background: var(--bg-primary);
|
|
697
|
+
color: var(--text-primary);
|
|
698
|
+
border: 1px solid var(--border);
|
|
699
|
+
border-radius: 4px;
|
|
700
|
+
resize: vertical;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.submit-summary:focus {
|
|
704
|
+
outline: none;
|
|
705
|
+
border-color: var(--accent);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.submit-actions {
|
|
709
|
+
display: flex;
|
|
710
|
+
justify-content: flex-end;
|
|
711
|
+
gap: 8px;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.submit-actions button {
|
|
715
|
+
padding: 6px 12px;
|
|
716
|
+
border: none;
|
|
717
|
+
border-radius: 4px;
|
|
718
|
+
cursor: pointer;
|
|
719
|
+
font-size: 13px;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.submit-actions button:first-child {
|
|
723
|
+
background: var(--bg-tertiary);
|
|
724
|
+
color: var(--text-primary);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.submit-confirm {
|
|
728
|
+
background: var(--accent);
|
|
729
|
+
color: white;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.submit-confirm:hover {
|
|
733
|
+
background: var(--accent-hover);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.submit-confirm:disabled,
|
|
737
|
+
.submit-actions button:disabled {
|
|
738
|
+
opacity: 0.5;
|
|
739
|
+
cursor: not-allowed;
|
|
740
|
+
}
|
|
650
741
|
</style>
|
|
651
742
|
</head>
|
|
652
743
|
<body>
|
|
653
744
|
<div id="app"></div>
|
|
654
745
|
<script>/* bundled with preact */
|
|
655
|
-
"use strict";(()=>{var le,y,Xe,Wt,q,We,Je,Ye,xe,ne,W,et,$e,ve,we,Vt,se={},oe=[],Kt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ce=Array.isArray;function B(t,e){for(var n in e)t[n]=e[n];return t}function Se(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Qt(t,e,n){var i,r,s,a={};for(s in e)s=="key"?i=e[s]:s=="ref"?r=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?le.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)a[s]===void 0&&(a[s]=t.defaultProps[s]);return re(t,a,i,r,null)}function re(t,e,n,i,r){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++Xe,__i:-1,__u:0};return r==null&&y.vnode!=null&&y.vnode(s),s}function D(t){return t.children}function ie(t,e){this.props=t,this.context=e}function F(t,e){if(e==null)return t.__?F(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?F(t):null}function Xt(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],r=[],s=B({},e);s.__v=e.__v+1,y.vnode&&y.vnode(s),Te(t.__P,s,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??F(e),!!(32&e.__u),r),s.__v=e.__v,s.__.__k[s.__i]=s,it(i,s,r),e.__e=e.__=null,s.__e!=n&&tt(s)}}function tt(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),tt(t)}function Ve(t){(!t.__d&&(t.__d=!0)&&q.push(t)&&!ae.__r++||We!=y.debounceRendering)&&((We=y.debounceRendering)||Je)(ae)}function ae(){try{for(var t,e=1;q.length;)q.length>e&&q.sort(Ye),t=q.shift(),e=q.length,Xt(t)}finally{q.length=ae.__r=0}}function nt(t,e,n,i,r,s,a,o,c,l,p){var u,h,d,m,g,x,b,k=i&&i.__k||oe,_=e.length;for(c=Jt(n,e,k,c,_),u=0;u<_;u++)(d=n.__k[u])!=null&&(h=d.__i!=-1&&k[d.__i]||se,d.__i=u,x=Te(t,d,h,r,s,a,o,c,l,p),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&Ce(h.ref,null,d),p.push(d.ref,d.__c||m,d)),g==null&&m!=null&&(g=m),(b=!!(4&d.__u))||h.__k===d.__k?(c=rt(d,c,t,b),b&&h.__e&&(h.__e=null)):typeof d.type=="function"&&x!==void 0?c=x:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=g,c}function Jt(t,e,n,i,r){var s,a,o,c,l,p=n.length,u=p,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(a=e[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=t.__k[s]=re(null,a,null,null,null):ce(a)?a=t.__k[s]=re(D,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=t.__k[s]=re(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):t.__k[s]=a,c=s+h,a.__=t,a.__b=t.__b+1,o=null,(l=a.__i=Yt(a,n,c,u))!=-1&&(u--,(o=n[l])&&(o.__u|=2)),o==null||o.__v==null?(l==-1&&(r>p?h--:r<p&&h++),typeof a.type!="function"&&(a.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,a.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<p;s++)(o=n[s])!=null&&(2&o.__u)==0&&(o.__e==i&&(i=F(o)),ot(o,o));return i}function rt(t,e,n,i){var r,s;if(typeof t.type=="function"){for(r=t.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=t,e=rt(r[s],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=F(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Yt(t,e,n,i){var r,s,a,o=t.key,c=t.type,l=e[n],p=l!=null&&(2&l.__u)==0;if(l===null&&o==null||p&&o==l.key&&c==l.type)return n;if(i>(p?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[a=r>=0?r--:s++])!=null&&(2&l.__u)==0&&o==l.key&&c==l.type)return a}return-1}function Ke(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Kt.test(e)?n:n+"px"}function te(t,e,n,i,r){var s,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Ke(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Ke(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(et,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n[W]=i[W]:(n[W]=$e,t.addEventListener(e,s?we:ve,s)):t.removeEventListener(e,s?we:ve,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Qe(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[ne]==null)e[ne]=$e++;else if(e[ne]<n[W])return;return n(y.event?y.event(e):e)}}}function Te(t,e,n,i,r,s,a,o,c,l){var p,u,h,d,m,g,x,b,k,_,v,S,C,R,I,P=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[o=e.__e=n.__e]),(p=y.__b)&&p(e);e:if(typeof P=="function")try{if(b=e.props,k=P.prototype&&P.prototype.render,_=(p=P.contextType)&&i[p.__c],v=p?_?_.props.value:p.__:i,n.__c?x=(u=e.__c=n.__c).__=u.__E:(k?e.__c=u=new P(b,v):(e.__c=u=new ie(b,v),u.constructor=P,u.render=tn),_&&_.sub(u),u.state||(u.state={}),u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),k&&u.__s==null&&(u.__s=u.state),k&&P.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=B({},u.__s)),B(u.__s,P.getDerivedStateFromProps(b,u.__s))),d=u.props,m=u.state,u.__v=e,h)k&&P.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),k&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(k&&P.getDerivedStateFromProps==null&&b!==d&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(b,v),e.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(b,u.__s,v)===!1){e.__v!=n.__v&&(u.props=b,u.state=u.__s,u.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(Z){Z&&(Z.__=e)}),oe.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(b,u.__s,v),k&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(d,m,g)})}if(u.context=v,u.props=b,u.__P=t,u.__e=!1,S=y.__r,C=0,k)u.state=u.__s,u.__d=!1,S&&S(e),p=u.render(u.props,u.state,u.context),oe.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,S&&S(e),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++C<25);u.state=u.__s,u.getChildContext!=null&&(i=B(B({},i),u.getChildContext())),k&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(d,m)),R=p!=null&&p.type===D&&p.key==null?st(p.props.children):p,o=nt(t,ce(R)?R:[R],e,n,i,r,s,a,o,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&a.push(u),x&&(u.__E=u.__=null)}catch(Z){if(e.__v=null,c||s!=null)if(Z.then){for(e.__u|=c?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;s[s.indexOf(o)]=null,e.__e=o}else{for(I=s.length;I--;)Se(s[I]);ye(e)}else e.__e=n.__e,e.__k=n.__k,Z.then||ye(e);y.__e(Z,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):o=e.__e=en(n.__e,e,n,i,r,s,a,c,l);return(p=y.diffed)&&p(e),128&e.__u?void 0:o}function ye(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(ye))}function it(t,e,n){for(var i=0;i<n.length;i++)Ce(n[i],n[++i],n[++i]);y.__c&&y.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){y.__e(s,r.__v)}})}function st(t){return typeof t!="object"||t==null||t.__b>0?t:ce(t)?t.map(st):B({},t)}function en(t,e,n,i,r,s,a,o,c){var l,p,u,h,d,m,g,x=n.props||se,b=e.props,k=e.type;if(k=="svg"?r="http://www.w3.org/2000/svg":k=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((d=s[l])&&"setAttribute"in d==!!k&&(k?d.localName==k:d.nodeType==3)){t=d,s[l]=null;break}}if(t==null){if(k==null)return document.createTextNode(b);t=document.createElementNS(r,k,b.is&&b),o&&(y.__m&&y.__m(e,s),o=!1),s=null}if(k==null)x===b||o&&t.data==b||(t.data=b);else{if(s=s&&le.call(t.childNodes),!o&&s!=null)for(x={},l=0;l<t.attributes.length;l++)x[(d=t.attributes[l]).name]=d.value;for(l in x)d=x[l],l=="dangerouslySetInnerHTML"?u=d:l=="children"||l in b||l=="value"&&"defaultValue"in b||l=="checked"&&"defaultChecked"in b||te(t,l,null,d,r);for(l in b)d=b[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?p=d:l=="value"?m=d:l=="checked"?g=d:o&&typeof d!="function"||x[l]===d||te(t,l,d,x[l],r);if(p)o||u&&(p.__html==u.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(u&&(t.innerHTML=""),nt(e.type=="template"?t.content:t,ce(h)?h:[h],e,n,i,k=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,a,s?s[0]:n.__k&&F(n,0),o,c),s!=null)for(l=s.length;l--;)Se(s[l]);o||(l="value",k=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||k=="progress"&&!m||k=="option"&&m!=x[l])&&te(t,l,m,x[l],r),l="checked",g!=null&&g!=t[l]&&te(t,l,g,x[l],r))}return t}function Ce(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(r){y.__e(r,n)}}function ot(t,e,n){var i,r;if(y.unmount&&y.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||Ce(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){y.__e(s,e)}i.base=i.__P=null}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&ot(i[r],e,n||typeof t.type!="function");n||Se(t.__e),t.__c=t.__=t.__e=void 0}function tn(t,e,n){return this.constructor(t,n)}function at(t,e,n){var i,r,s,a;e==document&&(e=document.documentElement),y.__&&y.__(t,e),r=(i=typeof n=="function")?null:n&&n.__k||e.__k,s=[],a=[],Te(e,t=(!i&&n||e).__k=Qt(D,null,[t]),r||se,se,e.namespaceURI,!i&&n?[n]:r?null:e.firstChild?le.call(e.childNodes):null,s,!i&&n?n:r?r.__e:e.firstChild,i,a),it(s,t,a)}le=oe.slice,y={__e:function(t,e,n,i){for(var r,s,a;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),a=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,i||{}),a=r.__d),a)return r.__E=r}catch(o){t=o}throw t}},Xe=0,Wt=function(t){return t!=null&&t.constructor===void 0},ie.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=B({},this.state),typeof t=="function"&&(t=t(B({},n),this.props)),t&&B(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ve(this))},ie.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ve(this))},ie.prototype.render=D,q=[],Je=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ye=function(t,e){return t.__v.__b-e.__v.__b},ae.__r=0,xe=Math.random().toString(8),ne="__d"+xe,W="__a"+xe,et=/(PointerCapture)$|Capture$/i,$e=0,ve=Qe(!1),we=Qe(!0),Vt=0;var V,T,Re,lt,pe=0,_t=[],L=y,ct=L.__b,ut=L.__r,pt=L.diffed,ht=L.__c,dt=L.unmount,ft=L.__;function Ae(t,e){L.__h&&L.__h(T,t,pe||e),pe=0;var n=T.__H||(T.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function E(t){return pe=1,nn(bt,t)}function nn(t,e,n){var i=Ae(V++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):bt(void 0,e),function(o){var c=i.__N?i.__N[0]:i.__[0],l=i.t(c,o);c!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=T,!T.__f)){var r=function(o,c,l){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!s||s.call(this,o,c,l);var u=i.__c.props!==o;return p.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(u=!0)}}),s&&s.call(this,o,c,l)||u};T.__f=!0;var s=T.shouldComponentUpdate,a=T.componentWillUpdate;T.componentWillUpdate=function(o,c,l){if(this.__e){var p=s;s=void 0,r(o,c,l),s=p}a&&a.call(this,o,c,l)},T.shouldComponentUpdate=r}return i.__N||i.__}function K(t,e){var n=Ae(V++,3);!L.__s&&kt(n.__H,e)&&(n.__=t,n.u=e,T.__H.__h.push(n))}function gt(t){return pe=5,Ee(function(){return{current:t}},[])}function Ee(t,e){var n=Ae(V++,7);return kt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function rn(){for(var t;t=_t.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(ue),e.__h.some(Le),e.__h=[]}catch(n){e.__h=[],L.__e(n,t.__v)}}}L.__b=function(t){T=null,ct&&ct(t)},L.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ft&&ft(t,e)},L.__r=function(t){ut&&ut(t),V=0;var e=(T=t.__c).__H;e&&(Re===T?(e.__h=[],T.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(ue),e.__h.some(Le),e.__h=[],V=0)),Re=T},L.diffed=function(t){pt&&pt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(_t.push(e)!==1&<===L.requestAnimationFrame||((lt=L.requestAnimationFrame)||sn)(rn)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Re=T=null},L.__c=function(t,e){e.some(function(n){try{n.__h.some(ue),n.__h=n.__h.filter(function(i){return!i.__||Le(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],L.__e(i,n.__v)}}),ht&&ht(t,e)},L.unmount=function(t){dt&&dt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{ue(i)}catch(r){e=r}}),n.__H=void 0,e&&L.__e(e,n.__v))};var mt=typeof requestAnimationFrame=="function";function sn(t){var e,n=function(){clearTimeout(i),mt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);mt&&(e=requestAnimationFrame(n))}function ue(t){var e=T,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),T=e}function Le(t){var e=T;t.__c=t.__(),T=e}function kt(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function bt(t,e){return typeof e=="function"?e(t):e}var on=0;function f(t,e,n,i,r,s){e||(e={});var a,o,c=e;if("ref"in c)for(o in c={},e)o=="ref"?a=e[o]:c[o]=e[o];var l={type:t,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--on,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(a=t.defaultProps))for(o in a)c[o]===void 0&&(c[o]=a[o]);return y.vnode&&y.vnode(l),l}function xt({doc:t,comments:e,activeSection:n,onNavigate:i}){let r=new Set(e.map(a=>a.sectionId));if(t.mode==="plan"){let a=t.sections.filter(o=>o.level===2);return f("nav",{class:"toc-panel",children:a.map(o=>{let c=t.sections.filter(l=>l.parent===o.id);return f("div",{class:"toc-milestone",children:[f("h3",{children:o.heading}),f("ul",{children:c.map(l=>f("li",{class:`toc-item${n===l.id?" active":""}${r.has(l.id)?" commented":""}`,onClick:()=>i(l.id),children:[f("span",{class:"toc-marker",children:r.has(l.id)?"\u2713":"\xA0"}),f("span",{class:"toc-id",children:l.id}),f("span",{class:"toc-heading",children:l.heading})]},l.id))})]},o.id)})})}let s=t.sections.filter(a=>a.level>=2);return f("nav",{class:"toc-panel",children:f("ul",{children:s.map(a=>f("li",{class:`toc-item${n===a.id?" active":""}${r.has(a.id)?" commented":""}`,onClick:()=>i(a.id),children:[f("span",{class:"toc-marker",children:r.has(a.id)?"\u2713":"\xA0"}),f("span",{class:"toc-heading",children:a.heading})]},a.id))})})}function Be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var j=Be();function Tt(t){j=t}var J={exec:()=>null};function w(t,e=""){let n=typeof t=="string"?t:t.source,i={replace:(r,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(A.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,e)};return i}var A={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},an=/^(?:[ \t]*(?:\n|$))+/,ln=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,un=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Me=/(?:[*+-]|\d{1,9}[.)])/,Ct=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Rt=w(Ct).replace(/bull/g,Me).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pn=w(Ct).replace(/bull/g,Me).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),He=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,hn=/^[^\n]+/,qe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,dn=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fn=w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Me).getRegex(),ge="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",De=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mn=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",De).replace("tag",ge).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Lt=w(He).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),_n=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Lt).getRegex(),Ne={blockquote:_n,code:ln,def:dn,fences:cn,heading:un,hr:Y,html:mn,lheading:Rt,list:fn,newline:an,paragraph:Lt,table:J,text:hn},vt=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),gn={...Ne,lheading:pn,table:vt,paragraph:w(He).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex()},kn={...Ne,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",De).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:J,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(He).replace("hr",Y).replace("heading",` *#{1,6} *[^
|
|
656
|
-
]`).replace("lheading",
|
|
746
|
+
"use strict";(()=>{var ue,y,nt,Jt,O,Je,rt,it,$e,ie,Q,st,Le,Te,Ce,Yt,ae={},le=[],en=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,pe=Array.isArray;function H(t,e){for(var n in e)t[n]=e[n];return t}function Ae(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function tn(t,e,n){var i,r,s,a={};for(s in e)s=="key"?i=e[s]:s=="ref"?r=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?ue.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)a[s]===void 0&&(a[s]=t.defaultProps[s]);return se(t,a,i,r,null)}function se(t,e,n,i,r){var s={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:r??++nt,__i:-1,__u:0};return r==null&&y.vnode!=null&&y.vnode(s),s}function Z(t){return t.children}function oe(t,e){this.props=t,this.context=e}function U(t,e){if(e==null)return t.__?U(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?U(t):null}function nn(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],r=[],s=H({},e);s.__v=e.__v+1,y.vnode&&y.vnode(s),Ee(t.__P,s,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??U(e),!!(32&e.__u),r),s.__v=e.__v,s.__.__k[s.__i]=s,ct(i,s,r),e.__e=e.__=null,s.__e!=n&&ot(s)}}function ot(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),ot(t)}function Ye(t){(!t.__d&&(t.__d=!0)&&O.push(t)&&!ce.__r++||Je!=y.debounceRendering)&&((Je=y.debounceRendering)||rt)(ce)}function ce(){try{for(var t,e=1;O.length;)O.length>e&&O.sort(it),t=O.shift(),e=O.length,nn(t)}finally{O.length=ce.__r=0}}function at(t,e,n,i,r,s,a,o,c,l,p){var u,h,f,m,_,x,k,b=i&&i.__k||le,$=e.length;for(c=rn(n,e,b,c,$),u=0;u<$;u++)(f=n.__k[u])!=null&&(h=f.__i!=-1&&b[f.__i]||ae,f.__i=u,x=Ee(t,f,h,r,s,a,o,c,l,p),m=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Pe(h.ref,null,f),p.push(f.ref,f.__c||m,f)),_==null&&m!=null&&(_=m),(k=!!(4&f.__u))||h.__k===f.__k?(c=lt(f,c,t,k),k&&h.__e&&(h.__e=null)):typeof f.type=="function"&&x!==void 0?c=x:m&&(c=m.nextSibling),f.__u&=-7);return n.__e=_,c}function rn(t,e,n,i,r){var s,a,o,c,l,p=n.length,u=p,h=0;for(t.__k=new Array(r),s=0;s<r;s++)(a=e[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=t.__k[s]=se(null,a,null,null,null):pe(a)?a=t.__k[s]=se(Z,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=t.__k[s]=se(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):t.__k[s]=a,c=s+h,a.__=t,a.__b=t.__b+1,o=null,(l=a.__i=sn(a,n,c,u))!=-1&&(u--,(o=n[l])&&(o.__u|=2)),o==null||o.__v==null?(l==-1&&(r>p?h--:r<p&&h++),typeof a.type!="function"&&(a.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,a.__u|=4))):t.__k[s]=null;if(u)for(s=0;s<p;s++)(o=n[s])!=null&&(2&o.__u)==0&&(o.__e==i&&(i=U(o)),pt(o,o));return i}function lt(t,e,n,i){var r,s;if(typeof t.type=="function"){for(r=t.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=t,e=lt(r[s],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=U(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function sn(t,e,n,i){var r,s,a,o=t.key,c=t.type,l=e[n],p=l!=null&&(2&l.__u)==0;if(l===null&&o==null||p&&o==l.key&&c==l.type)return n;if(i>(p?1:0)){for(r=n-1,s=n+1;r>=0||s<e.length;)if((l=e[a=r>=0?r--:s++])!=null&&(2&l.__u)==0&&o==l.key&&c==l.type)return a}return-1}function et(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||en.test(e)?n:n+"px"}function re(t,e,n,i,r){var s,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||et(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||et(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(st,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?i?n[Q]=i[Q]:(n[Q]=Le,t.addEventListener(e,s?Ce:Te,s)):t.removeEventListener(e,s?Ce:Te,s);else{if(r=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function tt(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[ie]==null)e[ie]=Le++;else if(e[ie]<n[Q])return;return n(y.event?y.event(e):e)}}}function Ee(t,e,n,i,r,s,a,o,c,l){var p,u,h,f,m,_,x,k,b,$,E,I,M,A,g,v=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[o=e.__e=n.__e]),(p=y.__b)&&p(e);e:if(typeof v=="function")try{if(k=e.props,b=v.prototype&&v.prototype.render,$=(p=v.contextType)&&i[p.__c],E=p?$?$.props.value:p.__:i,n.__c?x=(u=e.__c=n.__c).__=u.__E:(b?e.__c=u=new v(k,E):(e.__c=u=new oe(k,E),u.constructor=v,u.render=an),$&&$.sub(u),u.state||(u.state={}),u.__n=i,h=u.__d=!0,u.__h=[],u._sb=[]),b&&u.__s==null&&(u.__s=u.state),b&&v.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=H({},u.__s)),H(u.__s,v.getDerivedStateFromProps(k,u.__s))),f=u.props,m=u.state,u.__v=e,h)b&&v.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),b&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(b&&v.getDerivedStateFromProps==null&&k!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(k,E),e.__v==n.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(k,u.__s,E)===!1){e.__v!=n.__v&&(u.props=k,u.state=u.__s,u.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),le.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(k,u.__s,E),b&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,m,_)})}if(u.context=E,u.props=k,u.__P=t,u.__e=!1,I=y.__r,M=0,b)u.state=u.__s,u.__d=!1,I&&I(e),p=u.render(u.props,u.state,u.context),le.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,I&&I(e),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++M<25);u.state=u.__s,u.getChildContext!=null&&(i=H(H({},i),u.getChildContext())),b&&!h&&u.getSnapshotBeforeUpdate!=null&&(_=u.getSnapshotBeforeUpdate(f,m)),A=p!=null&&p.type===Z&&p.key==null?ut(p.props.children):p,o=at(t,pe(A)?A:[A],e,n,i,r,s,a,o,c,l),u.base=e.__e,e.__u&=-161,u.__h.length&&a.push(u),x&&(u.__E=u.__=null)}catch(T){if(e.__v=null,c||s!=null)if(T.then){for(e.__u|=c?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;s[s.indexOf(o)]=null,e.__e=o}else{for(g=s.length;g--;)Ae(s[g]);Re(e)}else e.__e=n.__e,e.__k=n.__k,T.then||Re(e);y.__e(T,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):o=e.__e=on(n.__e,e,n,i,r,s,a,c,l);return(p=y.diffed)&&p(e),128&e.__u?void 0:o}function Re(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Re))}function ct(t,e,n){for(var i=0;i<n.length;i++)Pe(n[i],n[++i],n[++i]);y.__c&&y.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(s){s.call(r)})}catch(s){y.__e(s,r.__v)}})}function ut(t){return typeof t!="object"||t==null||t.__b>0?t:pe(t)?t.map(ut):H({},t)}function on(t,e,n,i,r,s,a,o,c){var l,p,u,h,f,m,_,x=n.props||ae,k=e.props,b=e.type;if(b=="svg"?r="http://www.w3.org/2000/svg":b=="math"?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((f=s[l])&&"setAttribute"in f==!!b&&(b?f.localName==b:f.nodeType==3)){t=f,s[l]=null;break}}if(t==null){if(b==null)return document.createTextNode(k);t=document.createElementNS(r,b,k.is&&k),o&&(y.__m&&y.__m(e,s),o=!1),s=null}if(b==null)x===k||o&&t.data==k||(t.data=k);else{if(s=s&&ue.call(t.childNodes),!o&&s!=null)for(x={},l=0;l<t.attributes.length;l++)x[(f=t.attributes[l]).name]=f.value;for(l in x)f=x[l],l=="dangerouslySetInnerHTML"?u=f:l=="children"||l in k||l=="value"&&"defaultValue"in k||l=="checked"&&"defaultChecked"in k||re(t,l,null,f,r);for(l in k)f=k[l],l=="children"?h=f:l=="dangerouslySetInnerHTML"?p=f:l=="value"?m=f:l=="checked"?_=f:o&&typeof f!="function"||x[l]===f||re(t,l,f,x[l],r);if(p)o||u&&(p.__html==u.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(u&&(t.innerHTML=""),at(e.type=="template"?t.content:t,pe(h)?h:[h],e,n,i,b=="foreignObject"?"http://www.w3.org/1999/xhtml":r,s,a,s?s[0]:n.__k&&U(n,0),o,c),s!=null)for(l=s.length;l--;)Ae(s[l]);o||(l="value",b=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||b=="progress"&&!m||b=="option"&&m!=x[l])&&re(t,l,m,x[l],r),l="checked",_!=null&&_!=t[l]&&re(t,l,_,x[l],r))}return t}function Pe(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(r){y.__e(r,n)}}function pt(t,e,n){var i,r;if(y.unmount&&y.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||Pe(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){y.__e(s,e)}i.base=i.__P=null}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&pt(i[r],e,n||typeof t.type!="function");n||Ae(t.__e),t.__c=t.__=t.__e=void 0}function an(t,e,n){return this.constructor(t,n)}function ht(t,e,n){var i,r,s,a;e==document&&(e=document.documentElement),y.__&&y.__(t,e),r=(i=typeof n=="function")?null:n&&n.__k||e.__k,s=[],a=[],Ee(e,t=(!i&&n||e).__k=tn(Z,null,[t]),r||ae,ae,e.namespaceURI,!i&&n?[n]:r?null:e.firstChild?ue.call(e.childNodes):null,s,!i&&n?n:r?r.__e:e.firstChild,i,a),ct(s,t,a)}ue=le.slice,y={__e:function(t,e,n,i){for(var r,s,a;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&s.getDerivedStateFromError!=null&&(r.setState(s.getDerivedStateFromError(t)),a=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t,i||{}),a=r.__d),a)return r.__E=r}catch(o){t=o}throw t}},nt=0,Jt=function(t){return t!=null&&t.constructor===void 0},oe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=H({},this.state),typeof t=="function"&&(t=t(H({},n),this.props)),t&&H(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ye(this))},oe.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ye(this))},oe.prototype.render=Z,O=[],rt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,it=function(t,e){return t.__v.__b-e.__v.__b},ce.__r=0,$e=Math.random().toString(8),ie="__d"+$e,Q="__a"+$e,st=/(PointerCapture)$|Capture$/i,Le=0,Te=tt(!1),Ce=tt(!0),Yt=0;var X,C,Ie,dt,de=0,vt=[],L=y,ft=L.__b,mt=L.__r,_t=L.diffed,gt=L.__c,kt=L.unmount,bt=L.__;function Me(t,e){L.__h&&L.__h(C,t,de||e),de=0;var n=C.__H||(C.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function R(t){return de=1,ln(yt,t)}function ln(t,e,n){var i=Me(X++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):yt(void 0,e),function(o){var c=i.__N?i.__N[0]:i.__[0],l=i.t(c,o);c!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=C,!C.__f)){var r=function(o,c,l){if(!i.__c.__H)return!0;var p=i.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!s||s.call(this,o,c,l);var u=i.__c.props!==o;return p.some(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(u=!0)}}),s&&s.call(this,o,c,l)||u};C.__f=!0;var s=C.shouldComponentUpdate,a=C.componentWillUpdate;C.componentWillUpdate=function(o,c,l){if(this.__e){var p=s;s=void 0,r(o,c,l),s=p}a&&a.call(this,o,c,l)},C.shouldComponentUpdate=r}return i.__N||i.__}function D(t,e){var n=Me(X++,3);!L.__s&&wt(n.__H,e)&&(n.__=t,n.u=e,C.__H.__h.push(n))}function fe(t){return de=5,Be(function(){return{current:t}},[])}function Be(t,e){var n=Me(X++,7);return wt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function cn(){for(var t;t=vt.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(he),e.__h.some(ze),e.__h=[]}catch(n){e.__h=[],L.__e(n,t.__v)}}}L.__b=function(t){C=null,ft&&ft(t)},L.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),bt&&bt(t,e)},L.__r=function(t){mt&&mt(t),X=0;var e=(C=t.__c).__H;e&&(Ie===C?(e.__h=[],C.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(he),e.__h.some(ze),e.__h=[],X=0)),Ie=C},L.diffed=function(t){_t&&_t(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(vt.push(e)!==1&&dt===L.requestAnimationFrame||((dt=L.requestAnimationFrame)||un)(cn)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ie=C=null},L.__c=function(t,e){e.some(function(n){try{n.__h.some(he),n.__h=n.__h.filter(function(i){return!i.__||ze(i)})}catch(i){e.some(function(r){r.__h&&(r.__h=[])}),e=[],L.__e(i,n.__v)}}),gt&>(t,e)},L.unmount=function(t){kt&&kt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{he(i)}catch(r){e=r}}),n.__H=void 0,e&&L.__e(e,n.__v))};var xt=typeof requestAnimationFrame=="function";function un(t){var e,n=function(){clearTimeout(i),xt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);xt&&(e=requestAnimationFrame(n))}function he(t){var e=C,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),C=e}function ze(t){var e=C;t.__c=t.__(),C=e}function wt(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function yt(t,e){return typeof e=="function"?e(t):e}var pn=0;function d(t,e,n,i,r,s){e||(e={});var a,o,c=e;if("ref"in c)for(o in c={},e)o=="ref"?a=e[o]:c[o]=e[o];var l={type:t,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pn,__i:-1,__u:0,__source:r,__self:s};if(typeof t=="function"&&(a=t.defaultProps))for(o in a)c[o]===void 0&&(c[o]=a[o]);return y.vnode&&y.vnode(l),l}function St({doc:t,comments:e,activeSection:n,onNavigate:i}){let r=new Set(e.map(a=>a.sectionId));if(t.mode==="plan"){let a=t.sections.filter(o=>o.level===2);return d("nav",{class:"toc-panel",children:a.map(o=>{let c=t.sections.filter(l=>l.parent===o.id);return d("div",{class:"toc-milestone",children:[d("h3",{children:o.heading}),d("ul",{children:c.map(l=>d("li",{class:`toc-item${n===l.id?" active":""}${r.has(l.id)?" commented":""}`,onClick:()=>i(l.id),children:[d("span",{class:"toc-marker",children:r.has(l.id)?"\u2713":"\xA0"}),d("span",{class:"toc-id",children:l.id}),d("span",{class:"toc-heading",children:l.heading})]},l.id))})]},o.id)})})}let s=t.sections.filter(a=>a.level>=2);return d("nav",{class:"toc-panel",children:d("ul",{children:s.map(a=>d("li",{class:`toc-item${n===a.id?" active":""}${r.has(a.id)?" commented":""}`,onClick:()=>i(a.id),children:[d("span",{class:"toc-marker",children:r.has(a.id)?"\u2713":"\xA0"}),d("span",{class:"toc-heading",children:a.heading})]},a.id))})})}function Ne(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var G=Ne();function At(t){G=t}var ee={exec:()=>null};function w(t,e=""){let n=typeof t=="string"?t:t.source,i={replace:(r,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(P.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,e)};return i}var P={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},hn=/^(?:[ \t]*(?:\n|$))+/,dn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,te=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oe=/(?:[*+-]|\d{1,9}[.)])/,Et=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pt=w(Et).replace(/bull/g,Oe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_n=w(Et).replace(/bull/g,Oe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ze=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gn=/^[^\n]+/,je=/(?!\s*\])(?:\\.|[^\[\]\\])+/,kn=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",je).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),bn=w(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oe).getRegex(),xe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xn=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Fe).replace("tag",xe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),It=w(Ze).replace("hr",te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex(),vn=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",It).getRegex(),Ge={blockquote:vn,code:dn,def:kn,fences:fn,heading:mn,hr:te,html:xn,lheading:Pt,list:bn,newline:hn,paragraph:It,table:ee,text:gn},$t=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex(),wn={...Ge,lheading:_n,table:$t,paragraph:w(Ze).replace("hr",te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$t).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xe).getRegex()},yn={...Ge,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(Ze).replace("hr",te).replace("heading",` *#{1,6} *[^
|
|
747
|
+
]`).replace("lheading",Pt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Sn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$n=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zt=/^( {2,}|\\)\n(?!\s*$)/,Tn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ve=/[\p{P}\p{S}]/u,Ue=/[\s\p{P}\p{S}]/u,Mt=/[^\s\p{P}\p{S}]/u,Cn=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ue).getRegex(),Bt=/(?!~)[\p{P}\p{S}]/u,Rn=/(?!~)[\s\p{P}\p{S}]/u,Ln=/(?:[^\s\p{P}\p{S}]|~)/u,An=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Ht=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,En=w(Ht,"u").replace(/punct/g,ve).getRegex(),Pn=w(Ht,"u").replace(/punct/g,Bt).getRegex(),Dt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",In=w(Dt,"gu").replace(/notPunctSpace/g,Mt).replace(/punctSpace/g,Ue).replace(/punct/g,ve).getRegex(),zn=w(Dt,"gu").replace(/notPunctSpace/g,Ln).replace(/punctSpace/g,Rn).replace(/punct/g,Bt).getRegex(),Mn=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Mt).replace(/punctSpace/g,Ue).replace(/punct/g,ve).getRegex(),Bn=w(/\\(punct)/,"gu").replace(/punct/g,ve).getRegex(),Hn=w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Dn=w(Fe).replace("(?:-->|$)","-->").getRegex(),qn=w("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Dn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ge=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nn=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ge).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qt=w(/^!?\[(label)\]\[(ref)\]/).replace("label",ge).replace("ref",je).getRegex(),Nt=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",je).getRegex(),On=w("reflink|nolink(?!\\()","g").replace("reflink",qt).replace("nolink",Nt).getRegex(),We={_backpedal:ee,anyPunctuation:Bn,autolink:Hn,blockSkip:An,br:zt,code:$n,del:ee,emStrongLDelim:En,emStrongRDelimAst:In,emStrongRDelimUnd:Mn,escape:Sn,link:Nn,nolink:Nt,punctuation:Cn,reflink:qt,reflinkSearch:On,tag:qn,text:Tn,url:ee},Zn={...We,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",ge).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge).getRegex()},He={...We,emStrongRDelimAst:zn,emStrongLDelim:Pn,url:w(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},jn={...He,br:w(zt).replace("{2,}","*").getRegex(),text:w(He.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},me={normal:Ge,gfm:wn,pedantic:yn},J={normal:We,gfm:He,breaks:jn,pedantic:Zn},Fn={"&":"&","<":"<",">":">",'"':""","'":"'"},Tt=t=>Fn[t];function B(t,e){if(e){if(P.escapeTest.test(t))return t.replace(P.escapeReplace,Tt)}else if(P.escapeTestNoEncode.test(t))return t.replace(P.escapeReplaceNoEncode,Tt);return t}function Ct(t){try{t=encodeURI(t).replace(P.percentDecode,"%")}catch{return null}return t}function Rt(t,e){let n=t.replace(P.findPipe,(s,a,o)=>{let c=!1,l=a;for(;--l>=0&&o[l]==="\\";)c=!c;return c?"|":" |"}),i=n.split(P.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(P.slashPipe,"|");return i}function Y(t,e,n){let i=t.length;if(i===0)return"";let r=0;for(;r<i;){let s=t.charAt(i-r-1);if(s===e&&!n)r++;else if(s!==e&&n)r++;else break}return t.slice(0,i-r)}function Gn(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return n>0?-2:-1}function Lt(t,e,n,i,r){let s=e.href,a=e.title||null,o=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}function Un(t,e,n){let i=t.match(n.other.indentCodeCompensation);if(i===null)return e;let r=i[1];return e.split(`
|
|
657
748
|
`).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=r.length?s.slice(r.length):s}).join(`
|
|
658
|
-
`)}var
|
|
659
|
-
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],i=
|
|
660
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=
|
|
749
|
+
`)}var ke=class{options;rules;lexer;constructor(t){this.options=t||G}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Y(n,`
|
|
750
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],i=Un(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let i=Y(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Y(e[0],`
|
|
751
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Y(e[0],`
|
|
661
752
|
`).split(`
|
|
662
753
|
`),i="",r="",s=[];for(;n.length>0;){let a=!1,o=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))o.push(n[c]),a=!0;else if(!a)o.push(n[c]);else break;n=n.slice(c);let l=o.join(`
|
|
663
754
|
`),p=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
664
755
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
665
756
|
${l}`:l,r=r?`${r}
|
|
666
|
-
${p}`:p;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,s,!0),this.lexer.state.top=u,n.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let
|
|
757
|
+
${p}`:p;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,s,!0),this.lexer.state.top=u,n.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let f=h,m=f.raw+`
|
|
667
758
|
`+n.join(`
|
|
668
|
-
`),
|
|
759
|
+
`),_=this.blockquote(m);s[s.length-1]=_,i=i.substring(0,i.length-f.raw.length)+_.raw,r=r.substring(0,r.length-f.text.length)+_.text;break}else if(h?.type==="list"){let f=h,m=f.raw+`
|
|
669
760
|
`+n.join(`
|
|
670
|
-
`),
|
|
761
|
+
`),_=this.list(m);s[s.length-1]=_,i=i.substring(0,i.length-h.raw.length)+_.raw,r=r.substring(0,r.length-f.raw.length)+_.raw,n=m.substring(s.at(-1).raw.length).split(`
|
|
671
762
|
`);continue}}return{type:"blockquote",raw:i,tokens:s,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,l="",p="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let u=e[2].split(`
|
|
672
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
673
|
-
`,1)[0],
|
|
674
|
-
`,t=t.substring(h.length+1),c=!0),!c){let
|
|
675
|
-
`,1)[0],
|
|
676
|
-
`+
|
|
677
|
-
`+h}!
|
|
678
|
-
`,t=t.substring(
|
|
679
|
-
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of r)s.rows.push(
|
|
680
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=
|
|
681
|
-
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){for(this.options.pedantic&&(e=e.replace(
|
|
763
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),h=t.split(`
|
|
764
|
+
`,1)[0],f=!u.trim(),m=0;if(this.options.pedantic?(m=2,p=u.trimStart()):f?m=e[1].length+1:(m=e[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,p=u.slice(m),m+=e[1].length),f&&this.rules.other.blankLine.test(h)&&(l+=h+`
|
|
765
|
+
`,t=t.substring(h.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(m),b=this.rules.other.hrRegex(m),$=this.rules.other.fencesBeginRegex(m),E=this.rules.other.headingBeginRegex(m),I=this.rules.other.htmlBeginRegex(m);for(;t;){let M=t.split(`
|
|
766
|
+
`,1)[0],A;if(h=M,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),A=h):A=h.replace(this.rules.other.tabCharGlobal," "),$.test(h)||E.test(h)||I.test(h)||k.test(h)||b.test(h))break;if(A.search(this.rules.other.nonSpaceChar)>=m||!h.trim())p+=`
|
|
767
|
+
`+A.slice(m);else{if(f||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(u)||E.test(u)||b.test(u))break;p+=`
|
|
768
|
+
`+h}!f&&!h.trim()&&(f=!0),l+=M+`
|
|
769
|
+
`,t=t.substring(M.length+1),u=A.slice(m)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0));let _=null,x;this.options.gfm&&(_=this.rules.other.listIsTask.exec(p),_&&(x=_[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:l,task:!!_,checked:x,loose:!1,text:p,tokens:[]}),r.raw+=l}let o=r.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let l=r.items[c].tokens.filter(u=>u.type==="space"),p=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));r.loose=p}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Rt(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
770
|
+
`):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of r)s.rows.push(Rt(a,s.header.length).map((o,c)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[c]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
771
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Y(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Gn(e[2],"()");if(s===-2)return;if(s>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Lt(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[i.toLowerCase()];if(!r){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Lt(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let s=[...i[0]].length-1,a,o,c=s,l=0,p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+s);(i=p.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(o=[...a].length,i[3]||i[4]){c+=o;continue}else if((i[5]||i[6])&&s%3&&!((s+o)%3)){l+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+l);let u=[...i[0]][0].length,h=t.slice(0,s+i.index+u+o);if(Math.min(s,o)%2){let m=h.slice(1,-1);return{type:"em",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=e[1],i="mailto:"+n):(n=e[1],i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},q=class De{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:P,block:me.normal,inline:J.normal};this.options.pedantic?(n.block=me.pedantic,n.inline=J.pedantic):this.options.gfm&&(n.block=me.gfm,this.options.breaks?n.inline=J.breaks:n.inline=J.gfm),this.tokenizer.rules=n}static get rules(){return{block:me,inline:J}}static lex(e,n){return new De(n).lex(e)}static lexInline(e,n){return new De(n).inlineTokens(e)}lex(e){e=e.replace(P.carriageReturn,`
|
|
772
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){for(this.options.pedantic&&(e=e.replace(P.tabCharGlobal," ").replace(P.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(a=>(r=a.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let a=n.at(-1);r.raw.length===1&&a!==void 0?a.raw+=`
|
|
682
773
|
`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=`
|
|
683
774
|
`+r.raw,a.text+=`
|
|
684
775
|
`+r.text,this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=`
|
|
@@ -687,16 +778,16 @@ ${p}`:p;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
687
778
|
`+r.raw,a.text+=`
|
|
688
779
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r),i=s.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=`
|
|
689
780
|
`+r.raw,a.text+=`
|
|
690
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let i=e,r=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let o;if(this.options.extensions?.inline?.some(l=>(o=l.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let l=n.at(-1);o.type==="text"&&l?.type==="text"?(l.raw+=o.raw,l.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,i,a)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let c=e;if(this.options.extensions?.startInline){let l=1/0,p=e.slice(1),u;this.options.extensions.startInline.forEach(h=>{u=h.call({lexer:this},p),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=e.substring(0,l+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),s=!0;let l=n.at(-1);l?.type==="text"?(l.raw+=o.raw,l.text+=o.text):n.push(o);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},
|
|
691
|
-
`;return i?'<pre><code class="language-'+
|
|
692
|
-
`:"<pre><code>"+(n?r:
|
|
781
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let i=e,r=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let o;if(this.options.extensions?.inline?.some(l=>(o=l.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let l=n.at(-1);o.type==="text"&&l?.type==="text"?(l.raw+=o.raw,l.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,i,a)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let c=e;if(this.options.extensions?.startInline){let l=1/0,p=e.slice(1),u;this.options.extensions.startInline.forEach(h=>{u=h.call({lexer:this},p),typeof u=="number"&&u>=0&&(l=Math.min(l,u))}),l<1/0&&l>=0&&(c=e.substring(0,l+1))}if(o=this.tokenizer.inlineText(c)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(a=o.raw.slice(-1)),s=!0;let l=n.at(-1);l?.type==="text"?(l.raw+=o.raw,l.text+=o.text):n.push(o);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},be=class{options;parser;constructor(t){this.options=t||G}space(t){return""}code({text:t,lang:e,escaped:n}){let i=(e||"").match(P.notSpaceStart)?.[0],r=t.replace(P.endingNewline,"")+`
|
|
782
|
+
`;return i?'<pre><code class="language-'+B(i)+'">'+(n?r:B(r,!0))+`</code></pre>
|
|
783
|
+
`:"<pre><code>"+(n?r:B(r,!0))+`</code></pre>
|
|
693
784
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
694
785
|
${this.parser.parse(t)}</blockquote>
|
|
695
786
|
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
696
787
|
`}hr(t){return`<hr>
|
|
697
788
|
`}list(t){let e=t.ordered,n=t.start,i="";for(let a=0;a<t.items.length;a++){let o=t.items[a];i+=this.listitem(o)}let r=e?"ol":"ul",s=e&&n!==1?' start="'+n+'"':"";return"<"+r+s+`>
|
|
698
789
|
`+i+"</"+r+`>
|
|
699
|
-
`}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+
|
|
790
|
+
`}listitem(t){let e="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+B(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
|
|
700
791
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
701
792
|
`}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let i="";for(let r=0;r<t.rows.length;r++){let s=t.rows[r];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
702
793
|
<thead>
|
|
@@ -705,34 +796,34 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
705
796
|
`}tablerow({text:t}){return`<tr>
|
|
706
797
|
${t}</tr>
|
|
707
798
|
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
708
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${
|
|
709
|
-
`+this.renderer.text(o);n?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(e,n=this.renderer){let i="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=o||"";continue}}let a=s;switch(a.type){case"escape":{i+=n.text(a);break}case"html":{i+=n.html(a);break}case"link":{i+=n.link(a);break}case"image":{i+=n.image(a);break}case"strong":{i+=n.strong(a);break}case"em":{i+=n.em(a);break}case"codespan":{i+=n.codespan(a);break}case"br":{i+=n.br(a);break}case"del":{i+=n.del(a);break}case"text":{i+=n.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},
|
|
710
|
-
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+
|
|
799
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${B(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let i=this.parser.parseInline(n),r=Ct(t);if(r===null)return i;t=r;let s='<a href="'+t+'"';return e&&(s+=' title="'+B(e)+'"'),s+=">"+i+"</a>",s}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=Ct(t);if(r===null)return B(n);t=r;let s=`<img src="${t}" alt="${n}"`;return e&&(s+=` title="${B(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:B(t.text)}},Ve=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},N=class qe{options;renderer;textRenderer;constructor(e){this.options=e||G,this.options.renderer=this.options.renderer||new be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ve}static parse(e,n){return new qe(n).parse(e)}static parseInline(e,n){return new qe(n).parseInline(e)}parse(e,n=!0){let i="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let o=s,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){i+=c||"";continue}}let a=s;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let o=a,c=this.renderer.text(o);for(;r+1<e.length&&e[r+1].type==="text";)o=e[++r],c+=`
|
|
800
|
+
`+this.renderer.text(o);n?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(e,n=this.renderer){let i="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){i+=o||"";continue}}let a=s;switch(a.type){case"escape":{i+=n.text(a);break}case"html":{i+=n.html(a);break}case"link":{i+=n.link(a);break}case"image":{i+=n.image(a);break}case"strong":{i+=n.strong(a);break}case"em":{i+=n.em(a);break}case"codespan":{i+=n.codespan(a);break}case"br":{i+=n.br(a);break}case"del":{i+=n.del(a);break}case"text":{i+=n.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},_e=class{options;block;constructor(t){this.options=t||G}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?q.lex:q.lexInline}provideParser(){return this.block?N.parse:N.parseInline}},ne=class{defaults=Ne();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=N;Renderer=be;TextRenderer=Ve;Lexer=q;Tokenizer=ke;Hooks=_e;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let i of t)switch(n=n.concat(e.call(this,i)),i.type){case"table":{let r=i;for(let s of r.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of r.rows)for(let a of s)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let r=i;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(s=>{let a=r[s].flat(1/0);n=n.concat(this.walkTokens(a,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let s=e.renderers[r.name];s?e.renderers[r.name]=function(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){let r=this.defaults.renderer||new be(this.defaults);for(let s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=n.renderer[a],c=r[a];r[a]=(...l)=>{let p=o.apply(r,l);return p===!1&&(p=c.apply(r,l)),p||""}}i.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new ke(this.defaults);for(let s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=n.tokenizer[a],c=r[a];r[a]=(...l)=>{let p=o.apply(r,l);return p===!1&&(p=c.apply(r,l)),p}}i.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new _e;for(let s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=n.hooks[a],c=r[a];_e.passThroughHooks.has(s)?r[a]=l=>{if(this.defaults.async)return Promise.resolve(o.call(r,l)).then(u=>c.call(r,u));let p=o.call(r,l);return c.call(r,p)}:r[a]=(...l)=>{let p=o.apply(r,l);return p===!1&&(p=c.apply(r,l)),p}}i.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(a){let o=[];return o.push(s.call(this,a)),r&&(o=o.concat(r.call(this,a))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return q.lex(t,e??this.defaults)}parser(t,e){return N.parse(t,e??this.defaults)}parseMarkdown(t){return(n,i)=>{let r={...i},s={...this.defaults,...r},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);let o=s.hooks?s.hooks.provideLexer():t?q.lex:q.lexInline,c=s.hooks?s.hooks.provideParser():t?N.parse:N.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>o(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>c(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let l=o(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let p=c(l,s);return s.hooks&&(p=s.hooks.postprocess(p)),p}catch(l){return a(l)}}}onError(t,e){return n=>{if(n.message+=`
|
|
801
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+B(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}}},F=new ne;function S(t,e){return F.parse(t,e)}S.options=S.setOptions=function(t){return F.setOptions(t),S.defaults=F.defaults,At(S.defaults),S};S.getDefaults=Ne;S.defaults=G;S.use=function(...t){return F.use(...t),S.defaults=F.defaults,At(S.defaults),S};S.walkTokens=function(t,e){return F.walkTokens(t,e)};S.parseInline=F.parseInline;S.Parser=N;S.parser=N.parse;S.Renderer=be;S.TextRenderer=Ve;S.Lexer=q;S.lexer=q.lex;S.Tokenizer=ke;S.Hooks=_e;S.parse=S;var Sr=S.options,$r=S.setOptions,Tr=S.use,Cr=S.walkTokens,Rr=S.parseInline;var Lr=N.parse,Ar=q.lex;function Wn(t,e){let n={type:"footnotes",raw:e,rawItems:[],items:[]};return{name:"footnote",level:"block",childTokens:["content"],tokenizer(i){t.hasFootnotes||(this.lexer.tokens.push(n),t.tokens=this.lexer.tokens,t.hasFootnotes=!0,n.rawItems=[],n.items=[]);let r=/^\[\^([^\]\n]+)\]:(?:[ \t]+|[\n]*?|$)([^\n]*?(?:\n|$)(?:\n*?[ ]{4,}[^\n]*)*)/.exec(i);if(r){let[s,a,o=""]=r,c=o.split(`
|
|
711
802
|
`).reduce((u,h)=>u+`
|
|
712
803
|
`+h.replace(/^(?:[ ]{4}|[\t])/,""),""),l=c.trimEnd().split(`
|
|
713
804
|
`).pop();c+=l&&/^[ \t]*?[>\-*][ ]|[`]{3,}$|^[ \t]*?[|].+[|]$/.test(l)?`
|
|
714
805
|
|
|
715
|
-
`:"";let p={type:"footnote",raw:s,label:a,refs:[],content:this.lexer.blockTokens(c)};return n.rawItems.push(p),p}},renderer(){return""}}}function
|
|
716
|
-
`;return
|
|
806
|
+
`:"";let p={type:"footnote",raw:s,label:a,refs:[],content:this.lexer.blockTokens(c)};return n.rawItems.push(p),p}},renderer(){return""}}}function Vn(t){return t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function Kn(t,e=!1,n=!1){let i=0;return{name:"footnoteRef",level:"inline",tokenizer(r){let s=/^\[\^([^\]\n]+)\]/.exec(r);if(s){let[a,o]=s,c=this.lexer.tokens[0],l=c.rawItems.filter(f=>f.label===o);if(!l.length)return;let p=l[0],u=c.items.filter(f=>f.label===o)[0],h={type:"footnoteRef",raw:a,index:p.refs.length,id:"",label:o};return u?(h.id=u.refs[0].id,u.refs.push(h)):(i++,h.id=String(i),p.refs.push(h),c.items.push(p)),h}},renderer({index:r,id:s,label:a}){i=0;let o=encodeURIComponent(a),c=n?Vn(a):s,l=r>0?`-${r+1}`:"";return`<sup><a id="${t}ref-${o}${l}" href="#${t+o}" data-${t}ref aria-describedby="${t}label">${e?`[${c}]`:c}</a></sup>`}}}function Qn(t,e,n,i,r,s){return{name:"footnotes",renderer({raw:a,items:o=[]}){if(o.length===0)return"";let c=o.reduce((h,{label:f,content:m,refs:_})=>{let x=encodeURIComponent(f),k=this.parser.parse(m).trimEnd(),b=k.endsWith("</p>"),$=`<li id="${t+x}">
|
|
807
|
+
`;return $+=b?k.replace(/<\/p>$/,""):k,_.forEach((E,I)=>{let M=s.replace("{0}",f),A,g;if(I>0){let v=I+1;A=`\u21A9<sup>${v}</sup>`,g=`-${v}`}else A="\u21A9",g="";$+=` <a href="#${t}ref-${x}${g}" data-${t}backref aria-label="${M}">${A}</a>`}),$+=b?`</p>
|
|
717
808
|
`:`
|
|
718
|
-
|
|
719
|
-
`,h
|
|
809
|
+
`,$+=`</li>
|
|
810
|
+
`,h+$},""),l="";n&&(l+=`<hr data-${e}footnotes>
|
|
720
811
|
`);let p="";i&&(p=` class="${i}"`);let u="";return r&&(u=` class="${r}"`),l+=`<section${p} data-${e}footnotes>
|
|
721
812
|
`,l+=`<h2 id="${t}label"${u}>${a.trimEnd()}</h2>
|
|
722
813
|
`,l+=`<ol>
|
|
723
814
|
${c}</ol>
|
|
724
815
|
`,l+=`</section>
|
|
725
|
-
`,l}}}function
|
|
726
|
-
`);return e.push({index:n++,innerHtml:h,text:
|
|
727
|
-
`+u.text;let h=e(u.innerHtml,"details");l+=h.open-h.close,p++}n.push({index:n.length,innerHtml:o,text:c}),i=p}return n}function
|
|
728
|
-
import mermaid from '${
|
|
816
|
+
`,l}}}function Ke(t={}){let{prefixId:e="footnote-",prefixData:n="",description:i="Footnotes",refMarkers:r=!1,footnoteDivider:s=!1,keepLabels:a=!1,sectionClass:o="footnotes",headingClass:c="sr-only",backRefLabel:l="Back to reference {0}"}=t,p={hasFootnotes:!1,tokens:[]};return{extensions:[Wn(p,i),Kn(e,r,a),Qn(e,n,s,o,c,l)],walkTokens(u){u.type==="footnotes"&&p.tokens.indexOf(u)===0&&u.items.length&&(p.tokens[0]={type:"space",raw:""},p.tokens.push(u)),p.hasFootnotes&&(p.hasFootnotes=!1)}}}function Zt(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var Ot={tada:"\u{1F389}",rocket:"\u{1F680}",warning:"\u26A0\uFE0F",fire:"\u{1F525}",sparkles:"\u2728",thinking:"\u{1F914}",eyes:"\u{1F440}",bug:"\u{1F41B}",wrench:"\u{1F527}",hammer:"\u{1F528}",check:"\u2705",heavy_check_mark:"\u2714\uFE0F",x:"\u274C",question:"\u2753",exclamation:"\u2757",thumbsup:"\u{1F44D}",thumbsdown:"\u{1F44E}",clap:"\u{1F44F}",pray:"\u{1F64F}",ok_hand:"\u{1F44C}",heart:"\u2764\uFE0F",star:"\u2B50",zap:"\u26A1",boom:"\u{1F4A5}",package:"\u{1F4E6}",book:"\u{1F4D6}",memo:"\u{1F4DD}",pencil:"\u270F\uFE0F",mag:"\u{1F50D}",lock:"\u{1F512}",key:"\u{1F511}",gear:"\u2699\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_left:"\u2B05\uFE0F"};function Qe(t){return t.replace(/:([a-z0-9_+-]+):/g,(e,n)=>Object.prototype.hasOwnProperty.call(Ot,n)?Ot[n]:e)}var Xn={name:"mathInline",level:"inline",start(t){let e=t.indexOf("$");return e===-1?void 0:e},tokenizer(t){if(t.startsWith("$$"))return;let e=/^\$(?!\s)([^\n$]+?)(?<!\s)\$/.exec(t);if(e)return{type:"mathInline",raw:e[0],text:e[1]}},renderer(t){return`<span class="math-inline">${Zt(t.text)}</span>`}};function j(t){let e=document.createElement("div");return e.innerHTML=t,(e.textContent??"").replace(/\s+/g," ").trim()}var Xe=new ne;function jt(t){let e=[],n=0,i=(t.match(/^\[\^[^\]\n]+\]:/gm)??[]).length,r={name:"mathBlock",level:"block",start(o){let c=o.indexOf("$$");return c===-1?void 0:c},tokenizer(o){let c=/^\$\$([\s\S]+?)\$\$/.exec(o);if(c)return{type:"mathBlock",raw:c[0],text:c[1].trim()}},renderer(o){let c=o.text,l=`<div class="math-display">${Zt(c)}</div>`;return e.push({index:n++,innerHtml:l,text:c}),""}},s={name:"docusaurusAdmonition",level:"block",start(o){let c=o.indexOf(":::");return c===-1?void 0:c},tokenizer(o){let c=/^:::(note|tip|info|warning|danger|caution|important)\b(?:[ \t]+(.+))?\n([\s\S]*?)\n:::(?=\n|$)/.exec(o);if(c)return{type:"docusaurusAdmonition",raw:c[0],kind:c[1].toLowerCase(),title:c[2]?.trim()??"",body:c[3]}},renderer(o){let c=o,l=c.kind==="info"?"note":c.kind==="danger"?"caution":c.kind,p=c.title||c.kind.charAt(0).toUpperCase()+c.kind.slice(1),u=Xe.parse(c.body).trimEnd(),h=`<blockquote class="admonition admonition-${l}"><p class="admonition-title">${p}</p>${u}</blockquote>`;return e.push({index:n++,innerHtml:h,text:`${p}: ${j(u)}`}),""}},a=new ne;a.use(Ke()),a.use({extensions:[Xn,r,s]}),a.use({renderer:{paragraph(o){let c=this.parser.parseInline(o.tokens),l=Qe(`<p>${c}</p>`);return e.push({index:n++,innerHtml:l,text:j(l)}),""},list(o){let c=o.ordered?"ol":"ul",l=typeof o.start=="number"?o.start:1;for(let p=0;p<o.items.length;p++){let u=o.items[p],h=Xe.parser(u.tokens).trimEnd(),f=u.task?`<input type="checkbox" disabled${u.checked?" checked":""}> `:"",m=`<li${u.task?' class="task-list-item"':""}>${f}${h}</li>`,_=o.ordered?`<ol start="${l+p}">${m}</ol>`:`<${c}>${m}</${c}>`;e.push({index:n++,innerHtml:Qe(_),text:j(m)})}return""},code(o){let c=o.lang??"",l=o.text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");if(c==="mermaid"){let u=`<pre class="mermaid">${l}</pre>`;return e.push({index:n++,innerHtml:u,text:o.text.trim()}),""}let p=c?`<pre><code class="language-${c}">${l}</code></pre>`:`<pre><code>${l}</code></pre>`;return e.push({index:n++,innerHtml:p,text:o.text.trim()}),""},blockquote(o){let c=Xe.parser(o.tokens),l=/\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]/i.exec(c.slice(0,200));if(l){let u=l[1].toLowerCase(),h=u.charAt(0).toUpperCase()+u.slice(1),f=c.replace(/\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*/i,""),m=`<blockquote class="admonition admonition-${u}"><p class="admonition-title">${h}</p>${f}</blockquote>`;return e.push({index:n++,innerHtml:m,text:`${h}: ${j(f)}`}),""}let p=`<blockquote>${c}</blockquote>`.trimEnd();return e.push({index:n++,innerHtml:p,text:j(p)}),""},hr(){return e.push({index:n++,innerHtml:"<hr>",text:"---"}),""},html(o){if("pre"in o){let c=o.text;return e.push({index:n++,innerHtml:c,text:j(c)}),""}return o.text},image(o){let c=o.href??"",l=/^[a-z][a-z0-9+.-]*:/i.test(c),p=c.startsWith("/")||c.startsWith("#");c&&!l&&!p&&(c="/_assets/"+c.split("/").map(encodeURIComponent).join("/"));let u=m=>m.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<"),h=` alt="${u(o.text??"")}"`,f=o.title?` title="${u(o.title)}"`:"";return`<img src="${u(c)}"${h}${f}>`},heading(o){let c=this.parser.parseInline(o.tokens),l=Qe(`<h${o.depth}>${c}</h${o.depth}>`);return e.push({index:n++,innerHtml:l,text:j(l)}),""},table(o){let l=`<thead><tr>${o.header.map(x=>{let k=x.align?` align="${x.align}"`:"",b=this.parser.parseInline(x.tokens);return`<th${k}>${b}</th>`}).join("")}</tr></thead>`,u=`<tbody>${o.rows.map(x=>`<tr>${x.map(b=>{let $=b.align?` align="${b.align}"`:"",E=this.parser.parseInline(b.tokens);return`<td${$}>${E}</td>`}).join("")}</tr>`).join("")}</tbody>`,h=`<table>${l}${u}</table>`,f=o.header.map(x=>x.text).join(" | "),m=o.rows.map(x=>x.map(k=>k.text).join(" | ")),_=[f,...m].join(`
|
|
817
|
+
`);return e.push({index:n++,innerHtml:h,text:_}),""}}}),a.parse(t);for(let o=0;o<i;o++)e.pop();if(i>0){let o=new ne;o.use(Ke());let c=o.parse(t),l=/<section class="footnotes"[\s\S]*?<\/section>/.exec(c);l&&e.push({index:n++,innerHtml:l[0],text:j(l[0])})}return Jn(e)}function Jn(t){let e=(r,s)=>({open:(r.match(new RegExp(`<${s}\\b`,"gi"))??[]).length,close:(r.match(new RegExp(`</${s}>`,"gi"))??[]).length}),n=[],i=0;for(;i<t.length;){let r=t[i],{open:s,close:a}=e(r.innerHtml,"details");if(s<=a){n.push({...r,index:n.length}),i++;continue}let o=r.innerHtml,c=r.text,l=s-a,p=i+1;for(;p<t.length&&l>0;){let u=t[p];o+=u.innerHtml,c+=`
|
|
818
|
+
`+u.text;let h=e(u.innerHtml,"details");l+=h.open-h.close,p++}n.push({index:n.length,innerHtml:o,text:c}),i=p}return n}function Yn(t,e,n,i){return i&&!t?"\u25C6":e?"\u25B6":n?"\u25C0":t?"\u2014":"+"}function Ft({block:t,isInRange:e,isRangeStart:n,isRangeEnd:i,hasComment:r,isPendingComment:s,isHovered:a,onGutterClick:o,onMouseEnter:c,onMouseLeave:l}){let p=["line-block",a&&!e?"hovered":"",e?"in-range":"",r&&!e?"has-comment":"",s&&!e&&!r?"pending-comment":""].filter(Boolean).join(" ");return d("div",{class:p,onMouseEnter:()=>c(t.index),onMouseLeave:()=>l(),children:[d("div",{class:"line-gutter",onClick:u=>o(t.index,u.shiftKey),title:e?void 0:"Click to start selection",children:Yn(e,n,i,r)}),d("div",{class:"line-inner",dangerouslySetInnerHTML:{__html:t.innerHtml}})]})}function Gt({section:t,mode:e,isActive:n,pendingAnchor:i,commentedLines:r,onLineComment:s,onSectionComment:a}){let o=e==="plan"?t.level===3:t.level>=2,c=e==="plan"&&t.level===3&&t.dependencies,l=Be(()=>jt(t.body),[t.body]),[p,u]=R(null),[h,f]=R(null),m=(_,x)=>{if(h===null||!x)f(_);else{let k=Math.min(h,_),b=Math.max(h,_),$=l.slice(k,b+1).map(E=>E.text);s(t.id,k,b,$),f(null)}};return d("div",{id:`section-${t.id}`,class:`section-view${n?" active":""}${i===null?" being-commented":""}`,children:[d("h2",{children:t.heading}),c&&d("div",{class:"section-meta",children:[t.dependencies.dependsOn.length>0&&d("span",{children:["Depends on: ",t.dependencies.dependsOn.join(", ")]}),t.dependencies.blocks.length>0&&d("span",{children:["Blocks: ",t.dependencies.blocks.join(", ")]}),t.relatedFiles&&t.relatedFiles.length>0&&d("span",{children:["Files: ",t.relatedFiles.join(", ")]}),t.verification&&d("span",{children:["Verify: ",t.verification]})]}),h!==null&&d("div",{class:"range-start-hint",children:"Shift-click another line to select a range, or shift-click the same line to comment on it alone."}),d("div",{class:"section-body",children:l.map(_=>{let x=h!==null&&p!==null&&_.index>=Math.min(h,p)&&_.index<=Math.max(h,p),k=h!==null&&p!==null&&_.index===Math.min(h,p),b=h!==null&&p!==null&&_.index===Math.max(h,p),$=i!=null&&_.index>=i.startLine&&_.index<=i.endLine;return d(Ft,{block:_,isInRange:x,isRangeStart:k,isRangeEnd:b,hasComment:r.has(_.index),isPendingComment:$,isHovered:p===_.index,onGutterClick:m,onMouseEnter:u,onMouseLeave:()=>u(null)},_.index)})}),o&&d("span",{class:"add-section-comment-link",onClick:()=>a(t.id),children:"Add comment to entire section"})]})}function we({sectionId:t,anchor:e,onSubmit:n,onCancel:i,initialText:r=""}){let[s,a]=R(r),o=()=>{let l=s.trim();l&&(n(t,l,e),a(""))},c=e?e.startLine===e.endLine?`Commenting on line ${e.startLine+1}:`:`Commenting on lines ${e.startLine+1}\u2013${e.endLine+1}:`:"Commenting on entire section:";return d("div",{class:"comment-input",children:[d("div",{class:e?"comment-anchor-label":"comment-section-label",children:c}),e&&d("div",{class:"comment-anchor-quote",children:e.lineTexts.map((l,p)=>d("p",{children:l},p))}),d("textarea",{placeholder:"Add a comment...",value:s,onInput:l=>a(l.target.value)}),d("div",{class:"comment-input-actions",children:[d("button",{class:"add-btn",onClick:o,children:"Add"}),d("button",{class:"cancel-btn",onClick:i,children:"Cancel"})]})]})}function Ut({comment:t,onEdit:e,onDelete:n}){let[i,r]=R(!1);if(i)return d(we,{sectionId:t.sectionId,anchor:t.anchor,initialText:t.text,onSubmit:(a,o)=>{e(o),r(!1)},onCancel:()=>r(!1)});let s=t.anchor?t.anchor.startLine===t.anchor.endLine?`Line ${t.anchor.startLine+1}`:`Lines ${t.anchor.startLine+1}\u2013${t.anchor.endLine+1}`:null;return d("div",{class:"comment-card",children:[s?d(Z,{children:[d("div",{class:"comment-anchor-label",children:s}),d("div",{class:"comment-anchor-quote",children:t.anchor.lineTexts.map((a,o)=>d("p",{children:a},o))})]}):d("div",{class:"comment-section-label",children:"Entire section"}),d("div",{class:"comment-text",children:t.text}),d("div",{class:"comment-actions",children:[d("button",{onClick:()=>r(!0),children:"Edit"}),d("button",{class:"delete",onClick:n,children:"Delete"})]})]})}function er(t){return[...t].sort((e,n)=>{let i=e.comment.anchor?.startLine??1/0,r=n.comment.anchor?.startLine??1/0;return i-r})}function Wt({comments:t,sections:e,commentingTarget:n,onAdd:i,onEdit:r,onDelete:s,onCancelComment:a}){let o=new Set(e.map(u=>u.id)),c=u=>!o.has(u),l=u=>e.find(h=>h.id===u)?.heading??u,p=new Map;return t.forEach((u,h)=>{let f=p.get(u.sectionId)??[];f.push({comment:u,index:h}),p.set(u.sectionId,f)}),d("aside",{class:"comment-sidebar",children:[d("h2",{children:["Comments (",t.length,")"]}),n&&d("div",{class:"commenting-for",children:[d("h3",{children:l(n.sectionId)}),d(we,{sectionId:n.sectionId,anchor:n.anchor,onSubmit:i,onCancel:a})]}),Array.from(p.entries()).map(([u,h])=>{let f=c(u);return d("div",{class:f?"comment-group orphan":"comment-group",children:[d("h3",{title:f?"This comment is anchored to a section that no longer exists in the plan. The plan may have changed since the comment was written.":void 0,children:[f&&d("span",{class:"orphan-badge","aria-label":"orphan section",children:"\u26A0"}),l(u),f&&d("span",{class:"orphan-suffix",children:" (orphan)"})]}),er(h).map(({comment:m,index:_})=>d(Ut,{comment:m,onEdit:x=>r(_,x),onDelete:()=>s(_)},_))]},u)}),t.length===0&&!n&&d("p",{class:"no-comments",children:"No comments yet. Hover a line and click + to start."})]})}function Vt({commentCount:t,onSubmit:e}){let[n,i]=R(!1),[r,s]=R("approved"),[a,o]=R(""),[c,l]=R(!1),p=fe(null);D(()=>{if(!n)return;let f=_=>{_.key==="Escape"&&i(!1)},m=_=>{let x=_.target;p.current&&x&&!p.current.contains(x)&&i(!1)};return document.addEventListener("keydown",f),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("mousedown",m)}},[n]);let u=r==="approved"||a.trim()!==""||t>0;return d("div",{class:"submit-panel",ref:p,children:[d("button",{type:"button",class:"submit-btn",disabled:c,onClick:()=>i(f=>!f),children:["Submit Review ",d("span",{class:"caret",children:"\u25BE"})]}),n&&d("div",{class:"submit-popover",role:"dialog","aria-label":"Submit review",children:[d("label",{class:"submit-radio",children:[d("input",{type:"radio",name:"verdict",checked:r==="approved",onChange:()=>s("approved")}),"Approve"]}),d("label",{class:"submit-radio",children:[d("input",{type:"radio",name:"verdict",checked:r===null,onChange:()=>s(null)}),"Comment"]}),d("textarea",{class:"submit-summary",placeholder:"Leave a summary...",value:a,onInput:f=>o(f.currentTarget.value)}),d("div",{class:"submit-actions",children:[d("button",{type:"button",onClick:()=>i(!1),disabled:c,children:"Cancel"}),d("button",{type:"button",class:"submit-confirm",onClick:async()=>{if(!(!u||c)){l(!0);try{await e(r,a)}finally{l(!1)}}},disabled:!u||c,children:"Submit"})]})]})]})}var tr="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs",nr=[{role:"decision",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\{\{?[^}]+\}\}?/g},{role:"start",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\(\(\s*(?:start|begin|init)[^)]*\)\)/gi},{role:"end",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\(\(\s*(?:end|done|finish|complete)[^)]*\)\)/gi},{role:"start",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\(\[\s*(?:start|begin)[^\]]*\]\)/gi},{role:"end",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\(\[\s*(?:end|done|finish)[^\]]*\]\)/gi},{role:"error",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\[[^\]]*\b(?:error|fail|abort|reject|invalid)[^\]]*\]/gi},{role:"io",re:/\b([A-Za-z_][A-Za-z0-9_]*)\s*\[[/\\][^\]]+[/\\]\]/g}];function rr(t){let e={};for(let{role:n,re:i}of nr){i.lastIndex=0;let r;for(;(r=i.exec(t))!==null;)e[r[1]]||(e[r[1]]=n)}return e}var ir=/^(?:yes|true|ok|success|pass|1)$/i,sr=/^(?:no|false|fail|error|reject|0)$/i;function or(t){let e=/([A-Za-z_][A-Za-z0-9_]*)\s*(?:-->|---|==>|-\.->)\s*\|([^|]+)\|\s*([A-Za-z_][A-Za-z0-9_]*)/g,n=[],i;for(;(i=e.exec(t))!==null;){let r=i[2].trim(),s=ir.test(r)?"yes":sr.test(r)?"no":null;n.push({from:i[1],to:i[3],branch:s,label:r})}return n}function ar(t,e){let n=Object.keys(e);for(let i of t.querySelectorAll("g.node")){let r=i.id??"",s=null;for(let a of n)if(new RegExp(`(^|[-_])${a}([-_]|$)`).test(r)){s=a;break}s?i.setAttribute("data-role",e[s]):i.setAttribute("data-role",i.querySelector("polygon")?"decision":"process")}}function lr(t,e){for(let n of e){if(!n.branch)continue;let i=`edge-${n.branch}`,r=`edge-${n.branch}-label`,s=`[id*="_${n.from}_${n.to}_"], [id*="-${n.from}-${n.to}-"]`;for(let o of t.querySelectorAll(s))o.classList.add(i);let a=n.label.trim().toLowerCase();for(let o of t.querySelectorAll("g.edgeLabel, .edgeLabel"))(o.textContent??"").trim().toLowerCase()===a&&o.classList.add(r)}}function cr(t){let e=new Map,n=0;for(let r of t.querySelectorAll("rect.actor")){let s=Math.round(parseFloat(r.getAttribute("x")??"0"));e.has(s)||e.set(s,n++);let a=e.get(s)%6;r.setAttribute("data-actor-idx",String(a));let o=r.parentElement;o&&o.classList.contains("actor")&&o.setAttribute("data-actor-idx",String(a))}t.querySelectorAll("line.actor-line").forEach((r,s)=>r.setAttribute("data-actor-idx",String(s%6)))}var W=null;function ur(){return W||(W=new Promise((t,e)=>{if(window.__mermaid){t(window.__mermaid);return}let n="plan-review:mermaid-loaded",i=()=>{window.__mermaid?t(window.__mermaid):e(new Error("mermaid module missing after load"))};window.addEventListener(n,i,{once:!0});let r=document.createElement("script");r.type="module",r.textContent=`
|
|
819
|
+
import mermaid from '${tr}';
|
|
729
820
|
window.__mermaid = mermaid;
|
|
730
|
-
window.dispatchEvent(new Event('${
|
|
731
|
-
`,
|
|
732
|
-
import katex from '${
|
|
821
|
+
window.dispatchEvent(new Event('${n}'));
|
|
822
|
+
`,r.onerror=()=>e(new Error("mermaid script tag error")),document.head.appendChild(r)}),W.catch(()=>{W=null}),W)}async function Kt(t=document){let e=t.querySelectorAll("pre.mermaid:not([data-processed])");if(e.length===0)return;let n;try{n=await ur()}catch{return}n.initialize({startOnLoad:!1,theme:"dark",securityLevel:"loose",fontFamily:"inherit"}),await Promise.all(Array.from(e).map(async i=>{let r=i.textContent??"",s=rr(r),a=or(r);try{await n.run({nodes:[i]})}catch{return}let o=i.querySelector("svg");o&&(ar(o,s),lr(o,a),cr(o))}))}var pr="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.mjs",hr="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css",V=null;function dr(){if(document.querySelector("link[data-plan-review-katex]"))return;let t=document.createElement("link");t.rel="stylesheet",t.href=hr,t.setAttribute("data-plan-review-katex","1"),document.head.appendChild(t)}function fr(){return V||(dr(),V=new Promise((t,e)=>{if(window.__katex){t(window.__katex);return}let n="plan-review:katex-loaded",i=()=>{window.__katex?t(window.__katex):e(new Error("katex module missing after load"))};window.addEventListener(n,i,{once:!0});let r=document.createElement("script");r.type="module",r.textContent=`
|
|
823
|
+
import katex from '${pr}';
|
|
733
824
|
window.__katex = katex;
|
|
734
|
-
window.dispatchEvent(new Event('${
|
|
735
|
-
`,
|
|
825
|
+
window.dispatchEvent(new Event('${n}'));
|
|
826
|
+
`,r.onerror=()=>e(new Error("katex script tag error")),document.head.appendChild(r)}),V.catch(()=>{V=null}),V)}async function Qt(t=document){let e=t.querySelectorAll(".math-inline:not([data-processed]), .math-display:not([data-processed])");if(e.length===0)return;let n;try{n=await fr()}catch{return}for(let i of Array.from(e)){let r=(i.textContent??"").trim(),s=i.classList.contains("math-display");try{n.render(r,i,{displayMode:s,throwOnError:!1}),i.setAttribute("data-processed","true")}catch{}}}function Xt({client:t}){let[e,n]=R(null),[i,r]=R([]),[s,a]=R(null),[o,c]=R(null),[l,p]=R(!1),[u,h]=R(null),[f,m]=R(!1),[_,x]=R(null),k=fe(!1);D(()=>{if(!k.current&&(k.current=i.length>0||e!==null,!k.current)||_===null)return;let g=setTimeout(()=>{t.saveSession({comments:i,activeSection:s,contentHash:_}).catch(()=>{})},500);return()=>clearTimeout(g)},[i,s,t,_]),D(()=>{let g=()=>{_!==null&&t.saveSession({comments:i,activeSection:s,contentHash:_}).catch(()=>{})};return window.addEventListener("beforeunload",g),()=>window.removeEventListener("beforeunload",g)},[t,i,s,_]),D(()=>{t.loadDocument().then(g=>{n(g.document),g.contentHash&&x(g.contentHash),g.restoredSession&&(r(g.restoredSession.comments),a(g.restoredSession.activeSection),g.restoredSession.stale&&m(!0))}).catch(g=>h(g.message))},[t]),D(()=>{let g=v=>{let T=v.data;T?.kind==="event"&&T?.type==="planChanged"&&_&&T.newContentHash!==_&&m(!0)};return window.addEventListener("message",g),()=>window.removeEventListener("message",g)},[_]),D(()=>{e&&(Kt(),Qt())},[e]),D(()=>{if(l)return;let g=K=>{try{let Se=fetch(K,{method:"POST",keepalive:!0});Se&&typeof Se.catch=="function"&&Se.catch(()=>{})}catch{}},v=setInterval(()=>{document.visibilityState==="visible"&&g("/api/heartbeat")},5e3),T=()=>{document.visibilityState==="visible"?g("/api/heartbeat"):g("/api/pause")};document.addEventListener("visibilitychange",T);let z=()=>{navigator.sendBeacon?.("/api/cancel")};return window.addEventListener("beforeunload",z),g("/api/heartbeat"),()=>{clearInterval(v),document.removeEventListener("visibilitychange",T),window.removeEventListener("beforeunload",z)}},[l]);let b=g=>{a(g),document.getElementById(`section-${g}`)?.scrollIntoView({behavior:"smooth"})},$=(g,v,T)=>{r(z=>[...z,{sectionId:g,text:v,timestamp:new Date,anchor:T}]),c(null)},E=(g,v)=>{r(T=>T.map((z,K)=>K===g?{...z,text:v}:z))},I=g=>{r(v=>v.filter((T,z)=>z!==g))},M=async(g,v)=>{try{await t.submitReview({comments:i,verdict:g,summary:v}),p(!0)}catch{h("Failed to submit review")}},A=new Map;for(let g of i)if(g.anchor){let v=A.get(g.sectionId)??new Set;for(let T=g.anchor.startLine;T<=g.anchor.endLine;T++)v.add(T);A.set(g.sectionId,v)}return l?d("div",{class:"submitted",children:"Review submitted. You can close this tab."}):u?d("div",{class:"loading",children:["Error: ",u]}):e?d("div",{class:"app",children:[f&&d("div",{class:"banner banner-warn",children:["The plan has changed since this review was last saved \u2014 comments may no longer match the current content.",d("button",{onClick:()=>m(!1),children:"Dismiss"})]}),d("header",{class:"top-bar",children:[d("h1",{children:e.title}),d("span",{class:"mode-badge",children:e.mode}),d("span",{class:"comment-count",children:[i.length," comment",i.length!==1?"s":""]}),d(Vt,{commentCount:i.length,onSubmit:M})]}),d("div",{class:"panels",children:[d(St,{doc:e,comments:i,activeSection:s,onNavigate:b}),d("main",{class:"content-area",children:e.sections.map(g=>d(Gt,{section:g,mode:e.mode,isActive:s===g.id,pendingAnchor:o?.sectionId===g.id?o.anchor??null:void 0,commentedLines:A.get(g.id)??new Set,onLineComment:(v,T,z,K)=>c({sectionId:v,anchor:{type:"lines",startLine:T,endLine:z,lineTexts:K}}),onSectionComment:v=>c({sectionId:v})},g.id))}),d(Wt,{comments:i,sections:e.sections,commentingTarget:o,onAdd:$,onEdit:E,onDelete:I,onCancelComment:()=>c(null)})]})]}):d("div",{class:"loading",children:"Loading..."})}var ye=class{async loadDocument(){let e=await fetch("/api/doc");if(!e.ok)throw new Error(`loadDocument failed: ${e.status}`);return e.json()}async saveSession(e){let n=await fetch("/api/session",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`saveSession failed: ${n.status}`)}async submitReview(e){let n=await fetch("/api/review",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`submitReview failed: ${n.status}`);return{ok:!0}}};var mr=window.__REVIEW_CLIENT__??new ye;ht(d(Xt,{client:mr}),document.getElementById("app"));})();
|
|
736
827
|
</script>
|
|
737
828
|
</body>
|
|
738
829
|
</html>
|