bangonit 0.4.3 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +2 -1
  2. package/app/desktopapp/dist/main/index.js +10 -4
  3. package/app/desktopapp/dist/main/ipc.js +9 -24
  4. package/app/desktopapp/dist/main/preload.js +0 -7
  5. package/app/desktopapp/dist/main/tabs.js +10 -5
  6. package/app/desktopapp/package.json +0 -1
  7. package/app/replay/dist/replay.js +2 -2
  8. package/app/webapp/.next/standalone/app/webapp/.next/BUILD_ID +1 -1
  9. package/app/webapp/.next/standalone/app/webapp/.next/app-build-manifest.json +11 -11
  10. package/app/webapp/.next/standalone/app/webapp/.next/app-path-routes-manifest.json +1 -1
  11. package/app/webapp/.next/standalone/app/webapp/.next/build-manifest.json +3 -3
  12. package/app/webapp/.next/standalone/app/webapp/.next/prerender-manifest.json +1 -1
  13. package/app/webapp/.next/standalone/app/webapp/.next/required-server-files.json +1 -1
  14. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found/page.js +1 -1
  15. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.html +1 -1
  17. package/app/webapp/.next/standalone/app/webapp/.next/server/app/_not-found.rsc +1 -1
  18. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/chat/route.js +1 -1
  19. package/app/webapp/.next/standalone/app/webapp/.next/server/app/api/screenshot/route.js +1 -1
  20. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app/page.js +6 -6
  21. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app/page_client-reference-manifest.js +1 -1
  22. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.html +1 -1
  23. package/app/webapp/.next/standalone/app/webapp/.next/server/app/app.rsc +2 -2
  24. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.html +1 -1
  25. package/app/webapp/.next/standalone/app/webapp/.next/server/app/index.rsc +1 -1
  26. package/app/webapp/.next/standalone/app/webapp/.next/server/app/page.js +1 -1
  27. package/app/webapp/.next/standalone/app/webapp/.next/server/app/page_client-reference-manifest.js +1 -1
  28. package/app/webapp/.next/standalone/app/webapp/.next/server/app-paths-manifest.json +1 -1
  29. package/app/webapp/.next/standalone/app/webapp/.next/server/chunks/679.js +1 -1
  30. package/app/webapp/.next/standalone/app/webapp/.next/server/chunks/708.js +3 -3
  31. package/app/webapp/.next/standalone/app/webapp/.next/server/middleware-build-manifest.js +1 -1
  32. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/404.html +1 -1
  33. package/app/webapp/.next/standalone/app/webapp/.next/server/pages/500.html +1 -1
  34. package/app/webapp/.next/standalone/app/webapp/.next/server/server-reference-manifest.json +1 -1
  35. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/app/page-533a30559a8f39fa.js +1 -0
  36. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/layout-40f50d9380154ecf.js +1 -0
  37. package/app/webapp/.next/{static/chunks/main-app-106dd83f859b9dfa.js → standalone/app/webapp/.next/static/chunks/main-app-76384b941f0b51cb.js} +1 -1
  38. package/app/webapp/.next/standalone/app/webapp/package.json +2 -6
  39. package/app/webapp/.next/standalone/app/webapp/server.js +1 -1
  40. package/app/webapp/.next/standalone/package.json +18 -6
  41. package/app/webapp/.next/static/chunks/app/app/page-533a30559a8f39fa.js +1 -0
  42. package/app/webapp/.next/static/chunks/app/layout-40f50d9380154ecf.js +1 -0
  43. package/app/webapp/.next/{standalone/app/webapp/.next/static/chunks/main-app-106dd83f859b9dfa.js → static/chunks/main-app-76384b941f0b51cb.js} +1 -1
  44. package/app/webapp/package.json +2 -6
  45. package/app/webapp/skills/document-review.md +1 -0
  46. package/app/webapp/skills/gmail.md +2 -0
  47. package/app/webapp/src/app/globals.css +8 -3
  48. package/app/webapp/src/app/layout.tsx +2 -8
  49. package/app/webapp/src/shared/api/chat.ts +49 -25
  50. package/app/webapp/src/shared/api/screenshot.ts +11 -10
  51. package/app/webapp/src/shared/components/AppShell.tsx +80 -109
  52. package/app/webapp/src/shared/components/SessionView.tsx +335 -248
  53. package/app/webapp/src/shared/components/VirtualCursor.tsx +13 -14
  54. package/app/webapp/src/shared/lib/browser/cursor.ts +2 -7
  55. package/app/webapp/src/shared/lib/browser/index.ts +56 -36
  56. package/app/webapp/src/shared/lib/browser/mouse.ts +86 -21
  57. package/app/webapp/src/shared/lib/browser/navigate.ts +1 -4
  58. package/app/webapp/src/shared/lib/browser/recorder.ts +12 -5
  59. package/app/webapp/src/shared/lib/browser/screenshot.ts +4 -4
  60. package/app/webapp/src/shared/lib/browser/snapshot.ts +9 -5
  61. package/app/webapp/src/shared/lib/browser/tabs.ts +1 -1
  62. package/app/webapp/src/shared/lib/browser/types.ts +3 -2
  63. package/app/webapp/src/shared/lib/browser/wait.ts +1 -1
  64. package/app/webapp/src/shared/lib/recorder/session-recorder.ts +1 -1
  65. package/app/webapp/src/shared/types/global.d.ts +8 -19
  66. package/app/webapp/tailwind.config.js +1 -3
  67. package/bin/src/cli/bangonit.js +270 -177
  68. package/package.json +18 -6
  69. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/app/page-03dbc2fc67c26b74.js +0 -1
  70. package/app/webapp/.next/standalone/app/webapp/.next/static/chunks/app/layout-57acb80d8da0067a.js +0 -1
  71. package/app/webapp/.next/static/chunks/app/app/page-03dbc2fc67c26b74.js +0 -1
  72. package/app/webapp/.next/static/chunks/app/layout-57acb80d8da0067a.js +0 -1
  73. /package/app/webapp/.next/standalone/app/webapp/.next/static/{z2gRF0NKwztPLZ9d7ok06 → kz1a_SRPtSly3Fe8wHKDq}/_buildManifest.js +0 -0
  74. /package/app/webapp/.next/standalone/app/webapp/.next/static/{z2gRF0NKwztPLZ9d7ok06 → kz1a_SRPtSly3Fe8wHKDq}/_ssgManifest.js +0 -0
  75. /package/app/webapp/.next/static/{z2gRF0NKwztPLZ9d7ok06 → kz1a_SRPtSly3Fe8wHKDq}/_buildManifest.js +0 -0
  76. /package/app/webapp/.next/static/{z2gRF0NKwztPLZ9d7ok06 → kz1a_SRPtSly3Fe8wHKDq}/_ssgManifest.js +0 -0
@@ -39,7 +39,7 @@
39
39
  Error generating stack: `+l.message+`
40
40
  `+l.stack}return{value:e,source:t,stack:i,digest:null}}function _u(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Iu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Pg=typeof WeakMap=="function"?WeakMap:Map;function zf(e,t,n){n=Nt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){pl||(pl=!0,Vu=r),Iu(e,t)},n}function Tf(e,t,n){n=Nt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Iu(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Iu(e,t),typeof r!="function"&&(Gt===null?Gt=new Set([this]):Gt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pg;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ug.bind(null,e,t,n),t.then(e,e))}function _f(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function If(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Nt(-1,1),t.tag=2,qt(n,t,1))),n.lanes|=1),e)}var _g=Et.ReactCurrentOwner,Oe=!1;function De(e,t,n,r){t.child=e===null?Kc(t,null,n,r):Wn(t,e.child,n,r)}function Nf(e,t,n,r,i){n=n.render;var l=t.ref;return Yn(t,i),r=vu(e,t,n,r,l,i),n=wu(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Lt(e,t,i)):(se&&n&&ru(t),t.flags|=1,De(e,t,r,i),t.child)}function Lf(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!Gu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Af(e,t,l,r,i)):(e=xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&i)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:Lr,n(o,r)&&e.ref===t.ref)return Lt(e,t,i)}return t.flags|=1,e=tn(l,r),e.ref=t.ref,e.return=t,t.child=e}function Af(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(Lr(l,r)&&e.ref===t.ref)if(Oe=!1,t.pendingProps=r=l,(e.lanes&i)!==0)e.flags&131072&&(Oe=!0);else return t.lanes=e.lanes,Lt(e,t,i)}return Nu(e,t,n,r,i)}function Df(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Gn,Ke),Ke|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ne(Gn,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,ne(Gn,Ke),Ke|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,ne(Gn,Ke),Ke|=r;return De(e,t,i,n),t.child}function Rf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nu(e,t,n,r,i){var l=Me(n)?an:ze.current;return l=Un(t,l),Yn(t,i),n=vu(e,t,n,r,l,i),r=wu(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Lt(e,t,i)):(se&&r&&ru(t),t.flags|=1,De(e,t,n,i),t.child)}function bf(e,t,n,r,i){if(Me(n)){var l=!0;Hi(t)}else l=!1;if(Yn(t,i),t.stateNode===null)ul(e,t),Cf(t,n,r),Pu(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,a=n.contextType;typeof a=="object"&&a!==null?a=et(a):(a=Me(n)?an:ze.current,a=Un(t,a));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";c||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==a)&&Ef(t,o,r,a),Kt=!1;var p=t.memoizedState;o.state=p,Ji(t,r,o,i),s=t.memoizedState,u!==r||p!==s||Fe.current||Kt?(typeof f=="function"&&(Tu(t,n,f,r),s=t.memoizedState),(u=Kt||Sf(t,n,u,r,p,s,a))?(c||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=a,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Xc(e,t),u=t.memoizedProps,a=t.type===t.elementType?u:st(t.type,u),o.props=a,c=t.pendingProps,p=o.context,s=n.contextType,typeof s=="object"&&s!==null?s=et(s):(s=Me(n)?an:ze.current,s=Un(t,s));var d=n.getDerivedStateFromProps;(f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==c||p!==s)&&Ef(t,o,r,s),Kt=!1,p=t.memoizedState,o.state=p,Ji(t,r,o,i);var g=t.memoizedState;u!==c||p!==g||Fe.current||Kt?(typeof d=="function"&&(Tu(t,n,d,r),g=t.memoizedState),(a=Kt||Sf(t,n,a,r,p,g,s)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,s),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,s)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),o.props=r,o.state=g,o.context=s,r=a):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Lu(e,t,n,r,l,i)}function Lu(e,t,n,r,i,l){Rf(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&jc(t,n,!1),Lt(e,t,l);r=t.stateNode,_g.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Wn(t,e.child,null,l),t.child=Wn(t,null,u,l)):De(e,t,u,l),t.memoizedState=r.state,i&&jc(t,n,!0),t.child}function Ff(e){var t=e.stateNode;t.pendingContext?Mc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mc(e,t.context,!1),hu(e,t.containerInfo)}function Mf(e,t,n,r,i){return Vn(),uu(i),t.flags|=256,De(e,t,n,r),t.child}var Au={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function Of(e,t,n){var r=t.pendingProps,i=fe.current,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ne(fe,i&1),e===null)return ou(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,l?(r=t.mode,l=t.child,o={mode:"hidden",children:o},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=o):l=kl(o,r,0,null),e=kn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Du(n),t.memoizedState=Au,e):Ru(t,o));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return Ig(e,t,o,r,u,i,n);if(l){l=r.fallback,o=t.mode,i=e.child,u=i.sibling;var s={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=tn(i,s),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?l=tn(u,l):(l=kn(l,o,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,o=e.child.memoizedState,o=o===null?Du(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},l.memoizedState=o,l.childLanes=e.childLanes&~n,t.memoizedState=Au,r}return l=e.child,e=l.sibling,r=tn(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ru(e,t){return t=kl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ol(e,t,n,r){return r!==null&&uu(r),Wn(t,e.child,null,n),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ig(e,t,n,r,i,l,o){if(n)return t.flags&256?(t.flags&=-257,r=_u(Error(_(422))),ol(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=kl({mode:"visible",children:r.children},i,0,null),l=kn(l,i,o,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Wn(t,e.child,null,o),t.child.memoizedState=Du(o),t.memoizedState=Au,l);if(!(t.mode&1))return ol(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,l=Error(_(419)),r=_u(l,r,void 0),ol(e,t,o,r)}if(u=(o&e.childLanes)!==0,Oe||u){if(r=we,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,It(e,i),ft(r,e,i,-1))}return Xu(),r=_u(Error(_(421))),ol(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=$g.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,Ye=Vt(i.nextSibling),Qe=t,se=!0,ut=null,e!==null&&(Je[Ze++]=Pt,Je[Ze++]=_t,Je[Ze++]=cn,Pt=e.id,_t=e.overflow,cn=t),t=Ru(t,r.children),t.flags|=4096,t)}function jf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fu(e.return,t,n)}function bu(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function Bf(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(De(e,t,r.children,n),r=fe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jf(e,n,t);else if(e.tag===19)jf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ne(fe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Zi(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bu(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Zi(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bu(t,!0,n,null,l);break;case"together":bu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ul(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=tn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ng(e,t,n){switch(t.tag){case 3:Ff(t),Vn();break;case 5:Zc(t);break;case 1:Me(t.type)&&Hi(t);break;case 4:hu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ne(qi,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ne(fe,fe.current&1),t.flags|=128,null):n&t.child.childLanes?Of(e,t,n):(ne(fe,fe.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);ne(fe,fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Bf(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ne(fe,fe.current),r)break;return null;case 22:case 23:return t.lanes=0,Df(e,t,n)}return Lt(e,t,n)}var Uf,Fu,$f,Hf;Uf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Fu=function(){},$f=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,dn(yt.current);var l=null;switch(n){case"input":i=co(e,i),r=co(e,r),l=[];break;case"select":i=ce({},i,{value:void 0}),r=ce({},r,{value:void 0}),l=[];break;case"textarea":i=ho(e,i),r=ho(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bi)}go(n,r);var o;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var u=i[a];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(cr.hasOwnProperty(a)?l||(l=[]):(l=l||[]).push(a,null));for(a in r){var s=r[a];if(u=i!=null?i[a]:void 0,r.hasOwnProperty(a)&&s!==u&&(s!=null||u!=null))if(a==="style")if(u){for(o in u)!u.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&u[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(l||(l=[]),l.push(a,n)),n=s;else a==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(l=l||[]).push(a,s)):a==="children"?typeof s!="string"&&typeof s!="number"||(l=l||[]).push(a,""+s):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(cr.hasOwnProperty(a)?(s!=null&&a==="onScroll"&&ie("scroll",e),l||u===s||(l=[])):(l=l||[]).push(a,s))}n&&(l=l||[]).push("style",n);var a=l;(t.updateQueue=a)&&(t.flags|=4)}},Hf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qr(e,t){if(!se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lg(e,t,n){var r=t.pendingProps;switch(iu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Me(t.type)&&$i(),Pe(t),null;case 3:return r=t.stateNode,Kn(),le(Fe),le(ze),yu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ut!==null&&(Yu(ut),ut=null))),Fu(e,t),Pe(t),null;case 5:mu(t);var i=dn(Ur.current);if(n=t.type,e!==null&&t.stateNode!=null)$f(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Pe(t),null}if(e=dn(yt.current),Yi(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[gt]=t,r[Fr]=l,e=(t.mode&1)!==0,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(i=0;i<Dr.length;i++)ie(Dr[i],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":Sa(r,l),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ie("invalid",r);break;case"textarea":za(r,l),ie("invalid",r)}go(n,l),i=null;for(var o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="children"?typeof u=="string"?r.textContent!==u&&(l.suppressHydrationWarning!==!0&&ji(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(l.suppressHydrationWarning!==!0&&ji(r.textContent,u,e),i=["children",""+u]):cr.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&ie("scroll",r)}switch(n){case"input":gi(r),Ea(r,l,!0);break;case"textarea":gi(r),Pa(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Bi)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_a(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[gt]=t,e[Fr]=r,Uf(e,t,!1,!1),t.stateNode=e;e:{switch(o=yo(n,r),n){case"dialog":ie("cancel",e),ie("close",e),i=r;break;case"iframe":case"object":case"embed":ie("load",e),i=r;break;case"video":case"audio":for(i=0;i<Dr.length;i++)ie(Dr[i],e);i=r;break;case"source":ie("error",e),i=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),i=r;break;case"details":ie("toggle",e),i=r;break;case"input":Sa(e,r),i=co(e,r),ie("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ce({},r,{value:void 0}),ie("invalid",e);break;case"textarea":za(e,r),i=ho(e,r),ie("invalid",e);break;default:i=r}go(n,i),u=i;for(l in u)if(u.hasOwnProperty(l)){var s=u[l];l==="style"?La(e,s):l==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&Ia(e,s)):l==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&hr(e,s):typeof s=="number"&&hr(e,""+s):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(cr.hasOwnProperty(l)?s!=null&&l==="onScroll"&&ie("scroll",e):s!=null&&Zl(e,l,s,o))}switch(n){case"input":gi(e),Ea(e,r,!1);break;case"textarea":gi(e),Pa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mt(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?In(e,!!r.multiple,l,!1):r.defaultValue!=null&&In(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Bi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Pe(t),null;case 6:if(e&&t.stateNode!=null)Hf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=dn(Ur.current),dn(yt.current),Yi(t)){if(r=t.stateNode,n=t.memoizedProps,r[gt]=t,(l=r.nodeValue!==n)&&(e=Qe,e!==null))switch(e.tag){case 3:ji(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ji(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[gt]=t,t.stateNode=r}return Pe(t),null;case 13:if(le(fe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Ye!==null&&t.mode&1&&!(t.flags&128))Wc(),Vn(),t.flags|=98560,l=!1;else if(l=Yi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(_(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(_(317));l[gt]=t}else Vn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),l=!1}else ut!==null&&(Yu(ut),ut=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||fe.current&1?xe===0&&(xe=3):Xu())),t.updateQueue!==null&&(t.flags|=4),Pe(t),null);case 4:return Kn(),Fu(e,t),e===null&&Rr(t.stateNode.containerInfo),Pe(t),null;case 10:return cu(t.type._context),Pe(t),null;case 17:return Me(t.type)&&$i(),Pe(t),null;case 19:if(le(fe),l=t.memoizedState,l===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)Qr(l,!1);else{if(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Zi(e),o!==null){for(t.flags|=128,Qr(l,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,o=l.alternate,o===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,l.type=o.type,e=o.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ne(fe,fe.current&1|2),t.child}e=e.sibling}l.tail!==null&&he()>Jn&&(t.flags|=128,r=!0,Qr(l,!1),t.lanes=4194304)}else{if(!r)if(e=Zi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!se)return Pe(t),null}else 2*he()-l.renderingStartTime>Jn&&n!==1073741824&&(t.flags|=128,r=!0,Qr(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=he(),t.sibling=null,n=fe.current,ne(fe,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return qu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Ag(e,t){switch(iu(t),t.tag){case 1:return Me(t.type)&&$i(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(),le(Fe),le(ze),yu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mu(t),null;case 13:if(le(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(fe),null;case 4:return Kn(),null;case 10:return cu(t.type._context),null;case 22:case 23:return qu(),null;case 24:return null;default:return null}}var sl=!1,_e=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,b=null;function Xn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function Mu(e,t,n){try{n()}catch(r){de(e,t,r)}}var Vf=!1;function Rg(e,t){if(qo=_i,e=wc(),Uo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,a=0,f=0,c=e,p=null;t:for(;;){for(var d;c!==n||i!==0&&c.nodeType!==3||(u=o+i),c!==l||r!==0&&c.nodeType!==3||(s=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(d=c.firstChild)!==null;)p=c,c=d;for(;;){if(c===e)break t;if(p===n&&++a===i&&(u=o),p===l&&++f===r&&(s=o),(d=c.nextSibling)!==null)break;c=p,p=c.parentNode}c=d}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xo={focusedElem:e,selectionRange:n},_i=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var k=g.memoizedProps,E=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?k:st(t.type,k),E);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(C){de(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return g=Vf,Vf=!1,g}function Yr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&Mu(t,n,l)}i=i.next}while(i!==r)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Wf(e){var t=e.alternate;t!==null&&(e.alternate=null,Wf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[gt],delete t[Fr],delete t[eu],delete t[gg],delete t[yg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Qf(e){return e.tag===5||e.tag===3||e.tag===4}function Yf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Bi));else if(r!==4&&(e=e.child,e!==null))for(ju(e,t,n),e=e.sibling;e!==null;)ju(e,t,n),e=e.sibling}function Bu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}var Ce=null,at=!1;function Xt(e,t,n){for(n=n.child;n!==null;)Kf(e,t,n),n=n.sibling}function Kf(e,t,n){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Si,n)}catch{}switch(n.tag){case 5:_e||Xn(n,t);case 6:var r=Ce,i=at;Ce=null,Xt(e,t,n),Ce=r,at=i,Ce!==null&&(at?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(at?(e=Ce,n=n.stateNode,e.nodeType===8?Zo(e.parentNode,n):e.nodeType===1&&Zo(e,n),zr(e)):Zo(Ce,n.stateNode));break;case 4:r=Ce,i=at,Ce=n.stateNode.containerInfo,at=!0,Xt(e,t,n),Ce=r,at=i;break;case 0:case 11:case 14:case 15:if(!_e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&Mu(n,t,o),i=i.next}while(i!==r)}Xt(e,t,n);break;case 1:if(!_e&&(Xn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){de(n,t,u)}Xt(e,t,n);break;case 21:Xt(e,t,n);break;case 22:n.mode&1?(_e=(r=_e)||n.memoizedState!==null,Xt(e,t,n),_e=r):Xt(e,t,n);break;default:Xt(e,t,n)}}function qf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dg),t.forEach(function(r){var i=Hg.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,o=t,u=o;e:for(;u!==null;){switch(u.tag){case 5:Ce=u.stateNode,at=!1;break e;case 3:Ce=u.stateNode.containerInfo,at=!0;break e;case 4:Ce=u.stateNode.containerInfo,at=!0;break e}u=u.return}if(Ce===null)throw Error(_(160));Kf(l,o,i),Ce=null,at=!1;var s=i.alternate;s!==null&&(s.return=null),i.return=null}catch(a){de(i,t,a)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}function Xf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),kt(e),r&4){try{Yr(3,e,e.return),al(3,e)}catch(k){de(e,e.return,k)}try{Yr(5,e,e.return)}catch(k){de(e,e.return,k)}}break;case 1:ct(t,e),kt(e),r&512&&n!==null&&Xn(n,n.return);break;case 5:if(ct(t,e),kt(e),r&512&&n!==null&&Xn(n,n.return),e.flags&32){var i=e.stateNode;try{hr(i,"")}catch(k){de(e,e.return,k)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,o=n!==null?n.memoizedProps:l,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&l.type==="radio"&&l.name!=null&&Ca(i,l),yo(u,o);var a=yo(u,l);for(o=0;o<s.length;o+=2){var f=s[o],c=s[o+1];f==="style"?La(i,c):f==="dangerouslySetInnerHTML"?Ia(i,c):f==="children"?hr(i,c):Zl(i,f,c,a)}switch(u){case"input":fo(i,l);break;case"textarea":Ta(i,l);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var d=l.value;d!=null?In(i,!!l.multiple,d,!1):p!==!!l.multiple&&(l.defaultValue!=null?In(i,!!l.multiple,l.defaultValue,!0):In(i,!!l.multiple,l.multiple?[]:"",!1))}i[Fr]=l}catch(k){de(e,e.return,k)}}break;case 6:if(ct(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(_(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(k){de(e,e.return,k)}}break;case 3:if(ct(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zr(t.containerInfo)}catch(k){de(e,e.return,k)}break;case 4:ct(t,e),kt(e);break;case 13:ct(t,e),kt(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(Hu=he())),r&4&&qf(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_e=(a=_e)||f,ct(t,e),_e=a):ct(t,e),kt(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!f&&e.mode&1)for(b=e,f=e.child;f!==null;){for(c=b=f;b!==null;){switch(p=b,d=p.child,p.tag){case 0:case 11:case 14:case 15:Yr(4,p,p.return);break;case 1:Xn(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(k){de(r,n,k)}}break;case 5:Xn(p,p.return);break;case 22:if(p.memoizedState!==null){Zf(c);continue}}d!==null?(d.return=p,b=d):Zf(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,a?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(u=c.stateNode,s=c.memoizedProps.style,o=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=Na("display",o))}catch(k){de(e,e.return,k)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(k){de(e,e.return,k)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:ct(t,e),kt(e),r&4&&qf(e);break;case 21:break;default:ct(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Qf(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(hr(i,""),r.flags&=-33);var l=Yf(e);Bu(e,l,i);break;case 3:case 4:var o=r.stateNode.containerInfo,u=Yf(e);ju(e,u,o);break;default:throw Error(_(161))}}catch(s){de(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bg(e,t,n){b=e,Gf(e)}function Gf(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var i=b,l=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||sl;if(!o){var u=i.alternate,s=u!==null&&u.memoizedState!==null||_e;u=sl;var a=_e;if(sl=o,(_e=s)&&!a)for(b=i;b!==null;)o=b,s=o.child,o.tag===22&&o.memoizedState!==null?ep(i):s!==null?(s.return=o,b=s):ep(i);for(;l!==null;)b=l,Gf(l),l=l.sibling;b=i,sl=u,_e=a}Jf(e)}else i.subtreeFlags&8772&&l!==null?(l.return=i,b=l):Jf(e)}}function Jf(e){for(;b!==null;){var t=b;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_e||al(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_e)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:st(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Jc(t,l,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Jc(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var a=t.alternate;if(a!==null){var f=a.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&zr(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}_e||t.flags&512&&Ou(t)}catch(p){de(t,t.return,p)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function Zf(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function ep(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{al(4,t)}catch(s){de(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(s){de(t,i,s)}}var l=t.return;try{Ou(t)}catch(s){de(t,l,s)}break;case 5:var o=t.return;try{Ou(t)}catch(s){de(t,o,s)}}}catch(s){de(t,t.return,s)}if(t===e){b=null;break}var u=t.sibling;if(u!==null){u.return=t.return,b=u;break}b=t.return}}var Fg=Math.ceil,cl=Et.ReactCurrentDispatcher,Uu=Et.ReactCurrentOwner,nt=Et.ReactCurrentBatchConfig,X=0,we=null,me=null,Ee=0,Ke=0,Gn=Wt(0),xe=0,Kr=null,mn=0,fl=0,$u=0,qr=null,je=null,Hu=0,Jn=1/0,At=null,pl=!1,Vu=null,Gt=null,dl=!1,Jt=null,hl=0,Xr=0,Wu=null,ml=-1,gl=0;function Re(){return X&6?he():ml!==-1?ml:ml=he()}function Zt(e){return e.mode&1?X&2&&Ee!==0?Ee&-Ee:kg.transition!==null?(gl===0&&(gl=Qa()),gl):(e=J,e!==0||(e=window.event,e=e===void 0?16:tc(e.type)),e):1}function ft(e,t,n,r){if(50<Xr)throw Xr=0,Wu=null,Error(_(185));vr(e,n,r),(!(X&2)||e!==we)&&(e===we&&(!(X&2)&&(fl|=n),xe===4&&en(e,Ee)),Be(e,r),n===1&&X===0&&!(t.mode&1)&&(Jn=he()+500,Vi&&Yt()))}function Be(e,t){var n=e.callbackNode;km(e,t);var r=zi(e,e===we?Ee:0);if(r===0)n!==null&&Ha(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ha(n),t===1)e.tag===0?xg(np.bind(null,e)):Bc(np.bind(null,e)),hg(function(){!(X&6)&&Yt()}),n=null;else{switch(Ya(r)){case 1:n=Eo;break;case 4:n=Va;break;case 16:n=wi;break;case 536870912:n=Wa;break;default:n=wi}n=cp(n,tp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tp(e,t){if(ml=-1,gl=0,X&6)throw Error(_(327));var n=e.callbackNode;if(Zn()&&e.callbackNode!==n)return null;var r=zi(e,e===we?Ee:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yl(e,r);else{t=r;var i=X;X|=2;var l=ip();(we!==e||Ee!==t)&&(At=null,Jn=he()+500,yn(e,t));do try{jg();break}catch(u){rp(e,u)}while(!0);au(),cl.current=l,X=i,me!==null?t=0:(we=null,Ee=0,t=xe)}if(t!==0){if(t===2&&(i=zo(e),i!==0&&(r=i,t=Qu(e,i))),t===1)throw n=Kr,yn(e,0),en(e,r),Be(e,he()),n;if(t===6)en(e,r);else{if(i=e.current.alternate,!(r&30)&&!Mg(i)&&(t=yl(e,r),t===2&&(l=zo(e),l!==0&&(r=l,t=Qu(e,l))),t===1))throw n=Kr,yn(e,0),en(e,r),Be(e,he()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:xn(e,je,At);break;case 3:if(en(e,r),(r&130023424)===r&&(t=Hu+500-he(),10<t)){if(zi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Re(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jo(xn.bind(null,e,je,At),t);break}xn(e,je,At);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-lt(r);l=1<<o,o=t[o],o>i&&(i=o),r&=~l}if(r=i,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fg(r/1960))-r,10<r){e.timeoutHandle=Jo(xn.bind(null,e,je,At),r);break}xn(e,je,At);break;case 5:xn(e,je,At);break;default:throw Error(_(329))}}}return Be(e,he()),e.callbackNode===n?tp.bind(null,e):null}function Qu(e,t){var n=qr;return e.current.memoizedState.isDehydrated&&(yn(e,t).flags|=256),e=yl(e,t),e!==2&&(t=je,je=n,t!==null&&Yu(t)),e}function Yu(e){je===null?je=e:je.push.apply(je,e)}function Mg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!ot(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function en(e,t){for(t&=~$u,t&=~fl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function np(e){if(X&6)throw Error(_(327));Zn();var t=zi(e,0);if(!(t&1))return Be(e,he()),null;var n=yl(e,t);if(e.tag!==0&&n===2){var r=zo(e);r!==0&&(t=r,n=Qu(e,r))}if(n===1)throw n=Kr,yn(e,0),en(e,t),Be(e,he()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xn(e,je,At),Be(e,he()),null}function Ku(e,t){var n=X;X|=1;try{return e(t)}finally{X=n,X===0&&(Jn=he()+500,Vi&&Yt())}}function gn(e){Jt!==null&&Jt.tag===0&&!(X&6)&&Zn();var t=X;X|=1;var n=nt.transition,r=J;try{if(nt.transition=null,J=1,e)return e()}finally{J=r,nt.transition=n,X=t,!(X&6)&&Yt()}}function qu(){Ke=Gn.current,le(Gn)}function yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dg(n)),me!==null)for(n=me.return;n!==null;){var r=n;switch(iu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&$i();break;case 3:Kn(),le(Fe),le(ze),yu();break;case 5:mu(r);break;case 4:Kn();break;case 13:le(fe);break;case 19:le(fe);break;case 10:cu(r.type._context);break;case 22:case 23:qu()}n=n.return}if(we=e,me=e=tn(e.current,null),Ee=Ke=t,xe=0,Kr=null,$u=fl=mn=0,je=qr=null,pn!==null){for(t=0;t<pn.length;t++)if(n=pn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var o=l.next;l.next=i,r.next=o}n.pending=r}pn=null}return e}function rp(e,t){do{var n=me;try{if(au(),el.current=il,tl){for(var r=pe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}tl=!1}if(hn=0,ve=ye=pe=null,$r=!1,Hr=0,Uu.current=null,n===null||n.return===null){xe=1,Kr=t,me=null;break}e:{var l=e,o=n.return,u=n,s=t;if(t=Ee,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var a=s,f=u,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var d=_f(o);if(d!==null){d.flags&=-257,If(d,o,u,l,t),d.mode&1&&Pf(l,a,t),t=d,s=a;var g=t.updateQueue;if(g===null){var k=new Set;k.add(s),t.updateQueue=k}else g.add(s);break e}else{if(!(t&1)){Pf(l,a,t),Xu();break e}s=Error(_(426))}}else if(se&&u.mode&1){var E=_f(o);if(E!==null){!(E.flags&65536)&&(E.flags|=256),If(E,o,u,l,t),uu(qn(s,u));break e}}l=s=qn(s,u),xe!==4&&(xe=2),qr===null?qr=[l]:qr.push(l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=zf(l,s,t);Gc(l,h);break e;case 1:u=s;var m=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof m.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Gt===null||!Gt.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var C=Tf(l,u,t);Gc(l,C);break e}}l=l.return}while(l!==null)}op(n)}catch(T){t=T,me===n&&n!==null&&(me=n=n.return);continue}break}while(!0)}function ip(){var e=cl.current;return cl.current=il,e===null?il:e}function Xu(){(xe===0||xe===3||xe===2)&&(xe=4),we===null||!(mn&268435455)&&!(fl&268435455)||en(we,Ee)}function yl(e,t){var n=X;X|=2;var r=ip();(we!==e||Ee!==t)&&(At=null,yn(e,t));do try{Og();break}catch(i){rp(e,i)}while(!0);if(au(),X=n,cl.current=r,me!==null)throw Error(_(261));return we=null,Ee=0,xe}function Og(){for(;me!==null;)lp(me)}function jg(){for(;me!==null&&!cm();)lp(me)}function lp(e){var t=ap(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?op(e):me=t,Uu.current=null}function op(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ag(n,t),n!==null){n.flags&=32767,me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{xe=6,me=null;return}}else if(n=Lg(n,t,Ke),n!==null){me=n;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);xe===0&&(xe=5)}function xn(e,t,n){var r=J,i=nt.transition;try{nt.transition=null,J=1,Bg(e,t,n,r)}finally{nt.transition=i,J=r}return null}function Bg(e,t,n,r){do Zn();while(Jt!==null);if(X&6)throw Error(_(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(vm(e,l),e===we&&(me=we=null,Ee=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||dl||(dl=!0,cp(wi,function(){return Zn(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=nt.transition,nt.transition=null;var o=J;J=1;var u=X;X|=4,Uu.current=null,Rg(e,n),Xf(n,e),og(Xo),_i=!!qo,Xo=qo=null,e.current=n,bg(n),fm(),X=u,J=o,nt.transition=l}else e.current=n;if(dl&&(dl=!1,Jt=e,hl=i),l=e.pendingLanes,l===0&&(Gt=null),hm(n.stateNode),Be(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(pl)throw pl=!1,e=Vu,Vu=null,e;return hl&1&&e.tag!==0&&Zn(),l=e.pendingLanes,l&1?e===Wu?Xr++:(Xr=0,Wu=e):Xr=0,Yt(),null}function Zn(){if(Jt!==null){var e=Ya(hl),t=nt.transition,n=J;try{if(nt.transition=null,J=16>e?16:e,Jt===null)var r=!1;else{if(e=Jt,Jt=null,hl=0,X&6)throw Error(_(331));var i=X;for(X|=4,b=e.current;b!==null;){var l=b,o=l.child;if(b.flags&16){var u=l.deletions;if(u!==null){for(var s=0;s<u.length;s++){var a=u[s];for(b=a;b!==null;){var f=b;switch(f.tag){case 0:case 11:case 15:Yr(8,f,l)}var c=f.child;if(c!==null)c.return=f,b=c;else for(;b!==null;){f=b;var p=f.sibling,d=f.return;if(Wf(f),f===a){b=null;break}if(p!==null){p.return=d,b=p;break}b=d}}}var g=l.alternate;if(g!==null){var k=g.child;if(k!==null){g.child=null;do{var E=k.sibling;k.sibling=null,k=E}while(k!==null)}}b=l}}if(l.subtreeFlags&2064&&o!==null)o.return=l,b=o;else e:for(;b!==null;){if(l=b,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Yr(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,b=h;break e}b=l.return}}var m=e.current;for(b=m;b!==null;){o=b;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,b=y;else e:for(o=m;b!==null;){if(u=b,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:al(9,u)}}catch(T){de(u,u.return,T)}if(u===o){b=null;break e}var C=u.sibling;if(C!==null){C.return=u.return,b=C;break e}b=u.return}}if(X=i,Yt(),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Si,e)}catch{}r=!0}return r}finally{J=n,nt.transition=t}}return!1}function up(e,t,n){t=qn(n,t),t=zf(e,t,1),e=qt(e,t,1),t=Re(),e!==null&&(vr(e,1,t),Be(e,t))}function de(e,t,n){if(e.tag===3)up(e,e,n);else for(;t!==null;){if(t.tag===3){up(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gt===null||!Gt.has(r))){e=qn(n,e),e=Tf(t,e,1),t=qt(t,e,1),e=Re(),t!==null&&(vr(t,1,e),Be(t,e));break}}t=t.return}}function Ug(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&n,we===e&&(Ee&n)===n&&(xe===4||xe===3&&(Ee&130023424)===Ee&&500>he()-Hu?yn(e,0):$u|=n),Be(e,t)}function sp(e,t){t===0&&(e.mode&1?(t=Ei,Ei<<=1,!(Ei&130023424)&&(Ei=4194304)):t=1);var n=Re();e=It(e,t),e!==null&&(vr(e,t,n),Be(e,n))}function $g(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sp(e,n)}function Hg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),sp(e,n)}var ap;ap=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Oe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Oe=!1,Ng(e,t,n);Oe=!!(e.flags&131072)}else Oe=!1,se&&t.flags&1048576&&Uc(t,Qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ul(e,t),e=t.pendingProps;var i=Un(t,ze.current);Yn(t,n),i=vu(null,t,r,e,i,n);var l=wu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Me(r)?(l=!0,Hi(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,du(t),i.updater=ll,t.stateNode=i,i._reactInternals=t,Pu(t,r,e,n),t=Lu(null,t,r,!0,l,n)):(t.tag=0,se&&l&&ru(t),De(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ul(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Wg(r),e=st(r,e),i){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=bf(null,t,r,e,n);break e;case 11:t=Nf(null,t,r,e,n);break e;case 14:t=Lf(null,t,r,st(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),Nu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),bf(e,t,r,i,n);case 3:e:{if(Ff(t),e===null)throw Error(_(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Xc(e,t),Ji(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=qn(Error(_(423)),t),t=Mf(e,t,r,n,i);break e}else if(r!==i){i=qn(Error(_(424)),t),t=Mf(e,t,r,n,i);break e}else for(Ye=Vt(t.stateNode.containerInfo.firstChild),Qe=t,se=!0,ut=null,n=Kc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===i){t=Lt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return Zc(t),e===null&&ou(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,Go(r,i)?o=null:l!==null&&Go(r,l)&&(t.flags|=32),Rf(e,t),De(e,t,o,n),t.child;case 6:return e===null&&ou(t),null;case 13:return Of(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wn(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),Nf(e,t,r,i,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,ne(qi,r._currentValue),r._currentValue=o,l!==null)if(ot(l.value,o)){if(l.children===i.children&&!Fe.current){t=Lt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){o=l.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=Nt(-1,n&-n),s.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?s.next=s:(s.next=f.next,f.next=s),a.pending=s}}l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),fu(l.return,n,t),u.lanes|=n;break}s=s.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(_(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),fu(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}De(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Yn(t,n),i=et(i),r=r(i),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,i=st(r,t.pendingProps),i=st(r.type,i),Lf(e,t,r,i,n);case 15:return Af(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),ul(e,t),t.tag=1,Me(r)?(e=!0,Hi(t)):e=!1,Yn(t,n),Cf(t,r,i),Pu(t,r,i,n),Lu(null,t,r,!0,e,n);case 19:return Bf(e,t,n);case 22:return Df(e,t,n)}throw Error(_(156,t.tag))};function cp(e,t){return $a(e,t)}function Vg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,r){return new Vg(e,t,n,r)}function Gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wg(e){if(typeof e=="function")return Gu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===no)return 11;if(e===lo)return 14}return 2}function tn(e,t){var n=e.alternate;return n===null?(n=rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xl(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")Gu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case _n:return kn(n.children,i,l,t);case eo:o=8,i|=8;break;case to:return e=rt(12,n,t,i|2),e.elementType=to,e.lanes=l,e;case ro:return e=rt(13,n,t,i),e.elementType=ro,e.lanes=l,e;case io:return e=rt(19,n,t,i),e.elementType=io,e.lanes=l,e;case xa:return kl(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ga:o=10;break e;case ya:o=9;break e;case no:o=11;break e;case lo:o=14;break e;case Ft:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=rt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function kn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function kl(e,t,n,r){return e=rt(22,e,r,t),e.elementType=xa,e.lanes=n,e.stateNode={isHidden:!1},e}function Ju(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function Zu(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qg(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=To(0),this.expirationTimes=To(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=To(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function es(e,t,n,r,i,l,o,u,s){return e=new Qg(e,t,n,u,s),t===1?(t=1,l===!0&&(t|=8)):t=0,l=rt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},du(l),e}function Yg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fp(e){if(!e)return Qt;e=e._reactInternals;e:{if(un(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Me(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Me(n))return Oc(e,n,t)}return t}function pp(e,t,n,r,i,l,o,u,s){return e=es(n,r,!0,e,i,l,o,u,s),e.context=fp(null),n=e.current,r=Re(),i=Zt(n),l=Nt(r,i),l.callback=t??null,qt(n,l,i),e.current.lanes=i,vr(e,i,r),Be(e,r),e}function vl(e,t,n,r){var i=t.current,l=Re(),o=Zt(i);return n=fp(n),t.context===null?t.context=n:t.pendingContext=n,t=Nt(l,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=qt(i,t,o),e!==null&&(ft(e,i,o,l),Gi(e,i,o)),o}function wl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ts(e,t){dp(e,t),(e=e.alternate)&&dp(e,t)}function Kg(){return null}var hp=typeof reportError=="function"?reportError:function(e){console.error(e)};function ns(e){this._internalRoot=e}Sl.prototype.render=ns.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));vl(e,t,null,null)},Sl.prototype.unmount=ns.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gn(function(){vl(null,e,null,null)}),t[zt]=null}};function Sl(e){this._internalRoot=e}Sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xa();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ut.length&&t!==0&&t<Ut[n].priority;n++);Ut.splice(n,0,e),n===0&&Za(e)}};function rs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mp(){}function qg(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var a=wl(o);l.call(a)}}var o=pp(t,r,e,0,null,!1,!1,"",mp);return e._reactRootContainer=o,e[zt]=o.current,Rr(e.nodeType===8?e.parentNode:e),gn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var a=wl(s);u.call(a)}}var s=es(e,0,!1,null,null,!1,!1,"",mp);return e._reactRootContainer=s,e[zt]=s.current,Rr(e.nodeType===8?e.parentNode:e),gn(function(){vl(t,s,n,r)}),s}function El(e,t,n,r,i){var l=n._reactRootContainer;if(l){var o=l;if(typeof i=="function"){var u=i;i=function(){var s=wl(o);u.call(s)}}vl(t,o,e,i)}else o=qg(n,t,e,i,r);return wl(o)}Ka=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=kr(t.pendingLanes);n!==0&&(Po(t,n|1),Be(t,he()),!(X&6)&&(Jn=he()+500,Yt()))}break;case 13:gn(function(){var r=It(e,1);if(r!==null){var i=Re();ft(r,e,1,i)}}),ts(e,1)}},_o=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Re();ft(t,e,134217728,n)}ts(e,134217728)}},qa=function(e){if(e.tag===13){var t=Zt(e),n=It(e,t);if(n!==null){var r=Re();ft(n,e,t,r)}ts(e,t)}},Xa=function(){return J},Ga=function(e,t){var n=J;try{return J=e,t()}finally{J=n}},vo=function(e,t,n){switch(t){case"input":if(fo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ui(r);if(!i)throw Error(_(90));wa(r),fo(r,i)}}}break;case"textarea":Ta(e,n);break;case"select":t=n.value,t!=null&&In(e,!!n.multiple,t,!1)}},ba=Ku,Fa=gn;var Xg={usingClientEntryPoint:!1,Events:[Mr,jn,Ui,Da,Ra,Ku]},Gr={findFiberByHostInstance:sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Gg={bundleType:Gr.bundleType,version:Gr.version,rendererPackageName:Gr.rendererPackageName,rendererConfig:Gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ba(e),e===null?null:e.stateNode},findFiberByHostInstance:Gr.findFiberByHostInstance||Kg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zl.isDisabled&&zl.supportsFiber)try{Si=zl.inject(Gg),mt=zl}catch{}}He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xg,He.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rs(t))throw Error(_(200));return Yg(e,t,null,n)},He.createRoot=function(e,t){if(!rs(e))throw Error(_(299));var n=!1,r="",i=hp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=es(e,1,!1,null,null,n,!1,r,i),e[zt]=t.current,Rr(e.nodeType===8?e.parentNode:e),new ns(t)},He.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=Ba(t),e=e===null?null:e.stateNode,e},He.flushSync=function(e){return gn(e)},He.hydrate=function(e,t,n){if(!Cl(t))throw Error(_(200));return El(null,e,t,!0,n)},He.hydrateRoot=function(e,t,n){if(!rs(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",o=hp;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=pp(t,null,e,1,n??null,i,!1,l,o),e[zt]=t.current,Rr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Sl(t)},He.render=function(e,t,n){if(!Cl(t))throw Error(_(200));return El(null,e,t,!1,n)},He.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(_(40));return e._reactRootContainer?(gn(function(){El(null,null,e,!1,function(){e._reactRootContainer=null,e[zt]=null})}),!0):!1},He.unstable_batchedUpdates=Ku,He.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cl(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return El(e,t,n,!1,r)},He.version="18.3.1-next-f1338f8080-20240426";function gp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gp)}catch(e){console.error(e)}}gp(),ca.exports=He;var Jg=ca.exports,yp=Jg;ql.createRoot=yp.createRoot,ql.hydrateRoot=yp.hydrateRoot;function Zg({agents:e,activeAgentId:t,agentFiles:n}){return P.jsxs("div",{className:"flex flex-col bg-zinc-900 border-r border-zinc-800 shrink-0 w-48 overflow-y-auto min-h-full",children:[P.jsx("div",{className:"px-3 py-2 text-xs font-medium text-zinc-500 uppercase tracking-wider border-b border-zinc-800",children:"Tests"}),e.map(r=>{const i=r.result==="pass"?"text-green-500":r.result==="fail"?"text-red-500":"text-zinc-500",l=r.result==="pass"?"✓":r.result==="fail"?"✗":"●",o=r.id===t;return P.jsx("a",{href:n[r.id]||"#",className:`px-3 py-2 text-xs text-left border-b border-zinc-800 transition-colors no-underline block
41
41
  ${o?"bg-zinc-800 text-zinc-200":"text-zinc-500 hover:text-zinc-300"}`,children:P.jsxs("span",{className:"flex items-center gap-2",children:[P.jsx("span",{className:`shrink-0 ${i}`,children:l}),P.jsx("span",{className:"truncate",children:r.name})]})},r.id)})]})}function ey({tabIds:e,activeTabId:t,onSelectTab:n}){return P.jsx("div",{className:"flex items-center bg-zinc-900 border-b border-zinc-800 overflow-x-auto",children:e.map((r,i)=>P.jsxs("button",{onClick:()=>n(r),className:`px-3 py-2 text-xs border-r border-zinc-800 shrink-0
42
- ${r===t?"bg-zinc-800 text-zinc-200":"text-zinc-500 hover:text-zinc-300"}`,children:["Tab ",i+1]},r))})}function ty({clips:e,currentTime:t,playing:n,speed:r}){const i=H.useRef(null),[l,o]=H.useState(new Map),[u,s]=H.useState(-1);H.useEffect(()=>{let p=!1;const d=new Map;return Promise.all(e.map(async(g,k)=>{try{const E=atob(g.data),h=new Uint8Array(E.length);for(let y=0;y<E.length;y++)h[y]=E.charCodeAt(y);const m=new Blob([h],{type:"video/webm"});p||d.set(k,URL.createObjectURL(m))}catch(E){console.warn(`Failed to preload clip ${k}:`,E)}})).then(()=>{p||o(new Map(d))}),()=>{p=!0;for(const g of d.values())URL.revokeObjectURL(g)}},[e]);const a=e.findIndex(p=>t>=p.startTime&&t<=p.endTime),f=a>=0?e[a]:null,c=!f;return H.useEffect(()=>{const p=i.current;if(p&&f&&a!==u){const d=l.get(a);if(!d)return;p.src=d;const g=Math.max(0,(t-f.startTime)/1e3);p.currentTime=g,s(a),n&&(p.playbackRate=r,p.play().catch(()=>{}))}},[a,f,l,u]),H.useEffect(()=>{var p;c&&((p=i.current)==null||p.pause())},[c]),H.useEffect(()=>{const p=i.current;!p||!f||a!==u||n||(p.currentTime=Math.max(0,(t-f.startTime)/1e3))},[t,f,n,u]),H.useEffect(()=>{const p=i.current;p&&(n&&f&&u===a?(p.playbackRate=r,p.play().catch(()=>{})):p.pause())},[n,f,r,c,u,a]),P.jsx("div",{className:"absolute inset-0 bg-zinc-950 flex items-center justify-center overflow-hidden",children:P.jsx("video",{ref:i,className:`max-w-full max-h-full ${e.length>0&&t<e[0].startTime?"invisible":""}`,muted:!0,playsInline:!0})})}function ny({entries:e,currentTime:t}){const[n,r]=H.useState(!0),[i,l]=H.useState("all"),o=H.useRef(null),u=e.filter(c=>c.ts<=t),s=i==="all"?u:u.filter(c=>i==="error"?c.level==="error":c.level==="warn"),a=u.filter(c=>c.level==="error").length,f=u.filter(c=>c.level==="warn").length;return H.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[s.length]),P.jsxs("div",{className:"border-t border-zinc-800 bg-zinc-900 shrink-0",children:[P.jsxs("button",{onClick:()=>r(!n),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-300 transition-colors",children:[P.jsx("span",{className:`transition-transform ${n?"":"rotate-90"}`,children:"▶"}),P.jsx("span",{className:"font-medium",children:"Console"}),a>0&&P.jsx("span",{className:"px-1.5 py-0.5 bg-red-950/50 text-red-400 rounded text-[10px]",children:a}),f>0&&P.jsx("span",{className:"px-1.5 py-0.5 bg-amber-950/50 text-amber-400 rounded text-[10px]",children:f}),P.jsx("div",{className:"flex-1"}),!n&&P.jsx("div",{className:"flex gap-1",onClick:c=>c.stopPropagation(),children:["all","error","warn"].map(c=>P.jsx("button",{onClick:()=>l(c),className:`px-1.5 py-0.5 rounded text-[10px] ${i===c?"bg-zinc-700 text-zinc-200":"text-zinc-500 hover:text-zinc-400"}`,children:c==="all"?"All":c==="error"?"Errors":"Warnings"},c))})]}),!n&&P.jsx("div",{ref:o,className:"max-h-32 overflow-y-auto px-3 pb-2 space-y-0.5",children:s.length===0?P.jsx("div",{className:"text-xs text-zinc-600 py-1",children:"No console output"}):s.map((c,p)=>P.jsxs("div",{className:`text-xs font-mono flex gap-2 ${c.level==="error"?"text-red-400":c.level==="warn"?"text-amber-400":"text-zinc-500"}`,children:[P.jsx("span",{className:"shrink-0 text-zinc-600",children:c.level==="error"?"ERR":c.level==="warn"?"WRN":"LOG"}),P.jsx("span",{className:"truncate",children:c.message.replace(/%c/g,"")})]},p))})]})}function eS(){}function tS(){}function ry(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ly=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oy={};function xp(e,t){return(oy.jsx?ly:iy).test(e)}const uy=/[ \t\n\f\r]/g;function sy(e){return typeof e=="object"?e.type==="text"?kp(e.value):!1:kp(e)}function kp(e){return e.replace(uy,"")===""}class Jr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Jr.prototype.normal={},Jr.prototype.property={},Jr.prototype.space=void 0;function vp(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Jr(n,r,t)}function is(e){return e.toLowerCase()}class Ue{constructor(t,n){this.attribute=n,this.property=t}}Ue.prototype.attribute="",Ue.prototype.booleanish=!1,Ue.prototype.boolean=!1,Ue.prototype.commaOrSpaceSeparated=!1,Ue.prototype.commaSeparated=!1,Ue.prototype.defined=!1,Ue.prototype.mustUseProperty=!1,Ue.prototype.number=!1,Ue.prototype.overloadedBoolean=!1,Ue.prototype.property="",Ue.prototype.spaceSeparated=!1,Ue.prototype.space=void 0;let ay=0;const W=vn(),ge=vn(),ls=vn(),N=vn(),re=vn(),er=vn(),qe=vn();function vn(){return 2**++ay}const os=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:ge,commaOrSpaceSeparated:qe,commaSeparated:er,number:N,overloadedBoolean:ls,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),us=Object.keys(os);class ss extends Ue{constructor(t,n,r,i){let l=-1;if(super(t,n),wp(this,"space",i),typeof r=="number")for(;++l<us.length;){const o=us[l];wp(this,us[l],(r&os[o])===os[o])}}}ss.prototype.defined=!0;function wp(e,t,n){n&&(e[t]=n)}function tr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new ss(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[is(r)]=r,n[is(l.attribute)]=r}return new Jr(t,n,e.space)}const Sp=tr({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:re,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:N,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:re,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:ge,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Cp(e,t){return t in e?e[t]:t}function Ep(e,t){return Cp(e,t.toLowerCase())}const cy=tr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:er,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:re,autoFocus:W,autoPlay:W,blocking:re,capture:null,charSet:null,checked:W,cite:null,className:re,cols:N,colSpan:null,content:null,contentEditable:ge,controls:W,controlsList:re,coords:N|er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:ls,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:re,height:N,hidden:ls,high:N,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:re,itemRef:re,itemScope:W,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:N,pattern:null,ping:re,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:re,required:W,reversed:W,rows:N,rowSpan:N,sandbox:re,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:ge,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:ge,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:N,security:null,unselectable:null},space:"html",transform:Ep}),fy=tr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qe,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:re,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:er,g2:er,glyphName:er,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qe,rev:qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qe,requiredFeatures:qe,requiredFonts:qe,requiredFormats:qe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qe,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cp}),zp=tr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tp=tr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ep}),Pp=tr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),py={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dy=/[A-Z]/g,_p=/-[a-z]/g,hy=/^data[-\w.:]+$/i;function my(e,t){const n=is(t);let r=t,i=Ue;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hy.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(_p,yy);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!_p.test(l)){let o=l.replace(dy,gy);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ss}return new i(r,t)}function gy(e){return"-"+e.toLowerCase()}function yy(e){return e.charAt(1).toUpperCase()}const xy=vp([Sp,cy,zp,Tp,Pp],"html"),as=vp([Sp,fy,zp,Tp,Pp],"svg");function ky(e){return e.join(" ").trim()}var cs={},Ip=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vy=/\n/g,wy=/^\s*/,Sy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Cy=/^:\s*/,Ey=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,zy=/^[;\s]*/,Ty=/^\s+|\s+$/g,Py=`
42
+ ${r===t?"bg-zinc-800 text-zinc-200":"text-zinc-500 hover:text-zinc-300"}`,children:["Tab ",i+1]},r))})}function ty({clips:e,currentTime:t,playing:n,speed:r}){const i=H.useRef(null),[l,o]=H.useState(new Map),[u,s]=H.useState(-1);H.useEffect(()=>{let p=!1;const d=new Map;return Promise.all(e.map(async(g,k)=>{try{const E=atob(g.data),h=new Uint8Array(E.length);for(let y=0;y<E.length;y++)h[y]=E.charCodeAt(y);const m=new Blob([h],{type:"video/webm"});p||d.set(k,URL.createObjectURL(m))}catch(E){console.warn(`Failed to preload clip ${k}:`,E)}})).then(()=>{p||o(new Map(d))}),()=>{p=!0;for(const g of d.values())URL.revokeObjectURL(g)}},[e]);const a=e.findIndex(p=>t>=p.startTime&&t<=p.endTime),f=a>=0?e[a]:null,c=!f;return H.useEffect(()=>{const p=i.current;if(p&&f&&a!==u){const d=l.get(a);if(!d)return;p.src=d;const g=Math.max(0,(t-f.startTime)/1e3);p.currentTime=g,s(a),n&&(p.playbackRate=r,p.play().catch(k=>console.error("video.play() failed:",k)))}},[a,f,l,u]),H.useEffect(()=>{var p;c&&((p=i.current)==null||p.pause())},[c]),H.useEffect(()=>{const p=i.current;!p||!f||a!==u||n||(p.currentTime=Math.max(0,(t-f.startTime)/1e3))},[t,f,n,u]),H.useEffect(()=>{const p=i.current;p&&(n&&f&&u===a?(p.playbackRate=r,p.play().catch(d=>console.error("video.play() failed:",d))):p.pause())},[n,f,r,c,u,a]),P.jsx("div",{className:"absolute inset-0 bg-zinc-950 flex items-center justify-center overflow-hidden",children:P.jsx("video",{ref:i,className:`max-w-full max-h-full ${e.length>0&&t<e[0].startTime?"invisible":""}`,muted:!0,playsInline:!0})})}function ny({entries:e,currentTime:t}){const[n,r]=H.useState(!0),[i,l]=H.useState("all"),o=H.useRef(null),u=e.filter(c=>c.ts<=t),s=i==="all"?u:u.filter(c=>i==="error"?c.level==="error":c.level==="warn"),a=u.filter(c=>c.level==="error").length,f=u.filter(c=>c.level==="warn").length;return H.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[s.length]),P.jsxs("div",{className:"border-t border-zinc-800 bg-zinc-900 shrink-0",children:[P.jsxs("button",{onClick:()=>r(!n),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-400 hover:text-zinc-300 transition-colors",children:[P.jsx("span",{className:`transition-transform ${n?"":"rotate-90"}`,children:"▶"}),P.jsx("span",{className:"font-medium",children:"Console"}),a>0&&P.jsx("span",{className:"px-1.5 py-0.5 bg-red-950/50 text-red-400 rounded text-[10px]",children:a}),f>0&&P.jsx("span",{className:"px-1.5 py-0.5 bg-amber-950/50 text-amber-400 rounded text-[10px]",children:f}),P.jsx("div",{className:"flex-1"}),!n&&P.jsx("div",{className:"flex gap-1",onClick:c=>c.stopPropagation(),children:["all","error","warn"].map(c=>P.jsx("button",{onClick:()=>l(c),className:`px-1.5 py-0.5 rounded text-[10px] ${i===c?"bg-zinc-700 text-zinc-200":"text-zinc-500 hover:text-zinc-400"}`,children:c==="all"?"All":c==="error"?"Errors":"Warnings"},c))})]}),!n&&P.jsx("div",{ref:o,className:"max-h-32 overflow-y-auto px-3 pb-2 space-y-0.5",children:s.length===0?P.jsx("div",{className:"text-xs text-zinc-600 py-1",children:"No console output"}):s.map((c,p)=>P.jsxs("div",{className:`text-xs font-mono flex gap-2 ${c.level==="error"?"text-red-400":c.level==="warn"?"text-amber-400":"text-zinc-500"}`,children:[P.jsx("span",{className:"shrink-0 text-zinc-600",children:c.level==="error"?"ERR":c.level==="warn"?"WRN":"LOG"}),P.jsx("span",{className:"truncate",children:c.message.replace(/%c/g,"")})]},p))})]})}function eS(){}function tS(){}function ry(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ly=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oy={};function xp(e,t){return(oy.jsx?ly:iy).test(e)}const uy=/[ \t\n\f\r]/g;function sy(e){return typeof e=="object"?e.type==="text"?kp(e.value):!1:kp(e)}function kp(e){return e.replace(uy,"")===""}class Jr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Jr.prototype.normal={},Jr.prototype.property={},Jr.prototype.space=void 0;function vp(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Jr(n,r,t)}function is(e){return e.toLowerCase()}class Ue{constructor(t,n){this.attribute=n,this.property=t}}Ue.prototype.attribute="",Ue.prototype.booleanish=!1,Ue.prototype.boolean=!1,Ue.prototype.commaOrSpaceSeparated=!1,Ue.prototype.commaSeparated=!1,Ue.prototype.defined=!1,Ue.prototype.mustUseProperty=!1,Ue.prototype.number=!1,Ue.prototype.overloadedBoolean=!1,Ue.prototype.property="",Ue.prototype.spaceSeparated=!1,Ue.prototype.space=void 0;let ay=0;const W=vn(),ge=vn(),ls=vn(),N=vn(),re=vn(),er=vn(),qe=vn();function vn(){return 2**++ay}const os=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:ge,commaOrSpaceSeparated:qe,commaSeparated:er,number:N,overloadedBoolean:ls,spaceSeparated:re},Symbol.toStringTag,{value:"Module"})),us=Object.keys(os);class ss extends Ue{constructor(t,n,r,i){let l=-1;if(super(t,n),wp(this,"space",i),typeof r=="number")for(;++l<us.length;){const o=us[l];wp(this,us[l],(r&os[o])===os[o])}}}ss.prototype.defined=!0;function wp(e,t,n){n&&(e[t]=n)}function tr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new ss(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[is(r)]=r,n[is(l.attribute)]=r}return new Jr(t,n,e.space)}const Sp=tr({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:re,ariaCurrent:null,ariaDescribedBy:re,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:re,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:re,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:re,ariaLevel:N,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:re,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:re,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:ge,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Cp(e,t){return t in e?e[t]:t}function Ep(e,t){return Cp(e,t.toLowerCase())}const cy=tr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:er,acceptCharset:re,accessKey:re,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:re,autoFocus:W,autoPlay:W,blocking:re,capture:null,charSet:null,checked:W,cite:null,className:re,cols:N,colSpan:null,content:null,contentEditable:ge,controls:W,controlsList:re,coords:N|er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:ls,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:re,height:N,hidden:ls,high:N,href:null,hrefLang:null,htmlFor:re,httpEquiv:re,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:re,itemRef:re,itemScope:W,itemType:re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:N,pattern:null,ping:re,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:re,required:W,reversed:W,rows:N,rowSpan:N,sandbox:re,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:ge,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:re,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:ge,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:N,security:null,unselectable:null},space:"html",transform:Ep}),fy=tr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qe,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:re,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:er,g2:er,glyphName:er,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qe,rev:qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qe,requiredFeatures:qe,requiredFonts:qe,requiredFormats:qe,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qe,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Cp}),zp=tr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tp=tr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ep}),Pp=tr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),py={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dy=/[A-Z]/g,_p=/-[a-z]/g,hy=/^data[-\w.:]+$/i;function my(e,t){const n=is(t);let r=t,i=Ue;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hy.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(_p,yy);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!_p.test(l)){let o=l.replace(dy,gy);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ss}return new i(r,t)}function gy(e){return"-"+e.toLowerCase()}function yy(e){return e.charAt(1).toUpperCase()}const xy=vp([Sp,cy,zp,Tp,Pp],"html"),as=vp([Sp,fy,zp,Tp,Pp],"svg");function ky(e){return e.join(" ").trim()}var cs={},Ip=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vy=/\n/g,wy=/^\s*/,Sy=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Cy=/^:\s*/,Ey=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,zy=/^[;\s]*/,Ty=/^\s+|\s+$/g,Py=`
43
43
  `,Np="/",Lp="*",wn="",_y="comment",Iy="declaration";function Ny(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var k=g.match(vy);k&&(n+=k.length);var E=g.lastIndexOf(Py);r=~E?g.length-E:r+g.length}function l(){var g={line:n,column:r};return function(k){return k.position=new o(g),a(),k}}function o(g){this.start=g,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function u(g){var k=new Error(t.source+":"+n+":"+r+": "+g);if(k.reason=g,k.filename=t.source,k.line=n,k.column=r,k.source=e,!t.silent)throw k}function s(g){var k=g.exec(e);if(k){var E=k[0];return i(E),e=e.slice(E.length),k}}function a(){s(wy)}function f(g){var k;for(g=g||[];k=c();)k!==!1&&g.push(k);return g}function c(){var g=l();if(!(Np!=e.charAt(0)||Lp!=e.charAt(1))){for(var k=2;wn!=e.charAt(k)&&(Lp!=e.charAt(k)||Np!=e.charAt(k+1));)++k;if(k+=2,wn===e.charAt(k-1))return u("End of comment missing");var E=e.slice(2,k-2);return r+=2,i(E),e=e.slice(k),r+=2,g({type:_y,comment:E})}}function p(){var g=l(),k=s(Sy);if(k){if(c(),!s(Cy))return u("property missing ':'");var E=s(Ey),h=g({type:Iy,property:Ap(k[0].replace(Ip,wn)),value:E?Ap(E[0].replace(Ip,wn)):wn});return s(zy),h}}function d(){var g=[];f(g);for(var k;k=p();)k!==!1&&(g.push(k),f(g));return g}return a(),d()}function Ap(e){return e?e.replace(Ty,wn):wn}var Ly=Ny,Ay=ci&&ci.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=Ry;const Dy=Ay(Ly);function Ry(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Dy.default)(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:u}=l;i?t(o,u,l):u&&(n=n||{},n[o]=u)}),n}var Tl={};Object.defineProperty(Tl,"__esModule",{value:!0}),Tl.camelCase=void 0;var by=/^--[a-zA-Z0-9_-]+$/,Fy=/-([a-z])/g,My=/^[^-]+$/,Oy=/^-(webkit|moz|ms|o|khtml)-/,jy=/^-(ms)-/,By=function(e){return!e||My.test(e)||by.test(e)},Uy=function(e,t){return t.toUpperCase()},Dp=function(e,t){return"".concat(t,"-")},$y=function(e,t){return t===void 0&&(t={}),By(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(jy,Dp):e=e.replace(Oy,Dp),e.replace(Fy,Uy))};Tl.camelCase=$y;var Hy=ci&&ci.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vy=Hy(cs),Wy=Tl;function fs(e,t){var n={};return!e||typeof e!="string"||(0,Vy.default)(e,function(r,i){r&&i&&(n[(0,Wy.camelCase)(r,t)]=i)}),n}fs.default=fs;var Qy=fs;const Yy=Hl(Qy),Rp=bp("end"),ps=bp("start");function bp(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ky(e){const t=ps(e),n=Rp(e);if(t&&n)return{start:t,end:n}}function Zr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fp(e.position):"start"in e||"end"in e?Fp(e):"line"in e||"column"in e?ds(e):""}function ds(e){return Mp(e&&e.line)+":"+Mp(e&&e.column)}function Fp(e){return ds(e&&e.start)+"-"+ds(e&&e.end)}function Mp(e){return e&&typeof e=="number"?e:1}class Ie extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},o=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(o=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){const s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Zr(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ie.prototype.file="",Ie.prototype.name="",Ie.prototype.reason="",Ie.prototype.message="",Ie.prototype.stack="",Ie.prototype.column=void 0,Ie.prototype.line=void 0,Ie.prototype.ancestors=void 0,Ie.prototype.cause=void 0,Ie.prototype.fatal=void 0,Ie.prototype.place=void 0,Ie.prototype.ruleId=void 0,Ie.prototype.source=void 0;const hs={}.hasOwnProperty,qy=new Map,Xy=/[A-Z]/g,Gy=new Set(["table","tbody","thead","tfoot","tr"]),Jy=new Set(["td","th"]),Op="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zy(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=u0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=o0(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?as:xy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=jp(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function jp(e,t,n){if(t.type==="element")return e0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return t0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r0(e,t,n);if(t.type==="mdxjsEsm")return n0(e,t);if(t.type==="root")return i0(e,t,n);if(t.type==="text")return l0(e,t)}function e0(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=as,e.schema=i),e.ancestors.push(t);const l=Up(e,t.tagName,!1),o=s0(e,t);let u=gs(e,t);return Gy.has(t.tagName)&&(u=u.filter(function(s){return typeof s=="string"?!sy(s):!0})),Bp(e,o,l,t),ms(o,u),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function t0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ei(e,t.position)}function n0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ei(e,t.position)}function r0(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=as,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Up(e,t.name,!0),o=a0(e,t),u=gs(e,t);return Bp(e,o,l,t),ms(o,u),e.ancestors.pop(),e.schema=r,e.create(t,l,o,n)}function i0(e,t,n){const r={};return ms(r,gs(e,t)),e.create(t,e.Fragment,r,n)}function l0(e,t){return t.value}function Bp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ms(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function o0(e,t,n){return r;function r(i,l,o,u){const a=Array.isArray(o.children)?n:t;return u?a(l,o,u):a(l,o)}}function u0(e,t){return n;function n(r,i,l,o){const u=Array.isArray(l.children),s=ps(r);return t(i,l,o,u,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function s0(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&hs.call(t.properties,i)){const l=c0(e,i,t.properties[i]);if(l){const[o,u]=l;e.tableCellAlignToStyle&&o==="align"&&typeof u=="string"&&Jy.has(t.tagName)?r=u:n[o]=u}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function a0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const u=o.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ei(e,t.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else ei(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function gs(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:qy;for(;++r<t.children.length;){const l=t.children[r];let o;if(e.passKeys){const s=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(s){const a=i.get(s)||0;o=s+"-"+a,i.set(s,a+1)}}const u=jp(e,l,o);u!==void 0&&n.push(u)}return n}function c0(e,t,n){const r=my(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ry(n):ky(n)),r.property==="style"){let i=typeof n=="object"?n:f0(e,String(n));return e.stylePropertyNameCase==="css"&&(i=p0(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?py[r.property]||r.property:r.attribute,n]}}function f0(e,t){try{return Yy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ie("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Op+"#cannot-parse-style-attribute",i}}function Up(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,o;for(;++l<i.length;){const u=xp(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};o=o?{type:"MemberExpression",object:o,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}r=o}else r=xp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return hs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ei(e)}function ei(e,t){const n=new Ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Op+"#cannot-handle-mdx-estrees-without-createevaluater",n}function p0(e){const t={};let n;for(n in e)hs.call(e,n)&&(t[d0(n)]=e[n]);return t}function d0(e){let t=e.replace(Xy,h0);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function h0(e){return"-"+e.toLowerCase()}const ys={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},m0={};function xs(e,t){const n=m0,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $p(e,r,i)}function $p(e,t,n){if(g0(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Hp(e.children,t,n)}return Array.isArray(e)?Hp(e,t,n):""}function Hp(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=$p(e[i],t,n);return r.join("")}function g0(e){return!!(e&&typeof e=="object")}const Vp=document.createElement("i");function ks(e){const t="&"+e+";";Vp.innerHTML=t;const n=Vp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xe(e,t,n,r){const i=e.length;let l=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);l<r.length;)o=r.slice(l,l+1e4),o.unshift(t,0),e.splice(...o),l+=1e4,t+=1e4}function it(e,t){return e.length>0?(Xe(e,e.length,0,t),e):t}const Wp={}.hasOwnProperty;function Qp(e){const t={};let n=-1;for(;++n<e.length;)y0(t,e[n]);return t}function y0(e,t){let n;for(n in t){const i=(Wp.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let o;if(l)for(o in l){Wp.call(i,o)||(i[o]=[]);const u=l[o];x0(i[o],Array.isArray(u)?u:u?[u]:[])}}}function x0(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xe(e,0,0,r)}function Yp(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const be=nn(/[A-Za-z]/),Ne=nn(/[\dA-Za-z]/),k0=nn(/[#-'*+\--9=?A-Z^-~]/);function Pl(e){return e!==null&&(e<32||e===127)}const vs=nn(/\d/),v0=nn(/[\dA-Fa-f]/),w0=nn(/[!-/:-@[-`{-~]/);function j(e){return e!==null&&e<-2}function ee(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}const _l=nn(new RegExp("\\p{P}|\\p{S}","u")),Sn=nn(/\s/);function nn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function nr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let o="";if(l===37&&Ne(e.charCodeAt(n+1))&&Ne(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(n+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function q(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return Y(s)?(e.enter(n),u(s)):t(s)}function u(s){return Y(s)&&l++<i?(e.consume(s),u):(e.exit(n),t(s))}}const S0={tokenize:C0};function C0(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),q(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),l(u)}function l(u){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return j(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),o)}}const E0={tokenize:z0},Kp={tokenize:T0};function z0(e){const t=this,n=[];let r=0,i,l,o;return u;function u(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,s,a)(y)}return a(y)}function s(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const C=t.events.length;let T=C,w;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){w=t.events[T][1].end;break}h(r);let I=C;for(;I<t.events.length;)t.events[I][1].end={...w},I++;return Xe(t.events,T+1,0,t.events.slice(C)),t.events.length=I,a(y)}return u(y)}function a(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Kp,f,c)(y)}function f(y){return i&&m(),h(r),p(y)}function c(y){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(y)}function p(y){return t.containerState={},e.attempt(Kp,d,g)(y)}function d(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function g(y){if(y===null){i&&m(),h(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(y)}function k(y){if(y===null){E(e.exit("chunkFlow"),!0),h(0),e.consume(y);return}return j(y)?(e.consume(y),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(y),k)}function E(y,C){const T=t.sliceStream(y);if(C&&T.push(null),y.previous=l,l&&(l.next=y),l=y,i.defineSkip(y.start),i.write(T),t.parser.lazy[y.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<o&&(!i.events[w][1].end||i.events[w][1].end.offset>o))return;const I=t.events.length;let L=I,O,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(O){S=t.events[L][1].end;break}O=!0}for(h(r),w=I;w<t.events.length;)t.events[w][1].end={...S},w++;Xe(t.events,L+1,0,t.events.slice(I)),t.events.length=w}}function h(y){let C=n.length;for(;C-- >y;){const T=n[C];t.containerState=T[1],T[0].exit.call(t,e)}n.length=y}function m(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function T0(e,t,n){return q(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function rr(e){if(e===null||ee(e)||Sn(e))return 1;if(_l(e))return 2}function Il(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const ws={name:"attention",resolveAll:P0,tokenize:_0};function P0(e,t){let n=-1,r,i,l,o,u,s,a,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c={...e[r][1].end},p={...e[n][1].start};qp(c,-s),qp(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...e[r][1].end}},u={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},l={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...o.start},end:{...u.end}},e[r][1].end={...o.start},e[n][1].start={...u.end},a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=it(a,[["enter",e[r][1],t],["exit",e[r][1],t]])),a=it(a,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",l,t]]),a=it(a,Il(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),a=it(a,[["exit",l,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,a=it(a,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Xe(e,r-1,n-r+3,a),n=r+a.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _0(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=rr(r);let l;return o;function o(s){return l=s,e.enter("attentionSequence"),u(s)}function u(s){if(s===l)return e.consume(s),u;const a=e.exit("attentionSequence"),f=rr(s),c=!f||f===2&&i||n.includes(s),p=!i||i===2&&f||n.includes(r);return a._open=!!(l===42?c:c&&(i||!p)),a._close=!!(l===42?p:p&&(f||!c)),t(s)}}function qp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const I0={name:"autolink",tokenize:N0};function N0(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(d){return be(d)?(e.consume(d),o):d===64?n(d):a(d)}function o(d){return d===43||d===45||d===46||Ne(d)?(r=1,u(d)):a(d)}function u(d){return d===58?(e.consume(d),r=0,s):(d===43||d===45||d===46||Ne(d))&&r++<32?(e.consume(d),u):(r=0,a(d))}function s(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Pl(d)?n(d):(e.consume(d),s)}function a(d){return d===64?(e.consume(d),f):k0(d)?(e.consume(d),a):n(d)}function f(d){return Ne(d)?c(d):n(d)}function c(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||Ne(d))&&r++<63){const g=d===45?p:c;return e.consume(d),g}return n(d)}}const ti={partial:!0,tokenize:L0};function L0(e,t,n){return r;function r(l){return Y(l)?q(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||j(l)?t(l):n(l)}}const Xp={continuation:{tokenize:D0},exit:R0,name:"blockQuote",tokenize:A0};function A0(e,t,n){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return n(o)}function l(o){return Y(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function D0(e,t,n){const r=this;return i;function i(o){return Y(o)?q(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Xp,t,n)(o)}}function R0(e){e.exit("blockQuote")}const Gp={name:"characterEscape",tokenize:b0};function b0(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return w0(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Jp={name:"characterReference",tokenize:F0};function F0(e,t,n){const r=this;let i=0,l,o;return u;function u(c){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),s}function s(c){return c===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(c),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),l=31,o=Ne,f(c))}function a(c){return c===88||c===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(c),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=v0,f):(e.enter("characterReferenceValue"),l=7,o=vs,f(c))}function f(c){if(c===59&&i){const p=e.exit("characterReferenceValue");return o===Ne&&!ks(r.sliceSerialize(p))?n(c):(e.enter("characterReferenceMarker"),e.consume(c),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(c)&&i++<l?(e.consume(c),f):n(c)}}const Zp={partial:!0,tokenize:O0},ed={concrete:!0,name:"codeFenced",tokenize:M0};function M0(e,t,n){const r=this,i={partial:!0,tokenize:T};let l=0,o=0,u;return s;function s(w){return a(w)}function a(w){const I=r.events[r.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(w)}function f(w){return w===u?(o++,e.consume(w),f):o<3?n(w):(e.exit("codeFencedFenceSequence"),Y(w)?q(e,c,"whitespace")(w):c(w))}function c(w){return w===null||j(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Zp,k,C)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||j(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(w)):Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),q(e,d,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),p)}function d(w){return w===null||j(w)?c(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===null||j(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(w)):w===96&&w===u?n(w):(e.consume(w),g)}function k(w){return e.attempt(i,C,E)(w)}function E(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h}function h(w){return l>0&&Y(w)?q(e,m,"linePrefix",l+1)(w):m(w)}function m(w){return w===null||j(w)?e.check(Zp,k,C)(w):(e.enter("codeFlowValue"),y(w))}function y(w){return w===null||j(w)?(e.exit("codeFlowValue"),m(w)):(e.consume(w),y)}function C(w){return e.exit("codeFenced"),t(w)}function T(w,I,L){let O=0;return S;function S($){return w.enter("lineEnding"),w.consume($),w.exit("lineEnding"),R}function R($){return w.enter("codeFencedFence"),Y($)?q(w,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):M($)}function M($){return $===u?(w.enter("codeFencedFenceSequence"),U($)):L($)}function U($){return $===u?(O++,w.consume($),U):O>=o?(w.exit("codeFencedFenceSequence"),Y($)?q(w,F,"whitespace")($):F($)):L($)}function F($){return $===null||j($)?(w.exit("codeFencedFence"),I($)):L($)}}}function O0(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Ss={name:"codeIndented",tokenize:B0},j0={partial:!0,tokenize:U0};function B0(e,t,n){const r=this;return i;function i(a){return e.enter("codeIndented"),q(e,l,"linePrefix",5)(a)}function l(a){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(a):n(a)}function o(a){return a===null?s(a):j(a)?e.attempt(j0,o,s)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||j(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function s(a){return e.exit("codeIndented"),t(a)}}function U0(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):j(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):q(e,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):j(o)?i(o):n(o)}}const $0={name:"codeText",previous:V0,resolve:H0,tokenize:W0};function H0(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function V0(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function W0(e,t,n){let r=0,i,l;return o;function o(c){return e.enter("codeText"),e.enter("codeTextSequence"),u(c)}function u(c){return c===96?(e.consume(c),r++,u):(e.exit("codeTextSequence"),s(c))}function s(c){return c===null?n(c):c===32?(e.enter("space"),e.consume(c),e.exit("space"),s):c===96?(l=e.enter("codeTextSequence"),i=0,f(c)):j(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(c))}function a(c){return c===null||c===32||c===96||j(c)?(e.exit("codeTextData"),s(c)):(e.consume(c),a)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(c)):(l.type="codeTextData",a(c))}}class Q0{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ni(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ni(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ni(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ni(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ni(this.left,n.reverse())}}}function ni(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function td(e){const t={};let n=-1,r,i,l,o,u,s,a;const f=new Q0(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,l=0,l<s.length&&s[l][1].type==="lineEndingBlank"&&(l+=2),l<s.length&&s[l][1].type==="content"))for(;++l<s.length&&s[l][1].type!=="content";)s[l][1].type==="chunkText"&&(s[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Y0(f,n)),n=t[n],a=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(o=f.get(l),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return Xe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!a}function Y0(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const u=o.events,s=[],a={};let f,c,p=-1,d=n,g=0,k=0;const E=[k];for(;d;){for(;e.get(++i)[1]!==d;);l.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),c&&o.defineSkip(d.start),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),d._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(k=p+1,E.push(k),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(o.events=[],d?(d._tokenizer=void 0,d.previous=void 0):E.pop(),p=E.length;p--;){const h=u.slice(E[p],E[p+1]),m=l.pop();s.push([m,m+h.length-1]),e.splice(m,2,h)}for(s.reverse(),p=-1;++p<s.length;)a[g+s[p][0]]=g+s[p][1],g+=s[p][1]-s[p][0]-1;return a}const K0={resolve:X0,tokenize:G0},q0={partial:!0,tokenize:J0};function X0(e){return td(e),e}function G0(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?l(u):j(u)?e.check(q0,o,l)(u):(e.consume(u),i)}function l(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function o(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function J0(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),q(e,l,"linePrefix")}function l(o){if(o===null||j(o))return n(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function nd(e,t,n,r,i,l,o,u,s){const a=s||Number.POSITIVE_INFINITY;let f=0;return c;function c(h){return h===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(h),e.exit(l),p):h===null||h===32||h===41||Pl(h)?n(h):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(h))}function p(h){return h===62?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===62?(e.exit("chunkString"),e.exit(u),p(h)):h===null||h===60||j(h)?n(h):(e.consume(h),h===92?g:d)}function g(h){return h===60||h===62||h===92?(e.consume(h),d):d(h)}function k(h){return!f&&(h===null||h===41||ee(h))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),t(h)):f<a&&h===40?(e.consume(h),f++,k):h===41?(e.consume(h),f--,k):h===null||h===32||h===40||Pl(h)?n(h):(e.consume(h),h===92?E:k)}function E(h){return h===40||h===41||h===92?(e.consume(h),k):k(h)}}function rd(e,t,n,r,i,l){const o=this;let u=0,s;return a;function a(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(l),f}function f(d){return u>999||d===null||d===91||d===93&&!s||d===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):d===93?(e.exit(l),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):j(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||j(d)||u++>999?(e.exit("chunkString"),f(d)):(e.consume(d),s||(s=!Y(d)),d===92?p:c)}function p(d){return d===91||d===92||d===93?(e.consume(d),u++,c):c(d)}}function id(e,t,n,r,i,l){let o;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,s):n(p)}function s(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(l),a(p))}function a(p){return p===o?(e.exit(l),s(o)):p===null?n(p):j(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),q(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===o||p===null||j(p)?(e.exit("chunkString"),a(p)):(e.consume(p),p===92?c:f)}function c(p){return p===o||p===92?(e.consume(p),f):f(p)}}function ri(e,t){let n;return r;function r(i){return j(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Y(i)?q(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Z0={name:"definition",tokenize:t1},e1={partial:!0,tokenize:n1};function t1(e,t,n){const r=this;let i;return l;function l(d){return e.enter("definition"),o(d)}function o(d){return rd.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function u(d){return i=pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),s):n(d)}function s(d){return ee(d)?ri(e,a)(d):a(d)}function a(d){return nd(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(e1,c,c)(d)}function c(d){return Y(d)?q(e,p,"whitespace")(d):p(d)}function p(d){return d===null||j(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function n1(e,t,n){return r;function r(u){return ee(u)?ri(e,i)(u):n(u)}function i(u){return id(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return Y(u)?q(e,o,"whitespace")(u):o(u)}function o(u){return u===null||j(u)?t(u):n(u)}}const r1={name:"hardBreakEscape",tokenize:i1};function i1(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return j(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const l1={name:"headingAtx",resolve:o1,tokenize:u1};function o1(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xe(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function u1(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),l(f)}function l(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||ee(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),s(f)):f===null||j(f)?(e.exit("atxHeading"),t(f)):Y(f)?q(e,u,"whitespace")(f):(e.enter("atxHeadingText"),a(f))}function s(f){return f===35?(e.consume(f),s):(e.exit("atxHeadingSequence"),u(f))}function a(f){return f===null||f===35||ee(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),a)}}const s1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ld=["pre","script","style","textarea"],a1={concrete:!0,name:"htmlFlow",resolveTo:p1,tokenize:d1},c1={partial:!0,tokenize:m1},f1={partial:!0,tokenize:h1};function p1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function d1(e,t,n){const r=this;let i,l,o,u,s;return a;function a(v){return f(v)}function f(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),c}function c(v){return v===33?(e.consume(v),p):v===47?(e.consume(v),l=!0,k):v===63?(e.consume(v),i=3,r.interrupt?t:x):be(v)?(e.consume(v),o=String.fromCharCode(v),E):n(v)}function p(v){return v===45?(e.consume(v),i=2,d):v===91?(e.consume(v),i=5,u=0,g):be(v)?(e.consume(v),i=4,r.interrupt?t:x):n(v)}function d(v){return v===45?(e.consume(v),r.interrupt?t:x):n(v)}function g(v){const ke="CDATA[";return v===ke.charCodeAt(u++)?(e.consume(v),u===ke.length?r.interrupt?t:M:g):n(v)}function k(v){return be(v)?(e.consume(v),o=String.fromCharCode(v),E):n(v)}function E(v){if(v===null||v===47||v===62||ee(v)){const ke=v===47,dt=o.toLowerCase();return!ke&&!l&&ld.includes(dt)?(i=1,r.interrupt?t(v):M(v)):s1.includes(o.toLowerCase())?(i=6,ke?(e.consume(v),h):r.interrupt?t(v):M(v)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(v):l?m(v):y(v))}return v===45||Ne(v)?(e.consume(v),o+=String.fromCharCode(v),E):n(v)}function h(v){return v===62?(e.consume(v),r.interrupt?t:M):n(v)}function m(v){return Y(v)?(e.consume(v),m):S(v)}function y(v){return v===47?(e.consume(v),S):v===58||v===95||be(v)?(e.consume(v),C):Y(v)?(e.consume(v),y):S(v)}function C(v){return v===45||v===46||v===58||v===95||Ne(v)?(e.consume(v),C):T(v)}function T(v){return v===61?(e.consume(v),w):Y(v)?(e.consume(v),T):y(v)}function w(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),s=v,I):Y(v)?(e.consume(v),w):L(v)}function I(v){return v===s?(e.consume(v),s=null,O):v===null||j(v)?n(v):(e.consume(v),I)}function L(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||ee(v)?T(v):(e.consume(v),L)}function O(v){return v===47||v===62||Y(v)?y(v):n(v)}function S(v){return v===62?(e.consume(v),R):n(v)}function R(v){return v===null||j(v)?M(v):Y(v)?(e.consume(v),R):n(v)}function M(v){return v===45&&i===2?(e.consume(v),ae):v===60&&i===1?(e.consume(v),oe):v===62&&i===4?(e.consume(v),G):v===63&&i===3?(e.consume(v),x):v===93&&i===5?(e.consume(v),B):j(v)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(c1,Z,U)(v)):v===null||j(v)?(e.exit("htmlFlowData"),U(v)):(e.consume(v),M)}function U(v){return e.check(f1,F,Z)(v)}function F(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),$}function $(v){return v===null||j(v)?U(v):(e.enter("htmlFlowData"),M(v))}function ae(v){return v===45?(e.consume(v),x):M(v)}function oe(v){return v===47?(e.consume(v),o="",A):M(v)}function A(v){if(v===62){const ke=o.toLowerCase();return ld.includes(ke)?(e.consume(v),G):M(v)}return be(v)&&o.length<8?(e.consume(v),o+=String.fromCharCode(v),A):M(v)}function B(v){return v===93?(e.consume(v),x):M(v)}function x(v){return v===62?(e.consume(v),G):v===45&&i===2?(e.consume(v),x):M(v)}function G(v){return v===null||j(v)?(e.exit("htmlFlowData"),Z(v)):(e.consume(v),G)}function Z(v){return e.exit("htmlFlow"),t(v)}}function h1(e,t,n){const r=this;return i;function i(o){return j(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):n(o)}function l(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function m1(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ti,t,n)}}const g1={name:"htmlText",tokenize:y1};function y1(e,t,n){const r=this;let i,l,o;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),s}function s(x){return x===33?(e.consume(x),a):x===47?(e.consume(x),T):x===63?(e.consume(x),y):be(x)?(e.consume(x),L):n(x)}function a(x){return x===45?(e.consume(x),f):x===91?(e.consume(x),l=0,g):be(x)?(e.consume(x),m):n(x)}function f(x){return x===45?(e.consume(x),d):n(x)}function c(x){return x===null?n(x):x===45?(e.consume(x),p):j(x)?(o=c,oe(x)):(e.consume(x),c)}function p(x){return x===45?(e.consume(x),d):c(x)}function d(x){return x===62?ae(x):x===45?p(x):c(x)}function g(x){const G="CDATA[";return x===G.charCodeAt(l++)?(e.consume(x),l===G.length?k:g):n(x)}function k(x){return x===null?n(x):x===93?(e.consume(x),E):j(x)?(o=k,oe(x)):(e.consume(x),k)}function E(x){return x===93?(e.consume(x),h):k(x)}function h(x){return x===62?ae(x):x===93?(e.consume(x),h):k(x)}function m(x){return x===null||x===62?ae(x):j(x)?(o=m,oe(x)):(e.consume(x),m)}function y(x){return x===null?n(x):x===63?(e.consume(x),C):j(x)?(o=y,oe(x)):(e.consume(x),y)}function C(x){return x===62?ae(x):y(x)}function T(x){return be(x)?(e.consume(x),w):n(x)}function w(x){return x===45||Ne(x)?(e.consume(x),w):I(x)}function I(x){return j(x)?(o=I,oe(x)):Y(x)?(e.consume(x),I):ae(x)}function L(x){return x===45||Ne(x)?(e.consume(x),L):x===47||x===62||ee(x)?O(x):n(x)}function O(x){return x===47?(e.consume(x),ae):x===58||x===95||be(x)?(e.consume(x),S):j(x)?(o=O,oe(x)):Y(x)?(e.consume(x),O):ae(x)}function S(x){return x===45||x===46||x===58||x===95||Ne(x)?(e.consume(x),S):R(x)}function R(x){return x===61?(e.consume(x),M):j(x)?(o=R,oe(x)):Y(x)?(e.consume(x),R):O(x)}function M(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,U):j(x)?(o=M,oe(x)):Y(x)?(e.consume(x),M):(e.consume(x),F)}function U(x){return x===i?(e.consume(x),i=void 0,$):x===null?n(x):j(x)?(o=U,oe(x)):(e.consume(x),U)}function F(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ee(x)?O(x):(e.consume(x),F)}function $(x){return x===47||x===62||ee(x)?O(x):n(x)}function ae(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function oe(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),A}function A(x){return Y(x)?q(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):B(x)}function B(x){return e.enter("htmlTextData"),o(x)}}const Cs={name:"labelEnd",resolveAll:w1,resolveTo:S1,tokenize:C1},x1={tokenize:E1},k1={tokenize:z1},v1={tokenize:T1};function w1(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Xe(e,0,e.length,n),e}function S1(e,t){let n=e.length,r=0,i,l,o,u;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const s={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},a={type:"label",start:{...e[l][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[l+r+2][1].end},end:{...e[o-2][1].start}};return u=[["enter",s,t],["enter",a,t]],u=it(u,e.slice(l+1,l+r+3)),u=it(u,[["enter",f,t]]),u=it(u,Il(t.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),t)),u=it(u,[["exit",f,t],e[o-2],e[o-1],["exit",a,t]]),u=it(u,e.slice(o+1)),u=it(u,[["exit",s,t]]),Xe(e,l,e.length,u),e}function C1(e,t,n){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return u;function u(p){return l?l._inactive?c(p):(o=r.parser.defined.includes(pt(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),s):n(p)}function s(p){return p===40?e.attempt(x1,f,o?f:c)(p):p===91?e.attempt(k1,f,o?a:c)(p):o?f(p):c(p)}function a(p){return e.attempt(v1,f,c)(p)}function f(p){return t(p)}function c(p){return l._balanced=!0,n(p)}}function E1(e,t,n){return r;function r(c){return e.enter("resource"),e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),i}function i(c){return ee(c)?ri(e,l)(c):l(c)}function l(c){return c===41?f(c):nd(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function o(c){return ee(c)?ri(e,s)(c):f(c)}function u(c){return n(c)}function s(c){return c===34||c===39||c===40?id(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function a(c){return ee(c)?ri(e,f)(c):f(c)}function f(c){return c===41?(e.enter("resourceMarker"),e.consume(c),e.exit("resourceMarker"),e.exit("resource"),t):n(c)}}function z1(e,t,n){const r=this;return i;function i(u){return rd.call(r,e,l,o,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function o(u){return n(u)}}function T1(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const P1={name:"labelStartImage",resolveAll:Cs.resolveAll,tokenize:_1};function _1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const I1={name:"labelStartLink",resolveAll:Cs.resolveAll,tokenize:N1};function N1(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Es={name:"lineEnding",tokenize:L1};function L1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),q(e,t,"linePrefix")}}const Nl={name:"thematicBreak",tokenize:A1};function A1(e,t,n){let r=0,i;return l;function l(a){return e.enter("thematicBreak"),o(a)}function o(a){return i=a,u(a)}function u(a){return a===i?(e.enter("thematicBreakSequence"),s(a)):r>=3&&(a===null||j(a))?(e.exit("thematicBreak"),t(a)):n(a)}function s(a){return a===i?(e.consume(a),r++,s):(e.exit("thematicBreakSequence"),Y(a)?q(e,u,"whitespace")(a):u(a))}}const $e={continuation:{tokenize:F1},exit:O1,name:"list",tokenize:b1},D1={partial:!0,tokenize:j1},R1={partial:!0,tokenize:M1};function b1(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(d){const g=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:vs(d)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Nl,n,a)(d):a(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(d)}return n(d)}function s(d){return vs(d)&&++o<10?(e.consume(d),s):(!r.interrupt||o<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),a(d)):n(d)}function a(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(ti,r.interrupt?n:f,e.attempt(D1,p,c))}function f(d){return r.containerState.initialBlankLine=!0,l++,p(d)}function c(d){return Y(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function F1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ti,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,t,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!Y(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(R1,t,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt($e,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function M1(e,t,n){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(l):n(l)}}function O1(e){e.exit(this.containerState.type)}function j1(e,t,n){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!Y(l)&&o&&o[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const od={name:"setextUnderline",resolveTo:B1,tokenize:U1};function B1(e,t){let n=e.length,r,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,t]),e.splice(l+1,0,["exit",e[r][1],t]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function U1(e,t,n){const r=this;let i;return l;function l(a){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){c=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter("setextHeadingLine"),i=a,o(a)):n(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),Y(a)?q(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||j(a)?(e.exit("setextHeadingLine"),t(a)):n(a)}}const $1={tokenize:H1};function H1(e){const t=this,n=e.attempt(ti,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(K0,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const V1={resolveAll:sd()},W1=ud("string"),Q1=ud("text");function ud(e){return{resolveAll:sd(e==="text"?Y1:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,o,u);return o;function o(f){return a(f)?l(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return a(f)?(n.exit("data"),l(f)):(n.consume(f),s)}function a(f){if(f===null)return!0;const c=i[f];let p=-1;if(c)for(;++p<c.length;){const d=c[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function sd(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function Y1(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let l=i.length,o=-1,u=0,s;for(;l--;){const a=i[l];if(typeof a=="string"){for(o=a.length;a.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(a===-2)s=!0,u++;else if(a!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const a={type:n===e.length||s||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?o:r.start._bufferIndex+o,_index:r.start._index+l,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const K1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Z0},disable:{null:[]},document:{42:$e,43:$e,45:$e,48:$e,49:$e,50:$e,51:$e,52:$e,53:$e,54:$e,55:$e,56:$e,57:$e,62:Xp},flow:{35:l1,42:Nl,45:[od,Nl],60:a1,61:od,95:Nl,96:ed,126:ed},flowInitial:{[-2]:Ss,[-1]:Ss,32:Ss},insideSpan:{null:[ws,V1]},string:{38:Jp,92:Gp},text:{[-5]:Es,[-4]:Es,[-3]:Es,33:P1,38:Jp,42:ws,60:[I0,g1],91:I1,92:[r1,Gp],93:Cs,95:ws,96:$0}},Symbol.toStringTag,{value:"Module"}));function q1(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let o=[],u=[];const s={attempt:I(T),check:I(w),consume:m,enter:y,exit:C,interrupt:I(w,{interrupt:!0})},a={code:null,containerState:{},defineSkip:k,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:d,write:c};let f=t.tokenize.call(a,s);return t.resolveAll&&l.push(t),a;function c(R){return o=it(o,R),E(),o[o.length-1]!==null?[]:(L(t,0),a.events=Il(l,a.events,a),a.events)}function p(R,M){return G1(d(R),M)}function d(R){return X1(o,R)}function g(){const{_bufferIndex:R,_index:M,line:U,column:F,offset:$}=r;return{_bufferIndex:R,_index:M,line:U,column:F,offset:$}}function k(R){i[R.line]=R.column,S()}function E(){let R;for(;r._index<o.length;){const M=o[r._index];if(typeof M=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<M.length;)h(M.charCodeAt(r._bufferIndex));else h(M)}}function h(R){f=f(R)}function m(R){j(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,S()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=R}function y(R,M){const U=M||{};return U.type=R,U.start=g(),a.events.push(["enter",U,a]),u.push(U),U}function C(R){const M=u.pop();return M.end=g(),a.events.push(["exit",M,a]),M}function T(R,M){L(R,M.from)}function w(R,M){M.restore()}function I(R,M){return U;function U(F,$,ae){let oe,A,B,x;return Array.isArray(F)?Z(F):"tokenize"in F?Z([F]):G(F);function G(ue){return St;function St(ln){const or=ln!==null&&ue[ln],ur=ln!==null&&ue.null,$l=[...Array.isArray(or)?or:or?[or]:[],...Array.isArray(ur)?ur:ur?[ur]:[]];return Z($l)(ln)}}function Z(ue){return oe=ue,A=0,ue.length===0?ae:v(ue[A])}function v(ue){return St;function St(ln){return x=O(),B=ue,ue.partial||(a.currentConstruct=ue),ue.name&&a.parser.constructs.disable.null.includes(ue.name)?dt():ue.tokenize.call(M?Object.assign(Object.create(a),M):a,s,ke,dt)(ln)}}function ke(ue){return R(B,x),$}function dt(ue){return x.restore(),++A<oe.length?v(oe[A]):ae}}}function L(R,M){R.resolveAll&&!l.includes(R)&&l.push(R),R.resolve&&Xe(a.events,M,a.events.length-M,R.resolve(a.events.slice(M),a)),R.resolveTo&&(a.events=R.resolveTo(a.events,a))}function O(){const R=g(),M=a.previous,U=a.currentConstruct,F=a.events.length,$=Array.from(u);return{from:F,restore:ae};function ae(){r=R,a.previous=M,a.currentConstruct=U,a.events.length=F,u=$,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function X1(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,l)];else{if(o=e.slice(n,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function G1(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
44
44
  `;break}case-3:{o=`\r
45
45
  `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}function J1(e){const r={constructs:Qp([K1,...(e||{}).extensions||[]]),content:i(S0),defined:[],document:i(E0),flow:i($1),lazy:{},string:i(W1),text:i(Q1)};return r;function i(l){return o;function o(u){return q1(r,l,u)}}}function Z1(e){for(;!td(e););return e}const ad=/[\0\t\n\r]/g;function ex(){let e=1,t="",n=!0,r;return i;function i(l,o,u){const s=[];let a,f,c,p,d;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(o||void 0).decode(l)),c=0,t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){if(ad.lastIndex=c,a=ad.exec(l),p=a&&a.index!==void 0?a.index:l.length,d=l.charCodeAt(p),!a){t=l.slice(c);break}if(d===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(l.slice(c,p)),e+=p-c),d){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return u&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const tx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nx(e){return e.replace(tx,rx)}function rx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Yp(n.slice(l?2:1),l?16:10)}return ks(n)||e}const cd={}.hasOwnProperty;function ix(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lx(n)(Z1(J1(n).document().write(ex()(e,t,!0))))}function lx(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Eh),autolinkProtocol:O,autolinkEmail:O,atxHeading:l(wh),blockQuote:l(ur),characterEscape:O,characterReference:O,codeFenced:l($l),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:l($l,o),codeText:l(Ww,o),codeTextData:O,data:O,codeFlowValue:O,definition:l(Qw),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:l(Yw),hardBreakEscape:l(Sh),hardBreakTrailing:l(Sh),htmlFlow:l(Ch,o),htmlFlowData:O,htmlText:l(Ch,o),htmlTextData:O,image:l(Kw),label:o,link:l(Eh),listItem:l(qw),listItemValue:p,listOrdered:l(zh,c),listUnordered:l(zh),paragraph:l(Xw),reference:v,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:l(wh),strong:l(Gw),thematicBreak:l(Zw)},exit:{atxHeading:s(),atxHeadingSequence:T,autolink:s(),autolinkEmail:or,autolinkProtocol:ln,blockQuote:s(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:dt,characterReferenceMarkerNumeric:dt,characterReferenceValue:ue,characterReference:St,codeFenced:s(E),codeFencedFence:k,codeFencedFenceInfo:d,codeFencedFenceMeta:g,codeFlowValue:S,codeIndented:s(h),codeText:s($),codeTextData:S,data:S,definition:s(),definitionDestinationString:C,definitionLabelString:m,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(M),hardBreakTrailing:s(M),htmlFlow:s(U),htmlFlowData:S,htmlText:s(F),htmlTextData:S,image:s(oe),label:B,labelText:A,lineEnding:R,link:s(ae),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ke,resourceDestinationString:x,resourceTitleString:G,resource:Z,setextHeading:s(L),setextHeadingLineSequence:I,setextHeadingText:w,strong:s(),thematicBreak:s()}};fd(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let D={type:"root",children:[]};const V={stack:[D],tokenStack:[],config:t,enter:u,exit:a,buffer:o,resume:f,data:n},K=[];let te=-1;for(;++te<z.length;)if(z[te][1].type==="listOrdered"||z[te][1].type==="listUnordered")if(z[te][0]==="enter")K.push(te);else{const ht=K.pop();te=i(z,ht,te)}for(te=-1;++te<z.length;){const ht=t[z[te][0]];cd.call(ht,z[te][1].type)&&ht[z[te][1].type].call(Object.assign({sliceSerialize:z[te][2].sliceSerialize},V),z[te][1])}if(V.tokenStack.length>0){const ht=V.tokenStack[V.tokenStack.length-1];(ht[1]||pd).call(V,void 0,ht[0])}for(D.position={start:rn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:rn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},te=-1;++te<t.transforms.length;)D=t.transforms[te](D)||D;return D}function i(z,D,V){let K=D-1,te=-1,ht=!1,En,Rt,si,ai;for(;++K<=V;){const Ge=z[K];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?te++:te--,ai=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(En&&!ai&&!te&&!si&&(si=K),ai=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ai=void 0}if(!te&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||te===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(En){let sr=K;for(Rt=void 0;sr--;){const bt=z[sr];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;Rt&&(z[Rt][1].type="lineEndingBlank",ht=!0),bt[1].type="lineEnding",Rt=sr}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}si&&(!Rt||si<Rt)&&(En._spread=!0),En.end=Object.assign({},Rt?z[Rt][1].start:Ge[1].end),z.splice(Rt||K,0,["exit",En,Ge[2]]),K++,V++}if(Ge[1].type==="listItemPrefix"){const sr={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};En=sr,z.splice(K,0,["enter",sr,Ge[2]]),K++,V++,si=void 0,ai=!0}}}return z[D][1]._spread=ht,V}function l(z,D){return V;function V(K){u.call(this,z(K),K),D&&D.call(this,K)}}function o(){this.stack.push({type:"fragment",children:[]})}function u(z,D,V){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([D,V||void 0]),z.position={start:rn(D.start),end:void 0}}function s(z){return D;function D(V){z&&z.call(this,V),a.call(this,V)}}function a(z,D){const V=this.stack.pop(),K=this.tokenStack.pop();if(K)K[0].type!==z.type&&(D?D.call(this,z,K[0]):(K[1]||pd).call(this,z,K[0]));else throw new Error("Cannot close `"+z.type+"` ("+Zr({start:z.start,end:z.end})+"): it’s not open");V.position.end=rn(z.end)}function f(){return xs(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function d(){const z=this.resume(),D=this.stack[this.stack.length-1];D.lang=z}function g(){const z=this.resume(),D=this.stack[this.stack.length-1];D.meta=z}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function h(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z.replace(/(\r?\n|\r)$/g,"")}function m(z){const D=this.resume(),V=this.stack[this.stack.length-1];V.label=D,V.identifier=pt(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),D=this.stack[this.stack.length-1];D.title=z}function C(){const z=this.resume(),D=this.stack[this.stack.length-1];D.url=z}function T(z){const D=this.stack[this.stack.length-1];if(!D.depth){const V=this.sliceSerialize(z).length;D.depth=V}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function I(z){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function O(z){const V=this.stack[this.stack.length-1].children;let K=V[V.length-1];(!K||K.type!=="text")&&(K=Jw(),K.position={start:rn(z.start),end:void 0},V.push(K)),this.stack.push(K)}function S(z){const D=this.stack.pop();D.value+=this.sliceSerialize(z),D.position.end=rn(z.end)}function R(z){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const V=D.children[D.children.length-1];V.position.end=rn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(O.call(this,z),S.call(this,z))}function M(){this.data.atHardBreak=!0}function U(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function F(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function $(){const z=this.resume(),D=this.stack[this.stack.length-1];D.value=z}function ae(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=D,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function oe(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=D,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function A(z){const D=this.sliceSerialize(z),V=this.stack[this.stack.length-2];V.label=nx(D),V.identifier=pt(D).toLowerCase()}function B(){const z=this.stack[this.stack.length-1],D=this.resume(),V=this.stack[this.stack.length-1];if(this.data.inReference=!0,V.type==="link"){const K=z.children;V.children=K}else V.alt=D}function x(){const z=this.resume(),D=this.stack[this.stack.length-1];D.url=z}function G(){const z=this.resume(),D=this.stack[this.stack.length-1];D.title=z}function Z(){this.data.inReference=void 0}function v(){this.data.referenceType="collapsed"}function ke(z){const D=this.resume(),V=this.stack[this.stack.length-1];V.label=D,V.identifier=pt(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function dt(z){this.data.characterReferenceType=z.type}function ue(z){const D=this.sliceSerialize(z),V=this.data.characterReferenceType;let K;V?(K=Yp(D,V==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):K=ks(D);const te=this.stack[this.stack.length-1];te.value+=K}function St(z){const D=this.stack.pop();D.position.end=rn(z.end)}function ln(z){S.call(this,z);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(z)}function or(z){S.call(this,z);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(z)}function ur(){return{type:"blockquote",children:[]}}function $l(){return{type:"code",lang:null,meta:null,value:""}}function Ww(){return{type:"inlineCode",value:""}}function Qw(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yw(){return{type:"emphasis",children:[]}}function wh(){return{type:"heading",depth:0,children:[]}}function Sh(){return{type:"break"}}function Ch(){return{type:"html",value:""}}function Kw(){return{type:"image",title:null,url:"",alt:null}}function Eh(){return{type:"link",title:null,url:"",children:[]}}function zh(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function qw(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function Xw(){return{type:"paragraph",children:[]}}function Gw(){return{type:"strong",children:[]}}function Jw(){return{type:"text",value:""}}function Zw(){return{type:"thematicBreak"}}}function rn(e){return{line:e.line,column:e.column,offset:e.offset}}function fd(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fd(e,r):ox(e,r)}}function ox(e,t){let n;for(n in t)if(cd.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zr({start:t.start,end:t.end})+") is still open")}function ux(e){const t=this;t.parser=n;function n(r){return ix(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function sx(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ax(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -68,4 +68,4 @@ Error generating stack: `+l.message+`
68
68
  `,...l.current()});return/^[\t ]/.test(a)&&(a=ui(a.charCodeAt(0))+a.slice(1)),a=a?o+" "+a:o,n.options.closeAtx&&(a+=" "+o),s(),u(),a}Jd.peek=Tv;function Jd(e){return e.value||""}function Tv(){return"<"}Zd.peek=Pv;function Zd(e,t,n,r){const i=Ws(n),l=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let u=n.enter("label");const s=n.createTracker(r);let a=s.move("![");return a+=s.move(n.safe(e.alt,{before:a,after:"]",...s.current()})),a+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),a+=s.move("<"),a+=s.move(n.safe(e.url,{before:a,after:">",...s.current()})),a+=s.move(">")):(u=n.enter("destinationRaw"),a+=s.move(n.safe(e.url,{before:a,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${l}`),a+=s.move(" "+i),a+=s.move(n.safe(e.title,{before:a,after:i,...s.current()})),a+=s.move(i),u()),a+=s.move(")"),o(),a}function Pv(){return"!"}eh.peek=_v;function eh(e,t,n,r){const i=e.referenceType,l=n.enter("imageReference");let o=n.enter("label");const u=n.createTracker(r);let s=u.move("![");const a=n.safe(e.alt,{before:s,after:"]",...u.current()});s+=u.move(a+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...u.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?s+=u.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=u.move("]"),s}function _v(){return"!"}th.peek=Iv;function th(e,t,n){let r=e.value||"",i="`",l=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){const o=n.unsafe[l],u=n.compilePattern(o);let s;if(o.atBreak)for(;s=u.exec(r);){let a=s.index;r.charCodeAt(a)===10&&r.charCodeAt(a-1)===13&&a--,r=r.slice(0,a)+" "+r.slice(s.index+1)}}return i+r+i}function Iv(){return"`"}function nh(e,t){const n=xs(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}rh.peek=Nv;function rh(e,t,n,r){const i=Ws(n),l=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let u,s;if(nh(e,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let c=o.move("<");return c+=o.move(n.containerPhrasing(e,{before:c,after:">",...o.current()})),c+=o.move(">"),u(),n.stack=f,c}u=n.enter("link"),s=n.enter("label");let a=o.move("[");return a+=o.move(n.containerPhrasing(e,{before:a,after:"](",...o.current()})),a+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),a+=o.move("<"),a+=o.move(n.safe(e.url,{before:a,after:">",...o.current()})),a+=o.move(">")):(s=n.enter("destinationRaw"),a+=o.move(n.safe(e.url,{before:a,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=n.enter(`title${l}`),a+=o.move(" "+i),a+=o.move(n.safe(e.title,{before:a,after:i,...o.current()})),a+=o.move(i),s()),a+=o.move(")"),u(),a}function Nv(e,t,n){return nh(e,n)?"<":"["}ih.peek=Lv;function ih(e,t,n,r){const i=e.referenceType,l=n.enter("linkReference");let o=n.enter("label");const u=n.createTracker(r);let s=u.move("[");const a=n.containerPhrasing(e,{before:s,after:"]",...u.current()});s+=u.move(a+"]["),o();const f=n.stack;n.stack=[],o=n.enter("reference");const c=n.safe(n.associationId(e),{before:s,after:"]",...u.current()});return o(),n.stack=f,l(),i==="full"||!a||a!==c?s+=u.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=u.move("]"),s}function Lv(){return"["}function Qs(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Av(e){const t=Qs(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Dv(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function lh(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Rv(e,t,n,r){const i=n.enter("list"),l=n.bulletCurrent;let o=e.ordered?Dv(n):Qs(n);const u=e.ordered?o==="."?")":".":Av(n);let s=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),lh(n)===o&&f){let c=-1;for(;++c<e.children.length;){const p=e.children[c];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(o=u),n.bulletCurrent=o;const a=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=l,i(),a}function bv(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Fv(e,t,n,r){const i=bv(n);let l=n.bulletCurrent||Qs(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let o=l.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const u=n.createTracker(r);u.move(l+" ".repeat(o-l.length)),u.shift(o);const s=n.enter("listItem"),a=n.indentLines(n.containerFlow(e,u.current()),f);return s(),a;function f(c,p,d){return p?(d?"":" ".repeat(o))+c:(d?l:l+" ".repeat(o-l.length))+c}}function Mv(e,t,n,r){const i=n.enter("paragraph"),l=n.enter("phrasing"),o=n.containerPhrasing(e,r);return l(),i(),o}const Ov=Fl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function jv(e,t,n,r){return(e.children.some(function(o){return Ov(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Bv(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}oh.peek=Uv;function oh(e,t,n,r){const i=Bv(n),l=n.enter("strong"),o=n.createTracker(r),u=o.move(i+i);let s=o.move(n.containerPhrasing(e,{after:i,before:u,...o.current()}));const a=s.charCodeAt(0),f=Bl(r.before.charCodeAt(r.before.length-1),a,i);f.inside&&(s=ui(a)+s.slice(1));const c=s.charCodeAt(s.length-1),p=Bl(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+ui(c));const d=o.move(i+i);return l(),n.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},u+s+d}function Uv(e,t,n){return n.options.strong||"*"}function $v(e,t,n,r){return n.safe(e.value,r)}function Hv(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Vv(e,t,n){const r=(lh(n)+(n.options.ruleSpaces?" ":"")).repeat(Hv(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uh={blockquote:dv,break:Xd,code:kv,definition:wv,emphasis:Gd,hardBreak:Xd,heading:zv,html:Jd,image:Zd,imageReference:eh,inlineCode:th,link:rh,linkReference:ih,list:Rv,listItem:Fv,paragraph:Mv,root:jv,strong:oh,text:$v,thematicBreak:Vv};function Wv(){return{enter:{table:Qv,tableData:sh,tableHeader:sh,tableRow:Kv},exit:{codeText:qv,table:Yv,tableData:Ys,tableHeader:Ys,tableRow:Ys}}}function Qv(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Yv(e){this.exit(e),this.data.inTable=void 0}function Kv(e){this.enter({type:"tableRow",children:[]},e)}function Ys(e){this.exit(e)}function sh(e){this.enter({type:"tableCell",children:[]},e)}function qv(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xv));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xv(e,t){return t==="|"?t:e}function Gv(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
69
69
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:s,tableRow:u}};function o(d,g,k,E){return a(f(d,k,E),d.align)}function u(d,g,k,E){const h=c(d,k,E),m=a([h]);return m.slice(0,m.indexOf(`
70
70
  `))}function s(d,g,k,E){const h=k.enter("tableCell"),m=k.enter("phrasing"),y=k.containerPhrasing(d,{...E,before:l,after:l});return m(),h(),y}function a(d,g){return fv(d,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(d,g,k){const E=d.children;let h=-1;const m=[],y=g.enter("table");for(;++h<E.length;)m[h]=c(E[h],g,k);return y(),m}function c(d,g,k){const E=d.children;let h=-1;const m=[],y=g.enter("tableRow");for(;++h<E.length;)m[h]=s(E[h],d,g,k);return y(),m}function p(d,g,k){let E=uh.inlineCode(d,g,k);return k.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function Jv(){return{exit:{taskListCheckValueChecked:ah,taskListCheckValueUnchecked:ah,paragraph:ew}}}function Zv(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tw}}}function ah(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ew(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let l=-1,o;for(;++l<i.length;){const u=i[l];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function tw(e,t,n,r){const i=e.children[0],l=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);l&&u.move(o);let s=uh.listItem(e,t,n,{...r,...u.current()});return l&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,a)),s;function a(f){return f+o}}function nw(){return[Rk(),tv(),lv(),Wv(),Jv()]}function rw(e){return{extensions:[bk(),nv(e),ov(),Gv(e),Zv()]}}const iw={tokenize:cw,partial:!0},ch={tokenize:fw,partial:!0},fh={tokenize:pw,partial:!0},ph={tokenize:dw,partial:!0},lw={tokenize:hw,partial:!0},dh={name:"wwwAutolink",tokenize:sw,previous:mh},hh={name:"protocolAutolink",tokenize:aw,previous:gh},Dt={name:"emailAutolink",tokenize:uw,previous:yh},wt={};function ow(){return{text:wt}}let Cn=48;for(;Cn<123;)wt[Cn]=Dt,Cn++,Cn===58?Cn=65:Cn===91&&(Cn=97);wt[43]=Dt,wt[45]=Dt,wt[46]=Dt,wt[95]=Dt,wt[72]=[Dt,hh],wt[104]=[Dt,hh],wt[87]=[Dt,dh],wt[119]=[Dt,dh];function uw(e,t,n){const r=this;let i,l;return o;function o(c){return!Ks(c)||!yh.call(r,r.previous)||qs(r.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(c))}function u(c){return Ks(c)?(e.consume(c),u):c===64?(e.consume(c),s):n(c)}function s(c){return c===46?e.check(lw,f,a)(c):c===45||c===95||Ne(c)?(l=!0,e.consume(c),s):f(c)}function a(c){return e.consume(c),i=!0,s}function f(c){return l&&i&&be(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(c)):n(c)}}function sw(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!mh.call(r,r.previous)||qs(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(iw,e.attempt(ch,e.attempt(fh,l),n),n)(o))}function l(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function aw(e,t,n){const r=this;let i="",l=!1;return o;function o(c){return(c===72||c===104)&&gh.call(r,r.previous)&&!qs(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),u):n(c)}function u(c){if(be(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),u;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return n(c)}function s(c){return c===47?(e.consume(c),l?a:(l=!0,s)):n(c)}function a(c){return c===null||Pl(c)||ee(c)||Sn(c)||_l(c)?n(c):e.attempt(ch,e.attempt(fh,f),n)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(c)}}function cw(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),l):n(o)}function l(o){return o===null?n(o):t(o)}}function fw(e,t,n){let r,i,l;return o;function o(a){return a===46||a===95?e.check(ph,s,u)(a):a===null||ee(a)||Sn(a)||a!==45&&_l(a)?s(a):(l=!0,e.consume(a),o)}function u(a){return a===95?r=!0:(i=r,r=void 0),e.consume(a),o}function s(a){return i||r||!l?n(a):t(a)}}function pw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?l(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ph,t,l)(o):o===null||ee(o)||Sn(o)?t(o):(e.consume(o),i)}function l(o){return o===41&&r++,e.consume(o),i}}function dw(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),l):u===93?(e.consume(u),i):u===60||u===null||ee(u)||Sn(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||ee(u)||Sn(u)?t(u):r(u)}function l(u){return be(u)?o(u):n(u)}function o(u){return u===59?(e.consume(u),r):be(u)?(e.consume(u),o):n(u)}}function hw(e,t,n){return r;function r(l){return e.consume(l),i}function i(l){return Ne(l)?n(l):t(l)}}function mh(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ee(e)}function gh(e){return!be(e)}function yh(e){return!(e===47||Ks(e))}function Ks(e){return e===43||e===45||e===46||e===95||Ne(e)}function qs(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const mw={tokenize:Cw,partial:!0};function gw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vw,continuation:{tokenize:ww},exit:Sw}},text:{91:{name:"gfmFootnoteCall",tokenize:kw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:yw,resolveTo:xw}}}}function yw(e,t,n){const r=this;let i=r.events.length;const l=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const s=r.events[i][1];if(s.type==="labelImage"){o=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return u;function u(s){if(!o||!o._balanced)return n(s);const a=pt(r.sliceSerialize({start:o.end,end:r.now()}));return a.codePointAt(0)!==94||!l.includes(a.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function xw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function kw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l=0,o;return u;function u(c){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(e.enter("gfmFootnoteCallMarker"),e.consume(c),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",a)}function a(c){if(l>999||c===93&&!o||c===null||c===91||ee(c))return n(c);if(c===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(pt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(c)}return ee(c)||(o=!0),l++,e.consume(c),c===92?f:a}function f(c){return c===91||c===92||c===93?(e.consume(c),l++,a):a(c)}}function vw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l,o=0,u;return s;function s(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),a}function a(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(o>999||g===93&&!u||g===null||g===91||ee(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=pt(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ee(g)||(u=!0),o++,e.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(e.consume(g),o++,f):f(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(l)||i.push(l),q(e,d,"gfmFootnoteDefinitionWhitespace")):n(g)}function d(g){return t(g)}}function ww(e,t,n){return e.check(ti,t,e.attempt(mw,t,n))}function Sw(e){e.exit("gfmFootnoteDefinition")}function Cw(e,t,n){const r=this;return q(e,i,"gfmFootnoteDefinitionIndent",5);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(l):n(l)}}function Ew(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:l,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,u){let s=-1;for(;++s<o.length;)if(o[s][0]==="enter"&&o[s][1].type==="strikethroughSequenceTemporary"&&o[s][1]._close){let a=s;for(;a--;)if(o[a][0]==="exit"&&o[a][1].type==="strikethroughSequenceTemporary"&&o[a][1]._open&&o[s][1].end.offset-o[s][1].start.offset===o[a][1].end.offset-o[a][1].start.offset){o[s][1].type="strikethroughSequence",o[a][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},o[a][1].start),end:Object.assign({},o[s][1].end)},c={type:"strikethroughText",start:Object.assign({},o[a][1].end),end:Object.assign({},o[s][1].start)},p=[["enter",f,u],["enter",o[a][1],u],["exit",o[a][1],u],["enter",c,u]],d=u.parser.constructs.insideSpan.null;d&&Xe(p,p.length,0,Il(d,o.slice(a+1,s),u)),Xe(p,p.length,0,[["exit",c,u],["enter",o[s][1],u],["exit",o[s][1],u],["exit",f,u]]),Xe(o,a-1,s-a+3,p),s=a+p.length-2;break}}for(s=-1;++s<o.length;)o[s][1].type==="strikethroughSequenceTemporary"&&(o[s][1].type="data");return o}function l(o,u,s){const a=this.previous,f=this.events;let c=0;return p;function p(g){return a===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(o.enter("strikethroughSequenceTemporary"),d(g))}function d(g){const k=rr(a);if(g===126)return c>1?s(g):(o.consume(g),c++,d);if(c<2&&!n)return s(g);const E=o.exit("strikethroughSequenceTemporary"),h=rr(g);return E._open=!h||h===2&&!!k,E._close=!k||k===2&&!!h,u(g)}}}class zw{constructor(){this.map=[]}add(t,n,r){Tw(this,t,n,r)}consume(t){if(this.map.sort(function(l,o){return l[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0}}function Tw(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Pw(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=r.length-1;r[l]=r[l]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function _w(){return{flow:{null:{name:"table",tokenize:Iw,resolveAll:Nw}}}}function Iw(e,t,n){const r=this;let i=0,l=0,o;return u;function u(S){let R=r.events.length-1;for(;R>-1;){const F=r.events[R][1].type;if(F==="lineEnding"||F==="linePrefix")R--;else break}const M=R>-1?r.events[R][1].type:null,U=M==="tableHead"||M==="tableRow"?w:s;return U===w&&r.parser.lazy[r.now().line]?n(S):U(S)}function s(S){return e.enter("tableHead"),e.enter("tableRow"),a(S)}function a(S){return S===124||(o=!0,l+=1),f(S)}function f(S){return S===null?n(S):j(S)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),d):n(S):Y(S)?q(e,f,"whitespace")(S):(l+=1,o&&(o=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),o=!0,f):(e.enter("data"),c(S)))}function c(S){return S===null||S===124||ee(S)?(e.exit("data"),f(S)):(e.consume(S),S===92?p:c)}function p(S){return S===92||S===124?(e.consume(S),c):c(S)}function d(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),o=!1,Y(S)?q(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):g(S))}function g(S){return S===45||S===58?E(S):S===124?(o=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),k):T(S)}function k(S){return Y(S)?q(e,E,"whitespace")(S):E(S)}function E(S){return S===58?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),h):S===45?(l+=1,h(S)):S===null||j(S)?C(S):T(S)}function h(S){return S===45?(e.enter("tableDelimiterFiller"),m(S)):T(S)}function m(S){return S===45?(e.consume(S),m):S===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(S))}function y(S){return Y(S)?q(e,C,"whitespace")(S):C(S)}function C(S){return S===124?g(S):S===null||j(S)?!o||i!==l?T(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):T(S)}function T(S){return n(S)}function w(S){return e.enter("tableRow"),I(S)}function I(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),I):S===null||j(S)?(e.exit("tableRow"),t(S)):Y(S)?q(e,I,"whitespace")(S):(e.enter("data"),L(S))}function L(S){return S===null||S===124||ee(S)?(e.exit("data"),I(S)):(e.consume(S),S===92?O:L)}function O(S){return S===92||S===124?(e.consume(S),L):L(S)}}function Nw(e,t){let n=-1,r=!0,i=0,l=[0,0,0,0],o=[0,0,0,0],u=!1,s=0,a,f,c;const p=new zw;for(;++n<e.length;){const d=e[n],g=d[1];d[0]==="enter"?g.type==="tableHead"?(u=!1,s!==0&&(xh(p,t,s,a,f),f=void 0,s=0),a={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",a,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,l=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(l[1]!==0&&(o[0]=o[1],c=Ul(p,t,l,i,void 0,c),l=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(l[1]!==0&&(o[0]=o[1],c=Ul(p,t,l,i,void 0,c)),l=o,o=[l[1],n,0,0])):g.type==="tableHead"?(u=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,l[1]!==0?(o[0]=o[1],c=Ul(p,t,l,i,n,c)):o[1]!==0&&(c=Ul(p,t,o,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(s!==0&&xh(p,t,s,a,f),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Pw(t.events,n))}return e}function Ul(e,t,n,r,i,l){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(l.end=Object.assign({},lr(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const s=lr(t.events,n[1]);if(l={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const a=lr(t.events,n[2]),f=lr(t.events,n[3]),c={type:u,start:Object.assign({},a),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",c,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;e.add(g,k,[])}}e.add(n[3]+1,0,[["exit",c,t]])}return i!==void 0&&(l.end=Object.assign({},lr(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function xh(e,t,n,r,i){const l=[],o=lr(t.events,n);i&&(i.end=Object.assign({},o),l.push(["exit",i,t])),r.end=Object.assign({},o),l.push(["exit",r,t]),e.add(n+1,0,l)}function lr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Lw={name:"tasklistCheck",tokenize:Dw};function Aw(){return{text:{91:Lw}}}function Dw(e,t,n){const r=this;return i;function i(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),l)}function l(s){return ee(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),o):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),o):n(s)}function o(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(s)}function u(s){return j(s)?t(s):Y(s)?e.check({tokenize:Rw},t,n)(s):n(s)}}function Rw(e,t,n){return q(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function bw(e){return Qp([ow(),gw(),Ew(e),_w(),Aw()])}const Fw={};function kh(e){const t=this,n=e||Fw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),l=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(bw(n)),l.push(nw()),o.push(rw(n))}function Mw(e){return e.type==="dynamic-tool"||typeof e.type=="string"&&e.type.startsWith("tool-")}function Ow({message:e}){var t,n;if(e.role==="user"){const r=(t=e.parts)==null?void 0:t.find(i=>i.type==="text");return P.jsxs("div",{className:"text-sm",children:[P.jsx("span",{className:"text-xs text-zinc-500 block mb-1",children:"Test Plan"}),P.jsx("div",{className:"text-zinc-200 prose prose-invert prose-sm max-w-none",children:P.jsx($d,{remarkPlugins:[kh],children:(r==null?void 0:r.text)||""})})]})}return P.jsx("div",{className:"text-sm space-y-2",children:(n=e.parts)==null?void 0:n.map((r,i)=>{var l,o;if(r.type==="text"&&r.text)return((o=(l=r.providerMetadata)==null?void 0:l.anthropic)==null?void 0:o.type)==="compaction"?null:P.jsxs("div",{children:[P.jsx("span",{className:"text-xs text-zinc-500 block mb-1",children:"Agent"}),P.jsx("div",{className:"text-zinc-300 prose prose-invert prose-sm max-w-none",children:P.jsx($d,{remarkPlugins:[kh],children:r.text})})]},i);if(Mw(r)){const u=r.toolName||(typeof r.type=="string"?r.type.replace(/^tool-/,""):"");return u==="todos"||u==="report_result"?null:P.jsx(jw,{part:r},i)}return null})})}function jw({part:e}){const[t,n]=H.useState(!1),r=e.input||{},i=e.output,l=e.state||"input-available",o=l==="input-streaming"||l==="input-available",u=e.toolName||(typeof e.type=="string"?e.type.replace(/^tool-/,""):""),s=l==="input-streaming"?"":u==="browser"?(()=>{const a=(r.actions||[]).map(f=>{switch(f.action){case"navigate":return`navigate ${f.url||""}`;case"mouse":return`mouse ${(f.mouseActions||[]).map(p=>p.action==="wait"?`wait ${p.ms}ms`:`${p.action} ${p.ref||`${p.x},${p.y}`}`).join(" → ")}`;case"type":return`type "${(f.text||"").slice(0,40)}"`;case"press":return`press ${f.key||""}`;case"tabs":return`tabs ${f.tabAction||""}`;default:return f.action||""}});return r.observe&&a.push(r.observe),a.join(", ")})():r.command||(Object.keys(r).length>0?JSON.stringify(r):"");return P.jsxs("div",{className:"text-sm",children:[P.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-2 text-xs px-2 py-1.5 bg-zinc-900 border border-zinc-800 rounded-lg hover:border-zinc-700 transition-colors w-full text-left min-w-0 overflow-hidden",children:[o?P.jsx("span",{className:"inline-block w-2 h-2 bg-amber-500 rounded-full shrink-0"}):P.jsx("span",{className:"text-green-500 shrink-0",children:"✓"}),P.jsx("span",{className:"text-zinc-400 font-mono truncate",children:s}),P.jsx("span",{className:`ml-auto transition-transform text-zinc-600 shrink-0 ${t?"rotate-90":""}`,children:"▶"})]}),t&&P.jsxs("pre",{className:"mt-1 px-3 py-2 bg-zinc-900/50 rounded-lg border border-zinc-800 text-xs whitespace-pre-wrap break-all max-h-60 overflow-y-auto",children:[s&&P.jsxs(P.Fragment,{children:[P.jsxs("span",{className:"text-zinc-300 select-all",children:["$ ",s]}),`
71
- `]}),i!=null&&(()=>{if(u==="browser"&&typeof i=="string")try{const a=JSON.parse(i);if(a.textOutput!==void 0)return P.jsx("span",{className:"text-zinc-500",children:a.textOutput})}catch{}return P.jsx("span",{className:"text-zinc-500",children:typeof i=="string"?i:JSON.stringify(i,null,2)})})()]})]})}function Bw({messages:e,currentTime:t}){const n=H.useRef(null),r=H.useRef(null),i=H.useMemo(()=>{const o=[];for(const u of e){if(u._ts&&u._ts>t)break;if(!u.parts){o.push(u);continue}const s=u.parts.filter(a=>!a._ts||a._ts<=t);s.length>0&&o.push({...u,parts:s})}return o},[e,t]),l=H.useRef(0);return H.useEffect(()=>{var u;const o=i.reduce((s,a)=>{var f;return s+(((f=a.parts)==null?void 0:f.length)||1)},0);o>l.current&&(l.current=o,(u=r.current)==null||u.scrollIntoView({behavior:"smooth"}))},[i]),P.jsxs("div",{ref:n,className:"flex-1 overflow-y-auto overflow-x-hidden px-3 md:px-4 py-4 space-y-3 break-words",children:[i.map((o,u)=>P.jsx(Ow,{message:o},o.id||u)),i.length===0&&P.jsx("div",{className:"text-sm text-zinc-600",children:"No messages"}),P.jsx("div",{ref:r})]})}function Uw({messages:e,currentTime:t}){const n=H.useMemo(()=>{var i;let r=[];for(const l of e){if(l._ts&&l._ts>t)break;for(const o of l.parts||[]){if(o._ts&&o._ts>t)break;(o.toolName||(typeof o.type=="string"?o.type.replace(/^tool-/,""):""))==="todos"&&((i=o.input)!=null&&i.todos)&&(r=o.input.todos)}}return r},[e,t]);return n.length===0?null:P.jsxs("div",{className:"px-3 md:px-4 py-3 border-b border-zinc-800",children:[P.jsx("div",{className:"text-xs font-medium text-zinc-500 uppercase tracking-wider mb-2",children:"Progress"}),P.jsx("div",{className:"space-y-1",children:n.map((r,i)=>P.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[P.jsx("span",{className:"shrink-0",children:r.status==="completed"?P.jsx("span",{className:"text-green-500",children:"✓"}):r.status==="in_progress"?P.jsx("span",{className:"inline-block w-2 h-2 bg-amber-500 rounded-full"}):P.jsx("span",{className:"inline-block w-2 h-2 border border-zinc-600 rounded-full"})}),P.jsx("span",{className:r.status==="completed"?"text-zinc-500 line-through":"text-zinc-300",children:r.content})]},i))})]})}const $w=[1,2,4,8];function Hw({startTime:e,endTime:t,currentTime:n,clips:r,playing:i,speed:l,autoSpeed:o,onSeek:u,onTogglePlay:s,onSetSpeed:a,onSetAutoSpeed:f,formatTime:c,elapsed:p,duration:d}){const g=H.useRef(null),k=H.useCallback(y=>{const C=g.current;if(!C)return;const T=C.getBoundingClientRect(),w=Math.max(0,Math.min(1,(y.clientX-T.left)/T.width));u(e+w*d)},[e,d,u]),E=H.useCallback(y=>{y.buttons===1&&k(y)},[k]),h=H.useCallback(y=>{const C=g.current;if(!C||!y.touches[0])return;const T=C.getBoundingClientRect(),w=Math.max(0,Math.min(1,(y.touches[0].clientX-T.left)/T.width));u(e+w*d)},[e,d,u]),m=d>0?(n-e)/d*100:0;return P.jsxs("div",{className:"border-t border-zinc-800 bg-zinc-900 px-3 md:px-4 py-2 md:py-3 shrink-0",children:[P.jsxs("div",{ref:g,className:"relative h-6 mb-2 cursor-pointer rounded overflow-hidden bg-zinc-800",onClick:k,onMouseMove:E,onTouchStart:h,onTouchMove:h,children:[r.map((y,C)=>{const T=d>0?(y.startTime-e)/d*100:0,w=d>0?(y.endTime-y.startTime)/d*100:0;return P.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-900/60",style:{left:`${T}%`,width:`${w}%`}},C)}),P.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-600/30 pointer-events-none",style:{width:`${m}%`}}),P.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-blue-400 pointer-events-none",style:{left:`${m}%`}})]}),P.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[P.jsx("button",{onClick:s,className:"text-zinc-300 hover:text-white transition-colors text-sm px-3 py-2 md:px-2 md:py-1 rounded border border-zinc-700 hover:border-zinc-500",children:i?"⏸":"▶"}),P.jsxs("span",{className:"text-xs text-zinc-400 font-mono tabular-nums",children:[c(p)," / ",c(d)]}),P.jsx("div",{className:"flex-1"}),P.jsx("button",{onClick:()=>f(!o),className:`text-xs px-2 py-1 rounded border transition-colors ${o?"border-blue-600 text-blue-400 bg-blue-950/30":"border-zinc-700 text-zinc-500 hover:text-zinc-400"}`,children:"Auto"}),P.jsx("div",{className:"flex gap-1",children:$w.map(y=>P.jsxs("button",{onClick:()=>a(y),className:`text-xs px-2 py-1 rounded border transition-colors ${l===y?"border-zinc-500 text-zinc-200 bg-zinc-800":"border-zinc-700 text-zinc-500 hover:text-zinc-400"}`,children:[y,"x"]},y))})]})]})}function Vw({data:e}){const t=e.focusAgentId,[n,r]=H.useState(null),[i,l]=H.useState(e.startTime),[o,u]=H.useState(!1),[s,a]=H.useState(1),[f,c]=H.useState(!0),[p,d]=H.useState("video"),g=H.useRef(0),k=H.useRef(0),E=e.endTime-e.startTime,h=H.useMemo(()=>e.clips.filter(F=>F.agentId===t),[e.clips,t]),m=H.useMemo(()=>[...new Set(h.map(F=>F.tabId))],[h]),y=H.useMemo(()=>n!==null?h.filter(F=>F.tabId===n):h,[h,n]);H.useEffect(()=>{m.length>0&&n===null&&r(m[0])},[m.length]);const T=!y.find(F=>i>=F.startTime&&i<=F.endTime),w=f&&T?Math.max(s,4):s;H.useEffect(()=>{if(!o){cancelAnimationFrame(g.current);return}k.current=performance.now();const F=()=>{const $=performance.now(),ae=($-k.current)*w;k.current=$,l(oe=>{const A=oe+ae;return A>=e.endTime?(u(!1),e.endTime):A}),g.current=requestAnimationFrame(F)};return g.current=requestAnimationFrame(F),()=>cancelAnimationFrame(g.current)},[o,w,e.endTime]);const I=H.useCallback(F=>{l(Math.max(e.startTime,Math.min(e.endTime,F)))},[e.startTime,e.endTime]),L=H.useCallback(()=>{u(F=>(F||l($=>$>=e.endTime?e.startTime:$),!F))},[e.endTime,e.startTime]);H.useEffect(()=>{const F=$=>{$.code==="Space"&&($.preventDefault(),L())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[L]);const O=F=>{const $=Math.floor(F/1e3),ae=Math.floor($/60),oe=$%60;return`${ae}:${oe.toString().padStart(2,"0")}`},S=H.useMemo(()=>{for(let F=y.length-1;F>=0;F--)if(y[F].startTime<=i&&y[F].url)return y[F].url;return""},[y,Math.floor(i/500)]),R=i-e.startTime,M=e.agents.length>1,U=e.agents.find(F=>F.id===t);return P.jsxs("div",{className:"flex flex-col h-screen overflow-hidden",children:[M&&P.jsx("div",{className:"md:hidden flex items-center gap-2 px-3 py-2 bg-zinc-900 border-b border-zinc-800 overflow-x-auto",children:e.agents.map(F=>P.jsxs("a",{href:e.agentFiles[F.id]||"#",className:`text-sm px-3 py-2 rounded border whitespace-nowrap transition-colors no-underline ${F.id===t?"border-zinc-500 text-zinc-200 bg-zinc-800":"border-zinc-700 text-zinc-500"}`,children:[F.result==="pass"?"✓ ":F.result==="fail"?"✗ ":"",F.name]},F.id))}),P.jsxs("div",{className:"md:hidden flex border-b border-zinc-800 bg-zinc-900",children:[P.jsx("button",{onClick:()=>d("video"),className:`flex-1 text-sm py-3 text-center transition-colors ${p==="video"?"text-zinc-200 border-b-2 border-blue-500":"text-zinc-500"}`,children:"Browser"}),P.jsxs("button",{onClick:()=>d("activity"),className:`flex-1 text-sm py-3 text-center transition-colors ${p==="activity"?"text-zinc-200 border-b-2 border-blue-500":"text-zinc-500"}`,children:["Activity",(U==null?void 0:U.result)&&P.jsx("span",{className:`ml-1.5 ${U.result==="pass"?"text-green-400":"text-red-400"}`,children:U.result==="pass"?"PASS":"FAIL"})]})]}),P.jsxs("div",{className:"flex flex-1 min-h-0",children:[M&&P.jsx("div",{className:"hidden md:flex",children:P.jsx(Zg,{agents:e.agents,activeAgentId:t,agentFiles:e.agentFiles})}),P.jsxs("div",{className:`flex-1 flex flex-col min-w-0 md:border-r border-zinc-800 ${p!=="video"?"hidden md:flex":""}`,children:[m.length>1&&P.jsx(ey,{tabIds:m,activeTabId:n,onSelectTab:r}),P.jsx("div",{className:"flex items-center gap-2 px-3 py-2 bg-zinc-900 border-b border-zinc-800",children:P.jsx("div",{className:"flex-1 px-3 py-1.5 bg-zinc-800 border border-zinc-700 rounded-lg text-xs text-zinc-400 truncate",children:S||"about:blank"})}),P.jsx("div",{className:"flex-1 min-h-0 relative",children:P.jsx(ty,{clips:y,currentTime:i,playing:o,speed:w})}),P.jsx(ny,{entries:e.consoleLogs[t]||[],currentTime:i})]}),P.jsxs("div",{className:`md:w-[420px] flex flex-col h-full md:shrink-0 min-w-0 overflow-hidden ${p!=="activity"?"hidden md:flex":"flex-1"}`,children:[P.jsxs("div",{className:"hidden md:flex items-center px-4 py-3 border-b border-zinc-800",children:[P.jsx("h2",{className:"text-sm font-medium text-zinc-300",children:(U==null?void 0:U.name)||"Activity"}),P.jsx("div",{className:"flex-1"}),(U==null?void 0:U.result)&&P.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded ${U.result==="pass"?"bg-green-950/50 text-green-400":"bg-red-950/50 text-red-400"}`,children:U.result==="pass"?"PASSED":"FAILED"})]}),P.jsx(Uw,{messages:e.messages[t]||[],currentTime:i}),P.jsx(Bw,{messages:e.messages[t]||[],timeline:e.timeline.filter(F=>F.agentId===t),currentTime:i,startTime:e.startTime})]})]}),P.jsx(Hw,{startTime:e.startTime,endTime:e.endTime,currentTime:i,clips:y,playing:o,speed:s,autoSpeed:f,onSeek:I,onTogglePlay:L,onSetSpeed:a,onSetAutoSpeed:c,formatTime:O,elapsed:R,duration:E})]})}const vh=window.__REPLAY_DATA__;vh?ql.createRoot(document.getElementById("root")).render(P.jsx(Uh.StrictMode,{children:P.jsx(Vw,{data:vh})})):document.getElementById("root").innerHTML='<div style="color:#999;padding:40px;font-family:sans-serif">No replay data found.</div>'})();
71
+ `]}),i!=null&&(()=>{if(u==="browser"&&typeof i=="string")try{const a=JSON.parse(i);if(a.textOutput!==void 0)return P.jsx("span",{className:"text-zinc-500",children:a.textOutput})}catch{}return P.jsx("span",{className:"text-zinc-500",children:typeof i=="string"?i:JSON.stringify(i,null,2)})})()]})]})}function Bw({messages:e,currentTime:t}){const n=H.useRef(null),r=H.useRef(null),i=H.useMemo(()=>{const o=[];for(const u of e){if(u._ts&&u._ts>t)break;if(!u.parts){o.push(u);continue}const s=u.parts.filter(a=>!a._ts||a._ts<=t);s.length>0&&o.push({...u,parts:s})}return o},[e,t]),l=H.useRef(0);return H.useEffect(()=>{var u;const o=i.reduce((s,a)=>{var f;return s+(((f=a.parts)==null?void 0:f.length)||1)},0);o>l.current&&(l.current=o,(u=r.current)==null||u.scrollIntoView({behavior:"smooth"}))},[i]),P.jsxs("div",{ref:n,className:"flex-1 overflow-y-auto overflow-x-hidden px-3 md:px-4 py-4 space-y-3 break-words",children:[i.map((o,u)=>P.jsx(Ow,{message:o},o.id||u)),i.length===0&&P.jsx("div",{className:"text-sm text-zinc-600",children:"No messages"}),P.jsx("div",{ref:r})]})}function Uw({messages:e,currentTime:t}){const n=H.useMemo(()=>{var i;let r=[];for(const l of e){if(l._ts&&l._ts>t)break;for(const o of l.parts||[]){if(o._ts&&o._ts>t)break;(o.toolName||(typeof o.type=="string"?o.type.replace(/^tool-/,""):""))==="todos"&&((i=o.input)!=null&&i.todos)&&(r=o.input.todos)}}return r},[e,t]);return n.length===0?null:P.jsxs("div",{className:"px-3 md:px-4 py-3 border-b border-zinc-800",children:[P.jsx("div",{className:"text-xs font-medium text-zinc-500 uppercase tracking-wider mb-2",children:"Progress"}),P.jsx("div",{className:"space-y-1",children:n.map((r,i)=>P.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[P.jsx("span",{className:"shrink-0",children:r.status==="completed"?P.jsx("span",{className:"text-green-500",children:"✓"}):r.status==="in_progress"?P.jsx("span",{className:"inline-block w-2 h-2 bg-amber-500 rounded-full"}):P.jsx("span",{className:"inline-block w-2 h-2 border border-zinc-600 rounded-full"})}),P.jsx("span",{className:r.status==="completed"?"text-zinc-500 line-through":"text-zinc-300",children:r.content})]},i))})]})}const $w=[1,2,4,8];function Hw({startTime:e,currentTime:t,clips:n,playing:r,speed:i,autoSpeed:l,onSeek:o,onTogglePlay:u,onSetSpeed:s,onSetAutoSpeed:a,formatTime:f,elapsed:c,duration:p}){const d=H.useRef(null),g=H.useCallback(m=>{const y=d.current;if(!y)return;const C=y.getBoundingClientRect(),T=Math.max(0,Math.min(1,(m.clientX-C.left)/C.width));o(e+T*p)},[e,p,o]),k=H.useCallback(m=>{m.buttons===1&&g(m)},[g]),E=H.useCallback(m=>{const y=d.current;if(!y||!m.touches[0])return;const C=y.getBoundingClientRect(),T=Math.max(0,Math.min(1,(m.touches[0].clientX-C.left)/C.width));o(e+T*p)},[e,p,o]),h=p>0?(t-e)/p*100:0;return P.jsxs("div",{className:"border-t border-zinc-800 bg-zinc-900 px-3 md:px-4 py-2 md:py-3 shrink-0",children:[P.jsxs("div",{ref:d,className:"relative h-6 mb-2 cursor-pointer rounded overflow-hidden bg-zinc-800",onClick:g,onMouseMove:k,onTouchStart:E,onTouchMove:E,children:[n.map((m,y)=>{const C=p>0?(m.startTime-e)/p*100:0,T=p>0?(m.endTime-m.startTime)/p*100:0;return P.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-900/60",style:{left:`${C}%`,width:`${T}%`}},y)}),P.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-600/30 pointer-events-none",style:{width:`${h}%`}}),P.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-blue-400 pointer-events-none",style:{left:`${h}%`}})]}),P.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[P.jsx("button",{onClick:u,className:"text-zinc-300 hover:text-white transition-colors text-sm px-3 py-2 md:px-2 md:py-1 rounded border border-zinc-700 hover:border-zinc-500",children:r?"⏸":"▶"}),P.jsxs("span",{className:"text-xs text-zinc-400 font-mono tabular-nums",children:[f(c)," / ",f(p)]}),P.jsx("div",{className:"flex-1"}),P.jsx("button",{onClick:()=>a(!l),className:`text-xs px-2 py-1 rounded border transition-colors ${l?"border-blue-600 text-blue-400 bg-blue-950/30":"border-zinc-700 text-zinc-500 hover:text-zinc-400"}`,children:"Auto"}),P.jsx("div",{className:"flex gap-1",children:$w.map(m=>P.jsxs("button",{onClick:()=>s(m),className:`text-xs px-2 py-1 rounded border transition-colors ${i===m?"border-zinc-500 text-zinc-200 bg-zinc-800":"border-zinc-700 text-zinc-500 hover:text-zinc-400"}`,children:[m,"x"]},m))})]})]})}function Vw({data:e}){const t=e.focusAgentId,[n,r]=H.useState(null),[i,l]=H.useState(e.startTime),[o,u]=H.useState(!1),[s,a]=H.useState(1),[f,c]=H.useState(!0),[p,d]=H.useState("video"),g=H.useRef(0),k=H.useRef(0),E=e.endTime-e.startTime,h=H.useMemo(()=>e.clips.filter(F=>F.agentId===t),[e.clips,t]),m=H.useMemo(()=>[...new Set(h.map(F=>F.tabId))],[h]),y=H.useMemo(()=>n!==null?h.filter(F=>F.tabId===n):h,[h,n]);H.useEffect(()=>{m.length>0&&n===null&&r(m[0])},[m.length]);const T=!y.find(F=>i>=F.startTime&&i<=F.endTime),w=f&&T?Math.max(s,4):s;H.useEffect(()=>{if(!o){cancelAnimationFrame(g.current);return}k.current=performance.now();const F=()=>{const $=performance.now(),ae=($-k.current)*w;k.current=$,l(oe=>{const A=oe+ae;return A>=e.endTime?(u(!1),e.endTime):A}),g.current=requestAnimationFrame(F)};return g.current=requestAnimationFrame(F),()=>cancelAnimationFrame(g.current)},[o,w,e.endTime]);const I=H.useCallback(F=>{l(Math.max(e.startTime,Math.min(e.endTime,F)))},[e.startTime,e.endTime]),L=H.useCallback(()=>{u(F=>(F||l($=>$>=e.endTime?e.startTime:$),!F))},[e.endTime,e.startTime]);H.useEffect(()=>{const F=$=>{$.code==="Space"&&($.preventDefault(),L())};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[L]);const O=F=>{const $=Math.floor(F/1e3),ae=Math.floor($/60),oe=$%60;return`${ae}:${oe.toString().padStart(2,"0")}`},S=H.useMemo(()=>{for(let F=y.length-1;F>=0;F--)if(y[F].startTime<=i&&y[F].url)return y[F].url;return""},[y,i]),R=i-e.startTime,M=e.agents.length>1,U=e.agents.find(F=>F.id===t);return P.jsxs("div",{className:"flex flex-col h-screen overflow-hidden",children:[M&&P.jsx("div",{className:"md:hidden flex items-center gap-2 px-3 py-2 bg-zinc-900 border-b border-zinc-800 overflow-x-auto",children:e.agents.map(F=>P.jsxs("a",{href:e.agentFiles[F.id]||"#",className:`text-sm px-3 py-2 rounded border whitespace-nowrap transition-colors no-underline ${F.id===t?"border-zinc-500 text-zinc-200 bg-zinc-800":"border-zinc-700 text-zinc-500"}`,children:[F.result==="pass"?"✓ ":F.result==="fail"?"✗ ":"",F.name]},F.id))}),P.jsxs("div",{className:"md:hidden flex border-b border-zinc-800 bg-zinc-900",children:[P.jsx("button",{onClick:()=>d("video"),className:`flex-1 text-sm py-3 text-center transition-colors ${p==="video"?"text-zinc-200 border-b-2 border-blue-500":"text-zinc-500"}`,children:"Browser"}),P.jsxs("button",{onClick:()=>d("activity"),className:`flex-1 text-sm py-3 text-center transition-colors ${p==="activity"?"text-zinc-200 border-b-2 border-blue-500":"text-zinc-500"}`,children:["Activity",(U==null?void 0:U.result)&&P.jsx("span",{className:`ml-1.5 ${U.result==="pass"?"text-green-400":"text-red-400"}`,children:U.result==="pass"?"PASS":"FAIL"})]})]}),P.jsxs("div",{className:"flex flex-1 min-h-0",children:[M&&P.jsx("div",{className:"hidden md:flex",children:P.jsx(Zg,{agents:e.agents,activeAgentId:t,agentFiles:e.agentFiles})}),P.jsxs("div",{className:`flex-1 flex flex-col min-w-0 md:border-r border-zinc-800 ${p!=="video"?"hidden md:flex":""}`,children:[m.length>1&&P.jsx(ey,{tabIds:m,activeTabId:n,onSelectTab:r}),P.jsx("div",{className:"flex items-center gap-2 px-3 py-2 bg-zinc-900 border-b border-zinc-800",children:P.jsx("div",{className:"flex-1 px-3 py-1.5 bg-zinc-800 border border-zinc-700 rounded-lg text-xs text-zinc-400 truncate",children:S||"about:blank"})}),P.jsx("div",{className:"flex-1 min-h-0 relative",children:P.jsx(ty,{clips:y,currentTime:i,playing:o,speed:w})}),P.jsx(ny,{entries:e.consoleLogs[t]||[],currentTime:i})]}),P.jsxs("div",{className:`md:w-[420px] flex flex-col h-full md:shrink-0 min-w-0 overflow-hidden ${p!=="activity"?"hidden md:flex":"flex-1"}`,children:[P.jsxs("div",{className:"hidden md:flex items-center px-4 py-3 border-b border-zinc-800",children:[P.jsx("h2",{className:"text-sm font-medium text-zinc-300",children:(U==null?void 0:U.name)||"Activity"}),P.jsx("div",{className:"flex-1"}),(U==null?void 0:U.result)&&P.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded ${U.result==="pass"?"bg-green-950/50 text-green-400":"bg-red-950/50 text-red-400"}`,children:U.result==="pass"?"PASSED":"FAILED"})]}),P.jsx(Uw,{messages:e.messages[t]||[],currentTime:i}),P.jsx(Bw,{messages:e.messages[t]||[],timeline:e.timeline.filter(F=>F.agentId===t),currentTime:i,startTime:e.startTime})]})]}),P.jsx(Hw,{startTime:e.startTime,currentTime:i,clips:y,playing:o,speed:s,autoSpeed:f,onSeek:I,onTogglePlay:L,onSetSpeed:a,onSetAutoSpeed:c,formatTime:O,elapsed:R,duration:E})]})}const vh=window.__REPLAY_DATA__;vh?ql.createRoot(document.getElementById("root")).render(P.jsx(Uh.StrictMode,{children:P.jsx(Vw,{data:vh})})):document.getElementById("root").innerHTML='<div style="color:#999;padding:40px;font-family:sans-serif">No replay data found.</div>'})();