local-diff-reviewer 3.0.6 → 3.0.7

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 (68) hide show
  1. package/dist/web/assets/{arc-Cg84axlE.js → arc-CscMrRiF.js} +1 -1
  2. package/dist/web/assets/{architectureDiagram-3BPJPVTR-BhFmW8zS.js → architectureDiagram-3BPJPVTR-Bl5UeRyX.js} +1 -1
  3. package/dist/web/assets/{blockDiagram-GPEHLZMM-B_gwPUqs.js → blockDiagram-GPEHLZMM-CkZiDK2o.js} +1 -1
  4. package/dist/web/assets/{c4Diagram-AAUBKEIU-udS95mJ4.js → c4Diagram-AAUBKEIU-Bb-iU1no.js} +1 -1
  5. package/dist/web/assets/channel-DKFtd4gM.js +1 -0
  6. package/dist/web/assets/{chunk-2J33WTMH-DRMpDhg8.js → chunk-2J33WTMH-wMcMfijF.js} +1 -1
  7. package/dist/web/assets/{chunk-3OPIFGDE-CrBi26xx.js → chunk-3OPIFGDE-CYW3PmGJ.js} +1 -1
  8. package/dist/web/assets/{chunk-4BX2VUAB-ClgaWKMv.js → chunk-4BX2VUAB-BXeF5e36.js} +1 -1
  9. package/dist/web/assets/{chunk-55IACEB6-BHmhRian.js → chunk-55IACEB6-D_VzUjWK.js} +1 -1
  10. package/dist/web/assets/{chunk-5ZQYHXKU-dwEKx1Kh.js → chunk-5ZQYHXKU-Bp_AxmEO.js} +1 -1
  11. package/dist/web/assets/{chunk-727SXJPM-D3D5JARg.js → chunk-727SXJPM-ZpA5Hu5q.js} +1 -1
  12. package/dist/web/assets/{chunk-AQP2D5EJ-B4QOD8sk.js → chunk-AQP2D5EJ-CdjRIu7E.js} +1 -1
  13. package/dist/web/assets/{chunk-BSJP7CBP-C21SJ56Q.js → chunk-BSJP7CBP-CYUMou17.js} +1 -1
  14. package/dist/web/assets/{chunk-CSCIHK7Q-DytKRiEW.js → chunk-CSCIHK7Q-DS7OYMpE.js} +1 -1
  15. package/dist/web/assets/{chunk-FMBD7UC4-DbsluYLN.js → chunk-FMBD7UC4-DFiTKkbo.js} +1 -1
  16. package/dist/web/assets/{chunk-KSCS5N6A-C-IpVzL4.js → chunk-KSCS5N6A-D5rkyCF7.js} +1 -1
  17. package/dist/web/assets/{chunk-L5ZTLDWV-eFx3gqLe.js → chunk-L5ZTLDWV-CEr25ZIT.js} +1 -1
  18. package/dist/web/assets/{chunk-LZXEDZCA-BTiElxgm.js → chunk-LZXEDZCA-CNJjDw75.js} +2 -2
  19. package/dist/web/assets/{chunk-ND2GUHAM-Bdk77s3y.js → chunk-ND2GUHAM-DqSUthru.js} +1 -1
  20. package/dist/web/assets/{chunk-NZK2D7GU-BerC0LZD.js → chunk-NZK2D7GU-CfVZsGbm.js} +1 -1
  21. package/dist/web/assets/{chunk-O5CBEL6O-BJJmNkpl.js → chunk-O5CBEL6O-CZ_v8M2y.js} +1 -1
  22. package/dist/web/assets/chunk-QZHKN3VN-DvzCeCJ0.js +1 -0
  23. package/dist/web/assets/chunk-WU5MYG2G-CRiYrFdQ.js +1 -0
  24. package/dist/web/assets/{chunk-XPW4576I-IMdZ7NQ9.js → chunk-XPW4576I-DY8o_fSd.js} +1 -1
  25. package/dist/web/assets/classDiagram-4FO5ZUOK-CPr83Xv7.js +1 -0
  26. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-DDMdoMYC.js +1 -0
  27. package/dist/web/assets/{cose-bilkent-S5V4N54A-bEE3EQZj.js → cose-bilkent-S5V4N54A-Dtx_zY6I.js} +1 -1
  28. package/dist/web/assets/{dagre-BM42HDAG-BZ-53zxS.js → dagre-BM42HDAG-Btz8pmfS.js} +1 -1
  29. package/dist/web/assets/{diagram-2AECGRRQ-211iNcM-.js → diagram-2AECGRRQ-DNzAb2Rh.js} +1 -1
  30. package/dist/web/assets/{diagram-5GNKFQAL-CyL4LePC.js → diagram-5GNKFQAL-C3RFg0JI.js} +1 -1
  31. package/dist/web/assets/{diagram-KO2AKTUF-CP_CM-r_.js → diagram-KO2AKTUF-D2Qq-NfE.js} +1 -1
  32. package/dist/web/assets/{diagram-LMA3HP47-C_BRakpX.js → diagram-LMA3HP47-zBGBqnvs.js} +1 -1
  33. package/dist/web/assets/{diagram-OG6HWLK6-BYto_6Yx.js → diagram-OG6HWLK6-6BEGJnoJ.js} +1 -1
  34. package/dist/web/assets/{dist-qxsRdvW9.js → dist-n8f5Nru3.js} +1 -1
  35. package/dist/web/assets/{erDiagram-TEJ5UH35-CtIBXLwm.js → erDiagram-TEJ5UH35-BiOW5Fx7.js} +1 -1
  36. package/dist/web/assets/{flowDiagram-I6XJVG4X-UwXwF-ZM.js → flowDiagram-I6XJVG4X-BTYzXoMz.js} +1 -1
  37. package/dist/web/assets/{ganttDiagram-6RSMTGT7-BU_hP9Wu.js → ganttDiagram-6RSMTGT7-Cd1IY8YY.js} +1 -1
  38. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-2YG-5WPE.js → gitGraphDiagram-PVQCEYII-ZGs1ziv9.js} +1 -1
  39. package/dist/web/assets/{index-ypWNBjUi.js → index-BscQJV1w.js} +3 -3
  40. package/dist/web/assets/{infoDiagram-5YYISTIA-rEh9pxFr.js → infoDiagram-5YYISTIA-BgBbtTWR.js} +1 -1
  41. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-DiX1Tzhf.js → ishikawaDiagram-YF4QCWOH-Bx7OikfR.js} +1 -1
  42. package/dist/web/assets/{journeyDiagram-JHISSGLW-C-ieUlPg.js → journeyDiagram-JHISSGLW-9SIb1wkN.js} +1 -1
  43. package/dist/web/assets/{kanban-definition-UN3LZRKU-K_3Tzs4m.js → kanban-definition-UN3LZRKU-BwRnA9f5.js} +1 -1
  44. package/dist/web/assets/{line-CfKxt7td.js → line-Dtxf-KyL.js} +1 -1
  45. package/dist/web/assets/{linear-CUoheOLZ.js → linear-M7CWxufw.js} +1 -1
  46. package/dist/web/assets/{mermaid-parser.core-DTY68-PF.js → mermaid-parser.core-A6w_taNH.js} +1 -1
  47. package/dist/web/assets/{mermaid.core-CyzXwwXp.js → mermaid.core-DtosVHuJ.js} +3 -3
  48. package/dist/web/assets/{mindmap-definition-RKZ34NQL-BDWkAMuZ.js → mindmap-definition-RKZ34NQL-CXteu-tW.js} +1 -1
  49. package/dist/web/assets/{pieDiagram-4H26LBE5-CrZWA-9G.js → pieDiagram-4H26LBE5-CBBlXdfb.js} +1 -1
  50. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Be6QDu54.js → quadrantDiagram-W4KKPZXB-C1P5bIgj.js} +1 -1
  51. package/dist/web/assets/{requirementDiagram-4Y6WPE33-CwN9_SK2.js → requirementDiagram-4Y6WPE33-dCPt4FTj.js} +1 -1
  52. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-BepyWhO2.js → sankeyDiagram-5OEKKPKP-CtNokC0u.js} +1 -1
  53. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-oiL10Oq2.js → sequenceDiagram-3UESZ5HK-Cb0Vej2T.js} +1 -1
  54. package/dist/web/assets/{src-Dbh8dc_3.js → src-Bqc9a2xc.js} +1 -1
  55. package/dist/web/assets/{stateDiagram-AJRCARHV-Ds6S6B-q.js → stateDiagram-AJRCARHV-D4uZ3qj-.js} +1 -1
  56. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CgO5gqOT.js +1 -0
  57. package/dist/web/assets/{timeline-definition-PNZ67QCA-B4iQjxvL.js → timeline-definition-PNZ67QCA-DarGEzjO.js} +1 -1
  58. package/dist/web/assets/{vennDiagram-CIIHVFJN-sgD_1aAa.js → vennDiagram-CIIHVFJN-DCJb1aFq.js} +1 -1
  59. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-F28WH00c.js → wardleyDiagram-YWT4CUSO-B5MRPvNd.js} +1 -1
  60. package/dist/web/assets/{xychartDiagram-2RQKCTM6-CF_Koxl7.js → xychartDiagram-2RQKCTM6-BvZdaK45.js} +1 -1
  61. package/dist/web/index.html +1 -1
  62. package/package.json +1 -1
  63. package/dist/web/assets/channel-DbBgc5ya.js +0 -1
  64. package/dist/web/assets/chunk-QZHKN3VN-CJOUPNS_.js +0 -1
  65. package/dist/web/assets/chunk-WU5MYG2G-B4qa5pVw.js +0 -1
  66. package/dist/web/assets/classDiagram-4FO5ZUOK-CN8YXHO4.js +0 -1
  67. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-MU6v1kRJ.js +0 -1
  68. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-xI6XZ47L.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-CyzXwwXp.js","assets/chunk-O5CBEL6O-BJJmNkpl.js","assets/src-Dbh8dc_3.js","assets/chunk-5ZQYHXKU-dwEKx1Kh.js","assets/dist-qxsRdvW9.js","assets/chunk-CSCIHK7Q-DytKRiEW.js","assets/chunk-3OPIFGDE-CrBi26xx.js","assets/chunk-L5ZTLDWV-eFx3gqLe.js","assets/chunk-NZK2D7GU-BerC0LZD.js","assets/rough.esm-KjoEK0it.js","assets/chunk-BSJP7CBP-C21SJ56Q.js","assets/chunk-KSCS5N6A-C-IpVzL4.js","assets/line-CfKxt7td.js","assets/path-BJQEcSo7.js","assets/array-yLZkcI6Y.js","assets/chunk-LZXEDZCA-BTiElxgm.js","assets/chunk-WU5MYG2G-B4qa5pVw.js","assets/chunk-XPW4576I-IMdZ7NQ9.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DtosVHuJ.js","assets/chunk-O5CBEL6O-CZ_v8M2y.js","assets/src-Bqc9a2xc.js","assets/chunk-5ZQYHXKU-Bp_AxmEO.js","assets/dist-n8f5Nru3.js","assets/chunk-CSCIHK7Q-DS7OYMpE.js","assets/chunk-3OPIFGDE-CYW3PmGJ.js","assets/chunk-L5ZTLDWV-CEr25ZIT.js","assets/chunk-NZK2D7GU-CfVZsGbm.js","assets/rough.esm-KjoEK0it.js","assets/chunk-BSJP7CBP-CYUMou17.js","assets/chunk-KSCS5N6A-D5rkyCF7.js","assets/line-Dtxf-KyL.js","assets/path-BJQEcSo7.js","assets/array-yLZkcI6Y.js","assets/chunk-LZXEDZCA-CNJjDw75.js","assets/chunk-WU5MYG2G-CRiYrFdQ.js","assets/chunk-XPW4576I-DY8o_fSd.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],B=-1;function V(e){return{current:e}}function H(e){0>B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var ee=V(null),te=V(null),ne=V(null),re=V(null);function ie(e,t){switch(U(ne,t),U(te,e),U(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(ee),U(ee,e)}function ae(){H(ee),H(te),H(ne)}function oe(e){e.memoizedState!==null&&U(re,e);var t=ee.current,n=Yd(t,e.type);t!==n&&(U(te,e),U(ee,n))}function se(e){te.current===e&&(H(ee),H(te)),re.current===e&&(H(re),ap._currentValue=R)}var ce,le;function ue(e){if(ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ce=t&&t[1]||``,le=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+ce+e+le}var de=!1;function fe(e,t){if(!e||de)return``;de=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -255,7 +255,7 @@ html body {
255
255
  ${t}-collapse,
256
256
  ${t}-edit,
257
257
  ${t}-copy
258
- `]:{...Qa(e),marginInlineStart:e.marginXXS},...dA(e),...fA(e),...pA(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),hA=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=v.createElement(oA,null)}=e,m=v.useRef(null),h=v.useRef(!1),g=v.useRef(null),[_,y]=v.useState(c);v.useEffect(()=>{y(c)},[c]),v.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let b=({target:e})=>{y(e.value.replace(/[\n\r]/g,``))},x=()=>{h.current=!0},S=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===K.ENTER?(w(),d?.()):e===K.ESC&&u())},E=()=>{w()},[D,O]=mA(t),k=W(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return v.createElement(`div`,{className:k,style:i},v.createElement(ND,{ref:m,maxLength:o,value:_,onChange:b,onKeyDown:C,onKeyUp:T,onCompositionStart:x,onCompositionEnd:S,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:du(p,{className:`${t}-edit-content-confirm`}))},gA=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},_A=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function vA(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await _A(e,n)||gA(e,n))}var yA=({copyConfig:e,children:t})=>{let[n,r]=v.useState(!1),[i,a]=v.useState(!1),o=v.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),v.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:y(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await vA((typeof e.text==`function`?await e.text():e.text)||XO(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function bA(e,t){return v.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var xA=e=>{let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e}),t.current},SA=(e,t,n)=>(0,v.useMemo)(()=>e===!0?{title:t??n}:(0,v.isValidElement)(e)?{title:e}:fc(e)?{title:t??n,...e}:{title:e},[e,t,n]),CA=v.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=nt(`typography`),m=s??d,h=u(`typography`,n),[g,_]=mA(h),y=W(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),b={...p,...c};return v.createElement(r,{className:y,style:b,ref:t,...l},o)}),wA={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`};function TA(){return TA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TA.apply(this,arguments)}var EA=v.forwardRef((e,t)=>v.createElement(Do,TA({},e,{ref:t,icon:wA}))),DA=e=>e===!1?[!1,!1]:XO(e);function OA(e,t,n){return e===!0||e===void 0?t:e||n&&t}function kA(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var AA=e=>[`string`,`number`].includes(typeof e),jA=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=DA(a),d=DA(o),{copied:f,copy:p}=r??{},m=n?f:p,h=OA(u[+!!n],m),g=typeof h==`string`?h:m;return v.createElement(Sx,{title:h},v.createElement(`button`,{type:`button`,className:W(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?OA(d[1],v.createElement(Db,null),!0):OA(d[0],l?v.createElement(ed,null):v.createElement(EA,null),!0)))},MA=v.forwardRef(({style:e,children:t},n)=>{let r=v.useRef(null);return v.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),v.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),NA=e=>e.reduce((e,t)=>e+(AA(t)?String(t).length:1),0);function PA(e,t){let n=0,r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;let a=e[i],o=AA(a)?String(a).length:1,s=n+o;if(s>t){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var FA=0,IA=1,LA=2,RA=3,zA=4,BA={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function VA(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=v.useMemo(()=>ge(r),[r]),u=v.useMemo(()=>NA(l),[r]),d=v.useMemo(()=>i(l,!1),[r]),[f,p]=v.useState(null),m=v.useRef(null),h=v.useRef(null),g=v.useRef(null),_=v.useRef(null),y=v.useRef(null),[b,x]=v.useState(!1),[C,w]=v.useState(FA),[T,E]=v.useState(0),[D,O]=v.useState(null);S(()=>{w(t&&n&&u?IA:FA)},[n,r,a,t,l]),S(()=>{if(C===IA)w(LA),O(h.current&&getComputedStyle(h.current).whiteSpace);else if(C===LA){let e=!!g.current?.isExceed();w(e?RA:zA),p(e?[0,u]:null),x(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=y.current?.getHeight()||0;E(Math.max(t,n+r)+1),c(e)}},[C]);let k=f?Math.ceil((f[0]+f[1])/2):0;S(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>T,r=k;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,k]);let A=v.useMemo(()=>{if(!t)return i(l,!1);if(C!==RA||!f||f[0]!==f[1]){let e=i(l,!1);return[zA,FA].includes(C)?e:v.createElement(`span`,{style:{...BA,WebkitLineClamp:a}},e)}return i(o?l:PA(l,f[0]),b)},[o,C,f,l].concat(We(s))),j={width:n,margin:0,padding:0,whiteSpace:D===`nowrap`?`normal`:`inherit`};return v.createElement(v.Fragment,null,A,C===LA&&v.createElement(v.Fragment,null,v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:a},ref:g},d),v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:a-1},ref:_},d),v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:1},ref:y},i([],!0))),C===RA&&f&&f[0]!==f[1]&&v.createElement(MA,{style:{...j,top:400},ref:m},i(PA(l,k),!0)),C===IA&&v.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var HA=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return v.createElement(Sx,{open:a,...i},r)};function UA({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=v.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var WA=`...`,GA=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],KA=v.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=v.useContext($e),[y]=ac(`Text`),b=v.useRef(null),x=v.useRef(null),C=g(`typography`,n),w=he(h,GA),[E,D]=bA(l),[O,k]=T(!1,D.editing),{triggerType:A=[`icon`]}=D,j=e=>{e&&D.onStart?.(),k(e)},M=xA(O);S(()=>{!O&&M&&x.current?.focus()},[O]);let N=e=>{e?.preventDefault(),j(!0)},P=e=>{D.onChange?.(e),j(!1)},F=()=>{D.onCancel?.(),j(!1)},[L,R]=bA(u),{copied:z,copyLoading:B,onClick:V}=yA({copyConfig:R,children:s}),[H,U]=v.useState(!1),[ee,te]=v.useState(!1),[ne,re]=v.useState(!1),[ie,ae]=v.useState(!1),[oe,se]=v.useState(!0),[ce,le]=bA(c,{expandable:!1,symbol:e=>e?y?.collapse:y?.expand}),[ue,de]=T(le.defaultExpanded||!1,le.expanded),fe=ce&&(!ue||le.expandable===`collapsible`),{rows:pe=1}=le,me=v.useMemo(()=>fe&&(le.suffix!==void 0||le.onEllipsis||le.expandable||E||L),[fe,le,E,L]);S(()=>{ce&&!me&&(U(Xh(`webkitLineClamp`)),te(Xh(`textOverflow`)))},[me,ce]);let[_e,ve]=v.useState(fe),ye=v.useMemo(()=>me?!1:pe===1?ee:H,[me,ee,H]);S(()=>{ve(ye&&fe)},[ye,fe]);let be=SA(le.tooltip,D.text,s),xe=_e&&!!be.title,Se=fe&&(_e?xe&&ie:ne),Ce=fe&&pe===1&&_e,we=fe&&pe>1&&_e,Te=(e,t)=>{de(t.expanded),le.onExpand?.(e,t)},[Ee,De]=v.useState(0),[Oe,ke]=v.useState(!1),[Ae,je]=v.useState(!1),Me=({offsetWidth:e})=>{De(e)},Ne=e=>{re(e),ne!==e&&le.onEllipsis?.(e)};v.useEffect(()=>{let e=b.current;if(ce&&xe&&e){let t=kA(e);ie!==t&&ae(t)}},[ce,xe,s,we,oe,Ee]),v.useEffect(()=>{let e=b.current;if(typeof IntersectionObserver>`u`||!e||!xe||!fe)return;let t=new IntersectionObserver(()=>{se(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[xe,fe]);let Pe=v.useMemo(()=>{if(!(!ce||_e))return[D.text,s,f,be.title].find(AA)},[ce,_e,f,be.title,Se]);if(O)return v.createElement(hA,{value:D.text??(typeof s==`string`?s:``),onSave:P,onCancel:F,onEnd:D.onEnd,prefixCls:C,className:r,style:i,direction:_,component:d,maxLength:D.maxLength,autoSize:D.autoSize,enterIcon:D.enterIcon});let Fe=()=>{let{expandable:e,symbol:t}=le;return e?v.createElement(`button`,{type:`button`,key:`expand`,className:`${C}-${ue?`collapse`:`expand`}`,onClick:e=>Te(e,{expanded:!ue}),"aria-label":ue?y.collapse:y?.expand},typeof t==`function`?t(ue):t):null},Ie=()=>{if(!E)return;let{icon:e,tooltip:t,tabIndex:n}=D,r=ge(t)[0]||y?.edit,i=typeof r==`string`?r:``;return A.includes(`icon`)?v.createElement(Sx,{key:`edit`,title:t===!1?``:r},v.createElement(`button`,{type:`button`,ref:x,className:`${C}-edit`,onClick:N,"aria-label":i,tabIndex:n},e||v.createElement(rA,{role:`button`}))):null},Re=()=>L?v.createElement(jA,{key:`copy`,...R,prefixCls:C,copied:z,locale:y,onCopy:V,loading:B,iconOnly:!lc(s)}):null,ze=e=>{let t=e&&Fe(),n=Ie(),r=Re();return!t&&!n&&!r?null:v.createElement(`span`,{key:`operations`,className:`${C}-actions`,onMouseEnter:()=>ke(!0),onMouseLeave:()=>ke(!1)},t,n,r)},Be=e=>[e&&!ue&&v.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},WA),le.suffix,ze(e)];return v.createElement(Le,{onResize:Me,disabled:!fe},c=>v.createElement(HA,{tooltipProps:be,enableEllipsis:fe,isEllipsis:Se,open:Ae&&!Oe},v.createElement(CA,{onMouseEnter:e=>{je(!0),p?.(e)},onMouseLeave:e=>{je(!1),m?.(e)},className:W({[`${C}-${a}`]:a,[`${C}-disabled`]:o,[`${C}-ellipsis`]:ce,[`${C}-ellipsis-single-line`]:Ce,[`${C}-ellipsis-multiple-line`]:we,[`${C}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:we?pe:void 0},component:d,ref:I(c,b,t),direction:_,onClick:A.includes(`text`)?N:void 0,"aria-label":Pe?.toString(),title:f,...w},v.createElement(VA,{enableMeasure:fe&&!_e,text:s,rows:pe,width:Ee,onEllipsis:Ne,expanded:ue,miscDeps:[z,ue,B,E,L,y].concat(We(GA.map(t=>e[t])))},(t,n)=>UA(e,v.createElement(v.Fragment,null,t.length>0&&n&&!ue&&Pe?v.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Be(n)))))))}),qA=v.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return v.createElement(KA,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),JA=v.forwardRef((e,t)=>{let{children:n,...r}=e;return v.createElement(KA,{ref:t,...r,component:`div`},n)}),YA=v.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=v.useMemo(()=>fc(n)?he(n,[`expandable`,`rows`]):n,[n]);return v.createElement(KA,{ref:t,...i,ellipsis:a,component:`span`},r)}),XA=[1,2,3,4,5],ZA=v.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=XA.includes(n)?`h${n}`:`h1`;return v.createElement(KA,{ref:t,...i,component:a},r)}),QA=CA;QA.Text=YA,QA.Link=qA,QA.Title=ZA,QA.Paragraph=JA;var $A={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z`}}]},name:`apartment`,theme:`outlined`};function ej(){return ej=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ej.apply(this,arguments)}var tj=v.forwardRef((e,t)=>v.createElement(Do,ej({},e,{ref:t,icon:$A}))),nj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z`}}]},name:`arrows-alt`,theme:`outlined`};function rj(){return rj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rj.apply(this,arguments)}var ij=v.forwardRef((e,t)=>v.createElement(Do,rj({},e,{ref:t,icon:nj}))),aj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`};function oj(){return oj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oj.apply(this,arguments)}var sj=v.forwardRef((e,t)=>v.createElement(Do,oj({},e,{ref:t,icon:aj}))),cj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M640.6 429.8h257.1c7.9 0 14.3-6.4 14.3-14.3V158.3c0-7.9-6.4-14.3-14.3-14.3H640.6c-7.9 0-14.3 6.4-14.3 14.3v92.9H490.6c-3.9 0-7.1 3.2-7.1 7.1v221.5h-85.7v-96.5c0-7.9-6.4-14.3-14.3-14.3H126.3c-7.9 0-14.3 6.4-14.3 14.3v257.2c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3V544h85.7v221.5c0 3.9 3.2 7.1 7.1 7.1h135.7v92.9c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3v-257c0-7.9-6.4-14.3-14.3-14.3h-257c-7.9 0-14.3 6.4-14.3 14.3v100h-78.6v-393h78.6v100c0 7.9 6.4 14.3 14.3 14.3zm53.5-217.9h150V362h-150V211.9zM329.9 587h-150V437h150v150zm364.2 75.1h150v150.1h-150V662.1z`}}]},name:`partition`,theme:`outlined`};function lj(){return lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lj.apply(this,arguments)}var uj=v.forwardRef((e,t)=>v.createElement(Do,lj({},e,{ref:t,icon:cj}))),dj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z`}}]},name:`redo`,theme:`outlined`};function fj(){return fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fj.apply(this,arguments)}var pj=v.forwardRef((e,t)=>v.createElement(Do,fj({},e,{ref:t,icon:dj}))),mj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z`}}]},name:`shrink`,theme:`outlined`};function hj(){return hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hj.apply(this,arguments)}var gj=v.forwardRef((e,t)=>v.createElement(Do,hj({},e,{ref:t,icon:mj}))),_j={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`unordered-list`,theme:`outlined`};function vj(){return vj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vj.apply(this,arguments)}var yj=v.forwardRef((e,t)=>v.createElement(Do,vj({},e,{ref:t,icon:_j}))),bj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z`}}]},name:`vertical-align-bottom`,theme:`outlined`};function xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}var Sj=v.forwardRef((e,t)=>v.createElement(Do,xj({},e,{ref:t,icon:bj}))),Cj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zm-353.6-74.7c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zm11.4 225.4a7.14 7.14 0 00-11.3 0L405.6 752.3a7.23 7.23 0 005.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z`}}]},name:`vertical-align-middle`,theme:`outlined`};function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wj.apply(this,arguments)}var Tj=v.forwardRef((e,t)=>v.createElement(Do,wj({},e,{ref:t,icon:Cj})));async function Ej(){return await(await fetch(`/api/review-state`)).json()}async function Dj(e,t){await fetch(`/api/threads`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e.filePath,anchor:e,body:t})})}async function Oj(e,t){let n=await fetch(`/api/threads/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({status:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`更新评论状态失败`}));throw Error(e.error??`更新评论状态失败`)}}async function kj(e){await fetch(`/api/threads/${e}`,{method:`DELETE`})}async function Aj(e,t){await fetch(`/api/threads/${e}/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,author:`user`})})}async function jj(e,t,n){if(!t)throw Error(`Comment id is required`);let r=await fetch(`/api/threads/${e}/comments/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`编辑评论失败`}));throw Error(e.error??`编辑评论失败`)}}async function Mj(e){return await(await fetch(`/api/prompt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json()}var Nj=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),q=o(((e,t)=>{t.exports=Nj()}))(),Pj=v.createContext(null),Fj=v.createContext(null);function Ij({refreshReviewState:e,onPromptCopied:t}){let n=v.useCallback(async(t,n)=>{await Dj(t,n),await e()},[e]),r=v.useCallback(async(t,n)=>{await Oj(t,n),await e()},[e]),i=v.useCallback(async t=>{await kj(t),await e()},[e]),a=v.useCallback(async(t,n)=>{await Aj(t,n),await e()},[e]),o=v.useCallback(async(t,n,r)=>{await jj(t,n,r),await e()},[e]),s=v.useCallback(async e=>{let n=await Mj(e);await navigator.clipboard.writeText(n.prompt),t()},[t]);return v.useMemo(()=>({createThread:n,patchThread:r,deleteThread:i,replyThread:a,patchComment:o,copyPrompt:s}),[s,n,i,o,r,a])}function Lj({files:e,threads:t,setSelectedPath:n,setLocateTarget:r,setFocusedThreadId:i}){let a=v.useCallback(a=>{let o=t.find(e=>e.id===a);o&&(e.some(e=>e.path===o.filePath)&&n(o.filePath),r({threadId:a,anchor:o.anchor})),i(a)},[e,i,r,n,t]);return v.useMemo(()=>({locateThread:a}),[a])}function Rj({value:e,children:t}){return(0,q.jsx)(Pj.Provider,{value:e,children:t})}function zj({value:e,children:t}){return(0,q.jsx)(Fj.Provider,{value:e,children:t})}function Bj(){let e=v.useContext(Pj);if(!e)throw Error(`useReviewActions must be used within ReviewActionsProvider`);return e}function Vj(){let e=v.useContext(Fj);if(!e)throw Error(`useReviewNavigationActions must be used within ReviewNavigationActionsProvider`);return e}async function Hj(e){return await(await fetch(`/api/markdown-preview?path=${encodeURIComponent(e)}`)).json()}async function Uj(e,t){let n=await fetch(`/api/diff-file-contents?path=${encodeURIComponent(e)}`,{signal:t});return n.ok?await n.json():null}function Wj(e){let t=e.split(`/`).filter(e=>e.length>0&&e!==`.`),n=[];for(let e of t){if(e===`..`){n.pop();continue}n.push(e)}return n}function Gj(e,t){if(!t||/^https?:|^mailto:|^#/i.test(t)||t.startsWith(`/`))return t;let n=t.split(`#`)[0]?.split(`?`)[0]??t,r=Wj(e);r.pop();let i=Wj(n),a=[...r,...i].join(`/`);return a?`/api/markdown-asset?path=${encodeURIComponent(a)}`:t}function Kj(e){let[t,n]=v.useState(null);return v.useEffect(()=>{let t=new AbortController,r=!1;n(null);async function i(){try{let i=await Uj(e,t.signal);r||n(i)}catch{r||n(null)}}return i(),()=>{r=!0,t.abort()}},[e]),t}function qj(e){return e.anchor.type===`file`?0:e.anchor.lineNumber}function Jj(e,t){return t.filter(t=>t.filePath===e&&t.status!==`resolved`).sort((e,t)=>qj(e)-qj(t)||e.createdAt.localeCompare(t.createdAt))[0]}function Yj(e){return e.status===`deleted`?`old`:`new`}function Xj(e,t){return Zj(e.anchor,t)}function Zj(e,t){return e.type===`diff-line`?{side:e.side,lineNumber:e.lineNumber}:e.type===`markdown-line`?{side:Yj(t),lineNumber:e.lineNumber}:null}function Qj(e,t){let n=Xj(e,t);return n?`${n.side}:${n.lineNumber}`:null}function $j(e,t){return t===`old`?e.oldLines>0?e.oldStart+e.oldLines-1:e.oldStart-1:e.newLines>0?e.newStart+e.newLines-1:e.newStart-1}function eM(e,t){if(!t||e.hunks.length===0)return[];let n=[],r=0,i=0;e.hunks.forEach((t,a)=>{let o=Math.max(0,t.oldStart-r-1),s=Math.max(0,t.newStart-i-1),c=e.status===`added`?`new`:e.status===`deleted`?`old`:`both`,l=c===`old`?o:c===`new`?s:Math.max(o,s);l>0&&n.push({key:`${e.path}-gap-${a}`,mode:c,hiddenCount:l,oldStart:r+1,oldEnd:t.oldStart-1,newStart:i+1,newEnd:t.newStart-1,direction:`up`,position:a}),r=$j(t,`old`),i=$j(t,`new`)});let a=Math.max(0,t.oldTotalLines-r),o=Math.max(0,t.newTotalLines-i),s=e.status===`added`?`new`:e.status===`deleted`?`old`:`both`,c=s===`old`?a:s===`new`?o:Math.max(a,o);return c>0&&n.push({key:`${e.path}-gap-tail`,mode:s,hiddenCount:c,oldStart:r+1,oldEnd:t.oldTotalLines,newStart:i+1,newEnd:t.newTotalLines,direction:`down`,position:`tail`}),n}function tM(e,t,n){if(!e||n<=0)return[];let r=[],i=t.oldStart>0?t.oldStart:1,a=t.oldEnd>0?t.oldEnd:0,o=t.newStart>0?t.newStart:1,s=t.newEnd>0?t.newEnd:0,c=t.direction,l=c===`down`?i:Math.max(i,a-n+1),u=c===`down`?o:Math.max(o,s-n+1);for(let i=0;i<n;i+=1){let n=t.mode===`new`?void 0:l+i,a=t.mode===`old`?void 0:u+i,o=t.mode===`old`?e.oldLines[n?n-1:0]??``:t.mode===`new`?e.newLines[a?a-1:0]??``:e.oldLines[n?n-1:0]??e.newLines[a?a-1:0]??``;r.push({key:`${t.key}-${i}`,line:{type:`context`,content:o,oldLineNumber:n,newLineNumber:a}})}return r}function nM(e,t){let n=[];e.hunks.forEach((e,r)=>{let i=t.get(r);i&&n.push({type:`gap`,key:i.key,gap:i,nextHunk:e,nextIndex:r}),n.push({type:`hunk`,key:`${e.header}-${r}`,hunk:e,index:r})});let r=t.get(`tail`);return r&&n.push({type:`gap`,key:r.key,gap:r}),n}function rM(e){e.scrollTop=0}function iM(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();e.scrollTop+=r.top-n.top}function aM(e){return e===`add`?`+`:e===`remove`?`-`:``}function oM(e){let t=[],n=0;for(;n<e.lines.length;){let r=e.lines[n];if(r.type===`context`){t.push({key:`${e.header}-context-${n}`,oldCell:{lineNumber:r.oldLineNumber,content:r.content,type:`context`,side:`old`},newCell:{lineNumber:r.newLineNumber,content:r.content,type:`context`,side:`new`}}),n+=1;continue}if(r.type===`remove`){let r=[],i=[];for(;n<e.lines.length&&e.lines[n].type===`remove`;)r.push(e.lines[n]),n+=1;for(;n<e.lines.length&&e.lines[n].type===`add`;)i.push(e.lines[n]),n+=1;let a=Math.max(r.length,i.length);for(let o=0;o<a;o+=1){let a=r[o],s=i[o];t.push({key:`${e.header}-change-${n}-${o}`,oldCell:a?{lineNumber:a.oldLineNumber,content:a.content,type:`remove`,side:`old`}:{content:``,type:`empty`,side:`old`},newCell:s?{lineNumber:s.newLineNumber,content:s.content,type:`add`,side:`new`}:{content:``,type:`empty`,side:`new`}})}continue}t.push({key:`${e.header}-add-${n}`,oldCell:{content:``,type:`empty`,side:`old`},newCell:{lineNumber:r.newLineNumber,content:r.content,type:`add`,side:`new`}}),n+=1}return t}function sM(e,t,n){return e.find(e=>{if(e.mode===`new`&&t===`old`||e.mode===`old`&&t===`new`)return!1;let r=t===`old`?e.oldStart:e.newStart,i=t===`old`?e.oldEnd:e.newEnd;return n>=r&&n<=i})??null}function cM({file:e,filePath:t,viewMode:n,threads:r,fileContents:i,gapDescriptors:a,expandedGapLines:o,setExpandedGapLines:s,scrollRef:c,autoScrollKeyRef:l}){v.useLayoutEffect(()=>{let o=c.current;if(!o)return;let u=`${t}:${n}`;if(l.current===u)return;let d=Jj(t,r);if(!d||d.anchor.type===`file`){rM(o),l.current=u;return}let f=Qj(d,e),p=f?o.querySelector(`[data-review-anchor="${CSS.escape(f)}"]`):null;if(!p){if(!i)return;let t=Xj(d,e);if(t){let{side:e,lineNumber:n}=t,r=sM(a,e,n);if(r){s(e=>({...e,[r.key]:r.hiddenCount}));return}}rM(o),l.current=u;return}iM(o,p),l.current=u},[l,o,e,i,t,a,c,s,r,n])}function lM({file:e,filePath:t,locateTarget:n,viewMode:r,fileContents:i,gapDescriptors:a,expandedGapLines:o,setExpandedGapLines:s,scrollRef:c}){v.useLayoutEffect(()=>{let r=c.current;if(!r||!n||n.anchor.filePath!==t)return;if(n.anchor.type===`file`){rM(r);return}let o=Zj(n.anchor,e);if(!o)return;let{side:l,lineNumber:u}=o,d=r.querySelector(`[data-review-anchor="${CSS.escape(`${l}:${u}`)}"]`);if(d){iM(r,d);return}if(!i)return;let f=sM(a,l,u);if(f){s(e=>({...e,[f.key]:f.hiddenCount}));return}let p=[...r.querySelectorAll(`[data-review-anchor]`)].map(e=>{let[t,n]=(e.dataset.reviewAnchor??``).split(`:`),r=Number(n);return t!==`old`&&t!==`new`||!Number.isFinite(r)?null:{node:e,side:t,lineNumber:r}}).filter(e=>!!e).filter(e=>e.side===l).sort((e,t)=>Math.abs(e.lineNumber-u)-Math.abs(t.lineNumber-u));p[0]?iM(r,p[0].node):rM(r)},[o,e,i,t,a,n,c,s,r])}var uM={composer:`_composer_hhgmh_1`};function dM({style:e,placeholder:t,onSubmit:n,submitLabel:r=`添加评论`,onCancel:i}){let[a,o]=v.useState(``),[s,c]=v.useState(!1);return(0,q.jsxs)(`form`,{className:uM.composer,style:e,onSubmit:e=>{e.preventDefault(),a.trim()&&(c(!0),n(a.trim()).then(()=>o(``)).finally(()=>c(!1)))},children:[(0,q.jsx)(PD.TextArea,{placeholder:t,value:a,onChange:e=>o(e.target.value),autoSize:{minRows:3,maxRows:8}}),(0,q.jsxs)($E,{gap:`small`,justify:`end`,children:[(0,q.jsx)(XC,{htmlType:`submit`,loading:s,type:`primary`,size:`small`,children:r}),i?(0,q.jsx)(XC,{onClick:i,size:`small`,children:`取消`}):null]})]})}var fM={popover:`_popover_j0rpl_1`};function pM({onCancel:e,onSubmit:t}){return(0,q.jsx)(`div`,{className:fM.popover,children:(0,q.jsx)(dM,{placeholder:`请输入行内评论...`,submitLabel:`评论`,onSubmit:t,onCancel:e})})}var mM={submit:`待提交`,replied:`已回复`,resolved:`已解决`};function hM(e,t){return e.filePath===t.path&&e.fileSnapshotHash===t.snapshotHash}function gM(e){return e.status===`resolved`?`resolved`:_M(e)}function _M(e){return e.comments.some(e=>e.author===`agent`)?`replied`:`submit`}function vM(e){return e.length>0&&e.every(e=>gM(e)===`resolved`)?`resolved`:e.some(e=>_M(e)===`replied`)?`replied`:`submit`}var yM={inlineThread:`_inlineThread_1qms3_1`,inlineThreadFileLevel:`_inlineThreadFileLevel_1qms3_8`,inlineThreadHeader:`_inlineThreadHeader_1qms3_8`,inlineThreadBody:`_inlineThreadBody_1qms3_11`,inlineThreadActions:`_inlineThreadActions_1qms3_15`,inlineThreadBorderless:`_inlineThreadBorderless_1qms3_18`,inlineThreadSubmit:`_inlineThreadSubmit_1qms3_30`,inlineThreadReplied:`_inlineThreadReplied_1qms3_35`,inlineThreadResolved:`_inlineThreadResolved_1qms3_40`,inlineThreadSection:`_inlineThreadSection_1qms3_52`,threadTag:`_threadTag_1qms3_58`,threadTagResolved:`_threadTagResolved_1qms3_67`,threadTagSubmit:`_threadTagSubmit_1qms3_72`,threadTagReplied:`_threadTagReplied_1qms3_77`,inlineThreadAgentLabel:`_inlineThreadAgentLabel_1qms3_82`,inlineThreadCommentItem:`_inlineThreadCommentItem_1qms3_89`,inlineThreadCommentItemAgent:`_inlineThreadCommentItemAgent_1qms3_97`,inlineThreadCommentActions:`_inlineThreadCommentActions_1qms3_105`,threadIconBtn:`_threadIconBtn_1qms3_111`,commentRow:`_commentRow_1qms3_118`,commentContent:`_commentContent_1qms3_124`,inlineThreadComposer:`_inlineThreadComposer_1qms3_135`,inlineThreadEdit:`_inlineThreadEdit_1qms3_138`,inlineThreadEditActions:`_inlineThreadEditActions_1qms3_144`,threadActionBtn:`_threadActionBtn_1qms3_157`};function bM(e){return e===`submit`?yM.inlineThreadSubmit:e===`replied`?yM.inlineThreadReplied:yM.inlineThreadResolved}function xM(e){return e===`submit`?yM.threadTagSubmit:e===`replied`?yM.threadTagReplied:yM.threadTagResolved}function SM(e){return e.find(e=>gM(e)===`replied`)??e.find(e=>gM(e)===`submit`)??e[0]}function CM(e,t){return e===`submit`?!0:e===`replied`&&t===`user`}function wM({threads:e,onFocus:t,onPatch:n,onDeleteThread:r,onReply:i,onPatchComment:a,onCopy:o,showStatusTag:s=!0,variant:c=`default`}){let l=Bj(),u=Vj(),d=t??u.locateThread,f=n??l.patchThread,p=r??l.deleteThread,m=i??l.replyThread,h=a??l.patchComment,g=o??l.copyPrompt,[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(``),w=e[0],T=vM(e),E=SM(e),D=E?gM(E):T,O=D===`resolved`,k=E?.comments.at(-1),A=CM(D,k?.author);if(!w)return null;let j=c===`fileLevel`?yM.inlineThreadFileLevel:c===`borderless`?yM.inlineThreadBorderless:``;return(0,q.jsxs)(`div`,{className:[yM.inlineThread,bM(T),j].filter(Boolean).join(` `),onClick:()=>d(w.id),children:[(0,q.jsx)(`div`,{className:yM.inlineThreadHeader,children:s&&T!==`replied`?(0,q.jsx)(Zk,{className:`${yM.threadTag} ${xM(T)}`,children:mM[T]}):null}),e.map(e=>{let t=gM(e);return(0,q.jsx)(`div`,{className:yM.inlineThreadSection,onClick:t=>{t.stopPropagation(),d(e.id)},children:e.comments.map(n=>{let r=n.author===`agent`,i=T===`submit`&&t===`submit`&&!r;return(0,q.jsx)(`div`,{className:`${yM.inlineThreadCommentItem} ${r?yM.inlineThreadCommentItemAgent:``}`,children:(0,q.jsxs)(`div`,{className:yM.commentRow,children:[(0,q.jsxs)(`div`,{className:yM.commentContent,children:[r?(0,q.jsx)(QA.Text,{className:yM.inlineThreadAgentLabel,strong:!0,children:`Agent`}):null,b===n.id?(0,q.jsxs)(`div`,{className:yM.inlineThreadEdit,children:[(0,q.jsx)(PD.TextArea,{value:S,autoSize:{minRows:3,maxRows:8},onClick:e=>e.stopPropagation(),onChange:e=>C(e.target.value)}),(0,q.jsxs)(`div`,{className:yM.inlineThreadEditActions,children:[(0,q.jsx)(XC,{size:`small`,onClick:e=>{e.stopPropagation(),x(null),C(``)},children:`取消`}),(0,q.jsx)(XC,{size:`small`,type:`primary`,onClick:async t=>{t.stopPropagation(),await h(e.id,n.id,S),x(null),C(``)},children:`保存`})]})]}):(0,q.jsx)(QA.Paragraph,{className:yM.inlineThreadBody,children:n.body})]}),i&&b!==n.id?(0,q.jsx)(`div`,{className:yM.inlineThreadCommentActions,children:(0,q.jsx)(XC,{className:yM.threadIconBtn,type:`text`,icon:(0,q.jsx)(rA,{}),onClick:e=>{e.stopPropagation(),x(n.id),C(n.body)}})}):null]})},n.id)})},e.id)}),E&&_===E.id?(0,q.jsx)(`div`,{className:yM.inlineThreadComposer,children:(0,q.jsx)(dM,{placeholder:`继续评论...`,submitLabel:`回复`,onCancel:()=>{y(null)},onSubmit:async e=>{await m(E.id,e),y(null)}})}):null,E?(0,q.jsxs)(`div`,{className:yM.inlineThreadActions,children:[A?(0,q.jsx)(XC,{type:`primary`,className:yM.threadActionBtn,icon:(0,q.jsx)(EA,{}),onClick:e=>{e.stopPropagation(),g({type:`thread`,threadId:E.id})},children:`复制`}):null,D===`replied`?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(pj,{}),onClick:e=>{e.stopPropagation(),y(E.id)},children:`要求再改`}):null,D===`replied`?null:(0,q.jsx)(_k,{title:e.length>1?`删除这组评论?`:`删除这条评论线程?`,okText:`删除`,cancelText:`取消`,onConfirm:async()=>{for(let t of e)await p(t.id)},children:(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(eA,{}),danger:!0,onClick:e=>e.stopPropagation(),children:`删除`})}),O?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(bk,{}),onClick:e=>{e.stopPropagation(),f(E.id,`submit`)},children:`重新打开`}):null,D===`replied`?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(Db,{}),onClick:e=>{e.stopPropagation(),f(E.id,`resolved`)},children:`确认完成`}):null]}):null]})}var TM={inlineThreadStack:`_inlineThreadStack_1qhr1_1`};function EM({threads:e}){return e.length===0?null:(0,q.jsx)(`div`,{className:TM.inlineThreadStack,children:(0,q.jsx)(wM,{threads:e})})}var DM={diffRow:`_diffRow_res6f_1`,add:`_add_res6f_8`,remove:`_remove_res6f_11`,lineNo:`_lineNo_res6f_14`,lineSign:`_lineSign_res6f_24`,signAdd:`_signAdd_res6f_34`,signRemove:`_signRemove_res6f_37`,codeLine:`_codeLine_res6f_40`,commentTrigger:`_commentTrigger_res6f_49`};function OM({filePath:e,line:t,index:n,hunkKey:r,preferredSide:i,activeLine:a,setActiveLine:o,threads:s}){let{createThread:c}=Bj(),l=i??(t.type===`remove`?`old`:`new`),u=l===`old`?t.oldLineNumber:t.newLineNumber,d=`${r}-${l}-${u}-${n}`,f=s.filter(t=>t.anchor.type===`diff-line`&&t.anchor.filePath===e&&t.anchor.side===l&&t.anchor.lineNumber===u);return(0,q.jsxs)(`div`,{className:t.type===`add`?`${DM.diffRow} ${DM.add}`:t.type===`remove`?`${DM.diffRow} ${DM.remove}`:DM.diffRow,"data-review-anchor":`${l}:${u}`,children:[(0,q.jsx)(`button`,{className:DM.lineNo,onClick:()=>t.oldLineNumber&&o(d),children:t.oldLineNumber??``}),(0,q.jsx)(`button`,{className:DM.lineNo,onClick:()=>t.newLineNumber&&o(d),children:t.newLineNumber??``}),(0,q.jsx)(`span`,{className:t.type===`add`?`${DM.lineSign} ${DM.signAdd}`:t.type===`remove`?`${DM.lineSign} ${DM.signRemove}`:DM.lineSign,children:aM(t.type)}),(0,q.jsx)(`pre`,{className:DM.codeLine,children:t.content||` `}),u&&f.length===0?(0,q.jsx)(`button`,{className:DM.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>o(d),children:(0,q.jsx)(sj,{})}):null,a===d&&u?(0,q.jsx)(pM,{onCancel:()=>o(null),onSubmit:async t=>{await c({type:`diff-line`,filePath:e,side:l,lineNumber:u},t),o(null)}}):null,(0,q.jsx)(EM,{threads:f})]})}var kM={splitCell:`_splitCell_1mqa3_1`,add:`_add_1mqa3_11`,remove:`_remove_1mqa3_14`,emptyCell:`_emptyCell_1mqa3_17`,lineNo:`_lineNo_1mqa3_20`,lineSign:`_lineSign_1mqa3_30`,signAdd:`_signAdd_1mqa3_40`,signRemove:`_signRemove_1mqa3_43`,codeLine:`_codeLine_1mqa3_46`,commentTrigger:`_commentTrigger_1mqa3_55`};function AM({cell:e,rowKey:t,filePath:n,fileStatus:r,activeLine:i,setActiveLine:a,threads:o}){let{createThread:s}=Bj(),c=e.lineNumber?o.filter(t=>{if(t.anchor.filePath!==n)return!1;let i=Xj(t,{status:r});return i?.side===e.side&&i.lineNumber===e.lineNumber}):[],l=`${t}-${e.side}-${e.lineNumber??`empty`}`;return(0,q.jsxs)(`div`,{className:e.type===`add`?`${kM.splitCell} ${kM.add}`:e.type===`remove`?`${kM.splitCell} ${kM.remove}`:e.type===`empty`?`${kM.splitCell} ${kM.emptyCell}`:kM.splitCell,"data-review-anchor":e.lineNumber?`${e.side}:${e.lineNumber}`:void 0,children:[(0,q.jsx)(`button`,{className:kM.lineNo,onClick:()=>e.lineNumber&&a(l),children:e.lineNumber??``}),(0,q.jsx)(`span`,{className:e.type===`add`?`${kM.lineSign} ${kM.signAdd}`:e.type===`remove`?`${kM.lineSign} ${kM.signRemove}`:kM.lineSign,children:aM(e.type)}),(0,q.jsx)(`pre`,{className:kM.codeLine,children:e.content||` `}),e.lineNumber&&c.length===0?(0,q.jsx)(`button`,{className:kM.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>a(l),children:(0,q.jsx)(sj,{})}):null,i===l&&e.lineNumber?(0,q.jsx)(pM,{onCancel:()=>a(null),onSubmit:async t=>{await s({type:`diff-line`,filePath:n,side:e.side,lineNumber:e.lineNumber},t),a(null)}}):null,(0,q.jsx)(EM,{threads:c})]})}var jM={splitRow:`_splitRow_w4xv1_1`,hunkHeader:`_hunkHeader_w4xv1_5`,hunkHeaderRail:`_hunkHeaderRail_w4xv1_11`,hunkHeaderExpand:`_hunkHeaderExpand_w4xv1_20`,hunkHeaderBody:`_hunkHeaderBody_w4xv1_43`,shell:`_shell_w4xv1_50`,sidebar:`_sidebar_w4xv1_72`,threadRail:`_threadRail_w4xv1_73`,reviewPane:`_reviewPane_w4xv1_87`,brand:`_brand_w4xv1_95`,brandMark:`_brandMark_w4xv1_101`,brandCopy:`_brandCopy_w4xv1_112`,repoName:`_repoName_w4xv1_117`,productName:`_productName_w4xv1_127`,sideCard:`_sideCard_w4xv1_131`,threadRailHeader:`_threadRailHeader_w4xv1_140`,topToolbar:`_topToolbar_w4xv1_141`,threadRailTitle:`_threadRailTitle_w4xv1_149`,viewModeSwitcher:`_viewModeSwitcher_w4xv1_158`,reviewSurface:`_reviewSurface_w4xv1_164`,threadRailBody:`_threadRailBody_w4xv1_175`,emptyStateCard:`_emptyStateCard_w4xv1_180`};function MM({headerText:e,position:t,previousGap:n,nextGap:r,getGapVisibleCount:i,getGapHiddenCount:a,onExpandGap:o,onExpandGapWithAnchor:s}){function c(){let e=n?i(n)<n.hiddenCount:!1,c=r?i(r)<r.hiddenCount:!1;if(t===`top`&&n&&e){let e=a(n),t=e<=20?`展开全部 ${e} 行隐藏上下文`:`向上展开 20 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:t=>{s(n,t.currentTarget.closest(`[data-hunk-header="true"]`),{direction:e<=20?void 0:`up`,expandAll:e<=20,alignHeaderToTop:!0})},"aria-label":t,children:(0,q.jsx)(Nx,{})})}if(t===`middle`&&n&&e){let e=a(n);if(e<=20){let t=`展开全部 ${e} 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`down`),"aria-label":t,children:(0,q.jsx)(Tj,{})})}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`down`),"aria-label":`向下展开 20 行隐藏上下文`,children:(0,q.jsx)(Sj,{})}),(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`up`),"aria-label":`向上展开 20 行隐藏上下文`,children:(0,q.jsx)(Nx,{})})]})}if(t===`bottom`&&r&&c){let e=a(r);if(e<=20){let t=`展开全部 ${e} 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:e=>{s(r,e.currentTarget.closest(`[data-hunk-header="true"]`),{expandAll:!0,alignHeaderToTop:!0})},"aria-label":t,children:(0,q.jsx)(Tj,{})})}return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:e=>{s(r,e.currentTarget.closest(`[data-hunk-header="true"]`),{direction:`up`,alignHeaderToTop:!0})},"aria-label":`向上展开 20 行隐藏上下文`,children:(0,q.jsx)(Nx,{})})}return null}return(0,q.jsxs)(`div`,{className:jM.hunkHeader,"data-hunk-header":`true`,children:[(0,q.jsx)(`div`,{className:jM.hunkHeaderRail,children:c()}),(0,q.jsx)(`div`,{className:jM.hunkHeaderBody,children:e})]})}function NM({gap:e,filePath:t,fileStatus:n,viewMode:r,fileContents:i,activeLine:a,setActiveLine:o,threads:s,getGapDirection:c,getGapVisibleCount:l,onExpandGap:u,onExpandGapAll:d,leadingHunkHeader:f}){let p=Math.min(l(e),e.hiddenCount);e.hiddenCount-p;let m=c(e),h=tM(i,{...e,direction:m},p);return(0,q.jsxs)(v.Fragment,{children:[f,r===`inline`?h.map(({key:n,line:r},i)=>(0,q.jsx)(OM,{filePath:t,line:r,index:i,hunkKey:n,preferredSide:e.mode===`old`?`old`:`new`,activeLine:a,setActiveLine:o,threads:s},`${n}-${i}`)):h.map(({key:e,line:r})=>(0,q.jsxs)(`div`,{className:jM.splitRow,children:[(0,q.jsx)(AM,{cell:r.oldLineNumber?{lineNumber:r.oldLineNumber,content:r.content,type:`context`,side:`old`}:{content:``,type:`empty`,side:`old`},rowKey:e,filePath:t,fileStatus:n,activeLine:a,setActiveLine:o,threads:s}),(0,q.jsx)(AM,{cell:r.newLineNumber?{lineNumber:r.newLineNumber,content:r.content,type:`context`,side:`new`}:{content:``,type:`empty`,side:`new`},rowKey:e,filePath:t,fileStatus:n,activeLine:a,setActiveLine:o,threads:s})]},e))]})}var PM={diffCard:`_diffCard_b316o_1`,hunk:`_hunk_b316o_7`,splitTable:`_splitTable_b316o_14`,splitRow:`_splitRow_b316o_17`};function FM(e,t){return Math.min(t[e.key]??0,e.hiddenCount)}function IM(e,t){return t[e.key]??e.direction}function LM({file:e,threads:t,locateTarget:n,expandAllRequest:r,onExpandedContextChange:i,viewMode:a}){let[o,s]=v.useState(null),[c,l]=v.useState({}),[u,d]=v.useState({}),f=Kj(e.path),p=v.useRef(null),m=v.useRef(``),h=v.useRef(``),g=v.useMemo(()=>eM(e,f),[e,f]),_=v.useMemo(()=>{let e=new Map;return g.forEach(t=>{e.set(t.position,t)}),e},[g]),y=v.useMemo(()=>nM(e,_),[e,_]),b=v.useMemo(()=>g.some(e=>Math.min(c[e.key]??0,e.hiddenCount)>0),[g,c]);v.useLayoutEffect(()=>{p.current&&rM(p.current),s(null),l({}),d({}),h.current=``},[e.path]),v.useEffect(()=>{if(!r||r.filePath!==e.path)return;let t=`${r.filePath}:${r.requestId}`;if(h.current!==t){if(h.current=t,b){l({}),d({});return}l(e=>{let t={...e};return g.forEach(e=>{t[e.key]=e.hiddenCount}),t})}},[r,e.path,g,b]),v.useEffect(()=>{i(e.path,b)},[e.path,b,i]),cM({file:e,filePath:e.path,viewMode:a,threads:t,fileContents:f,gapDescriptors:g,expandedGapLines:c,setExpandedGapLines:l,scrollRef:p,autoScrollKeyRef:m}),lM({file:e,filePath:e.path,locateTarget:n,viewMode:a,fileContents:f,gapDescriptors:g,expandedGapLines:c,setExpandedGapLines:l,scrollRef:p});function x(e,t,n){let r=p.current,i=n?.alignHeaderToTop??!1;n?.expandAll?C(e,n.direction):S(e,n?.direction),!(!i||!r||!t)&&window.requestAnimationFrame(()=>{let e=r.getBoundingClientRect().top,n=t.getBoundingClientRect().top;r.scrollTop+=n-e})}function S(e,t){t&&d(n=>({...n,[e.key]:t})),l(t=>{let n=Math.min(t[e.key]??0,e.hiddenCount),r=e.hiddenCount-n,i=Math.min(20,r||e.hiddenCount);return{...t,[e.key]:Math.min(e.hiddenCount,n+i)}})}function C(e,t){t&&d(n=>({...n,[e.key]:t})),l(t=>({...t,[e.key]:e.hiddenCount}))}function w(e){return Math.max(0,e.hiddenCount-FM(e,c))}function T(e){let t=_.get(e);return t?w(t)>0:!1}function E(e){let t=_.get(e);return t?FM(t,c)>0&&w(t)>0&&IM(t,u)===`up`:!1}function D(e,t){let n=_.get(t);if(!n)return e.header;let r=FM(n,c),i=w(n);return r<=0?`${e.header} · 已隐藏 ${i} 行上下文`:`${e.header} · 已展开 ${r}/${n.hiddenCount} 行上下文`}function O(t,n){let r=_.get(n),i=n===e.hunks.length-1?_.get(`tail`):_.get(n+1),a=n===0?`top`:`middle`;return(0,q.jsx)(MM,{headerText:D(t,n),position:a,previousGap:r,nextGap:i,getGapVisibleCount:e=>FM(e,c),getGapHiddenCount:w,onExpandGap:S,onExpandGapWithAnchor:x})}return(0,q.jsx)(`div`,{className:PM.diffCard,ref:p,children:y.map(n=>n.type===`gap`?(0,q.jsx)(NM,{gap:n.gap,filePath:e.path,fileStatus:e.status,viewMode:a,fileContents:f,activeLine:o,setActiveLine:s,threads:t,getGapDirection:e=>IM(e,u),getGapVisibleCount:e=>FM(e,c),onExpandGap:S,onExpandGapAll:C,leadingHunkHeader:n.nextHunk&&n.nextIndex!=null&&E(n.nextIndex)?O(n.nextHunk,n.nextIndex):null},n.key):(0,q.jsx)(`div`,{className:PM.hunk,children:(()=>{let r=T(n.index),i=E(n.index);return(0,q.jsxs)(q.Fragment,{children:[r&&!i?O(n.hunk,n.index):null,a===`inline`?n.hunk.lines.map((r,i)=>(0,q.jsx)(OM,{filePath:e.path,line:r,index:i,hunkKey:n.key,activeLine:o,setActiveLine:s,threads:t},`${n.key}-${i}`)):(0,q.jsx)(`div`,{className:PM.splitTable,children:oM(n.hunk).map(n=>(0,q.jsxs)(`div`,{className:PM.splitRow,children:[(0,q.jsx)(AM,{cell:n.oldCell,rowKey:n.key,filePath:e.path,fileStatus:e.status,activeLine:o,setActiveLine:s,threads:t}),(0,q.jsx)(AM,{cell:n.newCell,rowKey:n.key,filePath:e.path,fileStatus:e.status,activeLine:o,setActiveLine:s,threads:t})]},n.key))})]})})()},n.key))})}var RM=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),zM=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),BM=o(((e,t)=>{var n=zM(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),VM=o(((e,t)=>{var n=BM();t.exports=function(){return n.Date.now()}})),HM=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),UM=o(((e,t)=>{var n=HM(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),WM=o(((e,t)=>{t.exports=BM().Symbol})),GM=o(((e,t)=>{var n=WM(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),KM=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),qM=o(((e,t)=>{var n=WM(),r=GM(),i=KM(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),JM=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),YM=o(((e,t)=>{var n=qM(),r=JM(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),XM=o(((e,t)=>{var n=UM(),r=RM(),i=YM(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),ZM=l(o(((e,t)=>{var n=RM(),r=VM(),i=XM(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c}))(),1);function QM(e){return e.mode.kind===`revision`?`范围:${e.mode.base}..${e.mode.target}`:e.mode.kind===`staged`?`范围:暂存区`:e.mode.kind===`working`?`范围:工作区`:`范围:未知`}function $M(e){return e.anchor.type===`file`?e.filePath:e.anchor.type===`diff-line`?`${e.filePath}:${e.anchor.side}:${e.anchor.lineNumber}`:`${e.filePath}:${e.anchor.lineNumber}`}function eN(e){return e===`added`?`A`:e===`modified`?`M`:e===`deleted`?`D`:e===`renamed`?`R`:e}function tN(e,t,n){if(e.length<=t)return e;let r=Math.min(n,t-4),i=t-r-3;return`${e.slice(0,i)}...${e.slice(-r)}`}function nN(e){let t={name:``,path:``,isDirectory:!0,children:[]};e.forEach(e=>{let n=e.path.split(`/`).filter(Boolean),r=t;n.forEach((t,i)=>{let a=i===n.length-1,o=n.slice(0,i+1).join(`/`);r.children??=[];let s=r.children.find(e=>e.name===t);s||(s={name:t,path:o,isDirectory:!a,children:a?void 0:[],file:a?e:void 0},r.children.push(s)),r=s})});let n=e=>{if(!e.isDirectory||!e.children)return e;let t=e.children.map(n);if(e.name&&t.length===1&&t[0]?.isDirectory&&t[0].children){let n=t[0];return{...e,name:`${e.name}/${n.name}`,path:n.path,children:n.children}}return{...e,children:t}};return n(t)}function rN(e){return!e.isDirectory||!e.children?[]:[...e.path?[e.path]:[],...e.children.flatMap(e=>rN(e))]}function iN(e,t){return e.file?t.get(e.file.path)??0:e.children?.reduce((e,n)=>e+iN(n,t),0)??0}function aN(e,t){let n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)?e:null;if(e.path.toLowerCase().includes(n)||e.name.toLowerCase().includes(n))return e;let r=e.children?.map(e=>aN(e,n)).filter(e=>!!e);return r?.length?{...e,children:r}:null}var oN={fileRailHeader:`_fileRailHeader_1rouv_1`,fileRailModeSwitcher:`_fileRailModeSwitcher_1rouv_8`,fileSearch:`_fileSearch_1rouv_15`,fileSearchIcon:`_fileSearchIcon_1rouv_19`,fileList:`_fileList_1rouv_22`,fileItem:`_fileItem_1rouv_28`,fileItemActive:`_fileItemActive_1rouv_38`,lineItemActive:`_lineItemActive_1rouv_42`,fileTree:`_fileTree_1rouv_46`,fileTreeDirectory:`_fileTreeDirectory_1rouv_49`,fileTreeChevron:`_fileTreeChevron_1rouv_66`,fileTreeFolderIcon:`_fileTreeFolderIcon_1rouv_72`,fileIcon:`_fileIcon_1rouv_77`,fileStatusBadge:`_fileStatusBadge_1rouv_80`,fileStatusBadgeA:`_fileStatusBadgeA_1rouv_92`,fileStatusBadgeM:`_fileStatusBadgeM_1rouv_96`,fileStatusBadgeD:`_fileStatusBadgeD_1rouv_100`,fileStatusBadgeR:`_fileStatusBadgeR_1rouv_104`,fileTreeDirectoryName:`_fileTreeDirectoryName_1rouv_108`,fileMeta:`_fileMeta_1rouv_116`,fileName:`_fileName_1rouv_126`,fileStats:`_fileStats_1rouv_135`,fileStatAdd:`_fileStatAdd_1rouv_138`,fileStatDelete:`_fileStatDelete_1rouv_142`,fileThreadCount:`_fileThreadCount_1rouv_146`};function sN({files:e,threads:t,selectedPath:n,onSelectFile:r}){let[i,a]=v.useState(`list`),[o,s]=v.useState(``),[c,l]=v.useState(``),[u,d]=v.useState(()=>new Set),f=v.useMemo(()=>(0,ZM.default)(e=>l(e),200),[]),p=c.trim().toLowerCase(),m=p.length>0,h=v.useMemo(()=>nN(e),[e]),g=v.useMemo(()=>m?e.filter(e=>e.path.toLowerCase().includes(p)):e,[e,m,p]),_=v.useMemo(()=>m?aN(h,p):h,[h,m,p]),y=v.useMemo(()=>{let n=new Map;return e.forEach(e=>{n.set(e.path,t.filter(t=>hM(t,e)&&t.status!==`resolved`).length)}),n},[e,t]);v.useEffect(()=>{f(o)},[f,o]),v.useEffect(()=>()=>{f.cancel()},[f]),v.useEffect(()=>{m||d(new Set(rN(h)))},[h,m]),v.useEffect(()=>{!m||!_||d(new Set(rN(_)))},[m,_]);function b(e){d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function x(e){s(e.target.value)}function S(){f.cancel(),l(o)}function C(e,t=e.path,i=!1){let a=e.path===n,o=y.get(e.path)??0,s=[oN.fileItem,a&&i?oN.fileItemActive:``,a&&!i?oN.lineItemActive:``].filter(Boolean).join(` `);return(0,q.jsx)(YO.Item,{className:s,onClick:()=>r(e.path),children:(0,q.jsxs)(`div`,{className:oN.fileMeta,children:[i?(0,q.jsx)(Mk,{className:oN.fileIcon}):null,i?null:(0,q.jsx)(`span`,{className:`${oN.fileStatusBadge} ${oN[`fileStatusBadge${eN(e.status)}`]}`,children:eN(e.status)}),(0,q.jsx)(Sx,{title:i?void 0:e.path,children:(0,q.jsx)(QA.Text,{strong:!0,className:oN.fileName,title:e.path,children:i?t:tN(e.path,36,18)})}),(0,q.jsxs)(QA.Text,{className:oN.fileStats,type:`secondary`,children:[(0,q.jsxs)(`span`,{className:oN.fileStatAdd,children:[`+`,e.additions]}),` / `,(0,q.jsxs)(`span`,{className:oN.fileStatDelete,children:[`-`,e.deletions]})]}),o>0?(0,q.jsx)(Zk,{className:oN.fileThreadCount,icon:(0,q.jsx)(sj,{}),children:o}):null]})})}function w(e,t=0){if(e.file)return(0,q.jsx)(`div`,{style:{paddingLeft:t*18},children:C(e.file,e.name,!0)},e.file.path);if(!e.children?.length)return null;if(!e.path)return e.children.map(e=>w(e,t));let n=u.has(e.path),r=iN(e,y);return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`button`,{type:`button`,className:oN.fileTreeDirectory,style:{paddingLeft:t*18+8},onClick:()=>b(e.path),children:[n?(0,q.jsx)(Ab,{className:oN.fileTreeChevron}):(0,q.jsx)(Qf,{className:oN.fileTreeChevron}),n?(0,q.jsx)(Fk,{className:oN.fileTreeFolderIcon}):(0,q.jsx)(Rk,{className:oN.fileTreeFolderIcon}),(0,q.jsx)(QA.Text,{strong:!0,className:oN.fileTreeDirectoryName,title:e.path,children:e.name}),r>0?(0,q.jsx)(Zk,{className:oN.fileThreadCount,icon:(0,q.jsx)(sj,{}),children:r}):null]}),n?e.children.map(e=>w(e,t+1)):null]},e.path)}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:oN.fileRailHeader,children:[(0,q.jsx)(QA.Text,{strong:!0,children:`文件列表`}),(0,q.jsx)(fE,{className:oN.fileRailModeSwitcher,size:`small`,options:[{value:`list`,icon:(0,q.jsx)(yj,{})},{value:`tree`,icon:(0,q.jsx)(tj,{})}],value:i,onChange:e=>a(e)})]}),(0,q.jsx)(PD,{className:oN.fileSearch,placeholder:`搜索文件路径`,allowClear:!0,prefix:(0,q.jsx)(Nb,{className:oN.fileSearchIcon}),value:o,onChange:x,onPressEnter:S}),i===`list`?(0,q.jsx)(YO,{className:oN.fileList,dataSource:g,locale:{emptyText:(0,q.jsx)(cb,{image:cb.PRESENTED_IMAGE_SIMPLE,description:`没有匹配的文件`})},renderItem:e=>C(e)}):(0,q.jsx)(`div`,{className:`${oN.fileList} ${oN.fileTree}`,role:`tree`,children:_?w(_):(0,q.jsx)(cb,{image:cb.PRESENTED_IMAGE_SIMPLE,description:`没有匹配的文件`})})]})}var cN={fileHeader:`_fileHeader_yun72_1`,headerTop:`_headerTop_yun72_9`,filePathBlock:`_filePathBlock_yun72_15`,filePathText:`_filePathText_yun72_21`,fileExpandBtn:`_fileExpandBtn_yun72_25`,filePathCopyBtn:`_filePathCopyBtn_yun72_33`,headerActions:`_headerActions_yun72_40`,headerAction:`_headerAction_yun72_40`,threadCount:`_threadCount_yun72_52`,fileLevelInlineThreads:`_fileLevelInlineThreads_yun72_55`};function lN({file:e,threads:t,showToggleAllLines:n,hasExpandedContext:r,onToggleAllLines:i}){let{copyPrompt:a,createThread:o}=Bj(),[s,c]=v.useState(!1),[l,u]=uk.useMessage(),d=r?`隐藏当前文件未改动行`:`展开当前文件所有未改动行`,f=r?`隐藏当前文件未改动行`:`展开当前文件所有未改动行`,p=t.filter(t=>t.filePath===e.path&&t.status!==`resolved`),m=t.filter(t=>t.filePath===e.path&&t.anchor.type===`file`);async function h(){await navigator.clipboard.writeText(e.path),l.success(`完整文件路径已复制到剪贴板`)}return(0,q.jsxs)(WT,{className:cN.fileHeader,children:[u,(0,q.jsxs)(`div`,{className:cN.headerTop,children:[(0,q.jsxs)(`div`,{className:cN.filePathBlock,children:[n?(0,q.jsx)(Sx,{title:d,children:(0,q.jsx)(XC,{className:cN.fileExpandBtn,type:`text`,icon:r?(0,q.jsx)(gj,{}):(0,q.jsx)(ij,{}),"aria-label":f,onClick:()=>i(e.path)})}):null,(0,q.jsx)(QA.Text,{strong:!0,className:cN.filePathText,children:e.path}),(0,q.jsx)(XC,{className:cN.filePathCopyBtn,type:`text`,icon:(0,q.jsx)(EA,{}),"aria-label":`复制完整文件路径`,onClick:()=>void h()})]}),(0,q.jsxs)(`div`,{className:cN.headerActions,children:[(0,q.jsx)(XC,{disabled:p.length===0,type:`primary`,className:cN.headerAction,icon:(0,q.jsx)(EA,{}),onClick:()=>void a({type:`file-unresolved`,filePath:e.path}),children:`批量提交当前文件的review`}),(0,q.jsx)(XC,{className:cN.headerAction,icon:(0,q.jsx)(sj,{}),type:s?`primary`:`default`,onClick:()=>c(e=>!e),children:`文件级评论`})]})]}),s?(0,q.jsx)(dM,{style:{marginTop:16},placeholder:`请输入文件级审查评论...`,onSubmit:async t=>{await o({type:`file`,filePath:e.path},t),c(!1)},onCancel:()=>c(!1)}):null,p.length>0?(0,q.jsxs)(Zk,{className:cN.threadCount,color:`gold`,children:[p.length,` 个评论线程`]}):null,m.length>0?(0,q.jsx)(`div`,{className:cN.fileLevelInlineThreads,children:(0,q.jsx)(wM,{threads:m,variant:`fileLevel`})}):null]})}function uN(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function dN(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var fN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mN={};function hN(e,t){return((t||mN).jsx?pN:fN).test(e)}var gN=/[ \t\n\f\r]/g;function _N(e){return typeof e==`object`?e.type===`text`?vN(e.value):!1:vN(e)}function vN(e){return e.replace(gN,``)===``}var yN=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};yN.prototype.normal={},yN.prototype.property={},yN.prototype.space=void 0;function bN(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new yN(n,r,t)}function xN(e){return e.toLowerCase()}var SN=class{constructor(e,t){this.attribute=t,this.property=e}};SN.prototype.attribute=``,SN.prototype.booleanish=!1,SN.prototype.boolean=!1,SN.prototype.commaOrSpaceSeparated=!1,SN.prototype.commaSeparated=!1,SN.prototype.defined=!1,SN.prototype.mustUseProperty=!1,SN.prototype.number=!1,SN.prototype.overloadedBoolean=!1,SN.prototype.property=``,SN.prototype.spaceSeparated=!1,SN.prototype.space=void 0;var CN=s({boolean:()=>TN,booleanish:()=>EN,commaOrSpaceSeparated:()=>jN,commaSeparated:()=>AN,number:()=>ON,overloadedBoolean:()=>DN,spaceSeparated:()=>kN}),wN=0,TN=MN(),EN=MN(),DN=MN(),ON=MN(),kN=MN(),AN=MN(),jN=MN();function MN(){return 2**++wN}var NN=Object.keys(CN),PN=class extends SN{constructor(e,t,n,r){let i=-1;if(super(e,t),FN(this,`space`,r),typeof n==`number`)for(;++i<NN.length;){let e=NN[i];FN(this,NN[i],(n&CN[e])===CN[e])}}};PN.prototype.defined=!0;function FN(e,t,n){n&&(e[t]=n)}function IN(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new PN(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xN(r)]=r,n[xN(a.attribute)]=r}return new yN(t,n,e.space)}var LN=IN({properties:{ariaActiveDescendant:null,ariaAtomic:EN,ariaAutoComplete:null,ariaBusy:EN,ariaChecked:EN,ariaColCount:ON,ariaColIndex:ON,ariaColSpan:ON,ariaControls:kN,ariaCurrent:null,ariaDescribedBy:kN,ariaDetails:null,ariaDisabled:EN,ariaDropEffect:kN,ariaErrorMessage:null,ariaExpanded:EN,ariaFlowTo:kN,ariaGrabbed:EN,ariaHasPopup:null,ariaHidden:EN,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kN,ariaLevel:ON,ariaLive:null,ariaModal:EN,ariaMultiLine:EN,ariaMultiSelectable:EN,ariaOrientation:null,ariaOwns:kN,ariaPlaceholder:null,ariaPosInSet:ON,ariaPressed:EN,ariaReadOnly:EN,ariaRelevant:null,ariaRequired:EN,ariaRoleDescription:kN,ariaRowCount:ON,ariaRowIndex:ON,ariaRowSpan:ON,ariaSelected:EN,ariaSetSize:ON,ariaSort:null,ariaValueMax:ON,ariaValueMin:ON,ariaValueNow:ON,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function RN(e,t){return t in e?e[t]:t}function zN(e,t){return RN(e,t.toLowerCase())}var BN=IN({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:AN,acceptCharset:kN,accessKey:kN,action:null,allow:null,allowFullScreen:TN,allowPaymentRequest:TN,allowUserMedia:TN,alt:null,as:null,async:TN,autoCapitalize:null,autoComplete:kN,autoFocus:TN,autoPlay:TN,blocking:kN,capture:null,charSet:null,checked:TN,cite:null,className:kN,cols:ON,colSpan:null,content:null,contentEditable:EN,controls:TN,controlsList:kN,coords:ON|AN,crossOrigin:null,data:null,dateTime:null,decoding:null,default:TN,defer:TN,dir:null,dirName:null,disabled:TN,download:DN,draggable:EN,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:TN,formTarget:null,headers:kN,height:ON,hidden:DN,high:ON,href:null,hrefLang:null,htmlFor:kN,httpEquiv:kN,id:null,imageSizes:null,imageSrcSet:null,inert:TN,inputMode:null,integrity:null,is:null,isMap:TN,itemId:null,itemProp:kN,itemRef:kN,itemScope:TN,itemType:kN,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:TN,low:ON,manifest:null,max:null,maxLength:ON,media:null,method:null,min:null,minLength:ON,multiple:TN,muted:TN,name:null,nonce:null,noModule:TN,noValidate:TN,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:TN,optimum:ON,pattern:null,ping:kN,placeholder:null,playsInline:TN,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:TN,referrerPolicy:null,rel:kN,required:TN,reversed:TN,rows:ON,rowSpan:ON,sandbox:kN,scope:null,scoped:TN,seamless:TN,selected:TN,shadowRootClonable:TN,shadowRootDelegatesFocus:TN,shadowRootMode:null,shape:null,size:ON,sizes:null,slot:null,span:ON,spellCheck:EN,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ON,step:null,style:null,tabIndex:ON,target:null,title:null,translate:null,type:null,typeMustMatch:TN,useMap:null,value:EN,width:ON,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kN,axis:null,background:null,bgColor:null,border:ON,borderColor:null,bottomMargin:ON,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:TN,declare:TN,event:null,face:null,frame:null,frameBorder:null,hSpace:ON,leftMargin:ON,link:null,longDesc:null,lowSrc:null,marginHeight:ON,marginWidth:ON,noResize:TN,noHref:TN,noShade:TN,noWrap:TN,object:null,profile:null,prompt:null,rev:null,rightMargin:ON,rules:null,scheme:null,scrolling:EN,standby:null,summary:null,text:null,topMargin:ON,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ON,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:TN,disableRemotePlayback:TN,prefix:null,property:null,results:ON,security:null,unselectable:null},space:`html`,transform:zN}),VN=IN({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:jN,accentHeight:ON,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ON,amplitude:ON,arabicForm:null,ascent:ON,attributeName:null,attributeType:null,azimuth:ON,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ON,by:null,calcMode:null,capHeight:ON,className:kN,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:ON,diffuseConstant:ON,direction:null,display:null,dur:null,divisor:ON,dominantBaseline:null,download:TN,dx:null,dy:null,edgeMode:null,editable:null,elevation:ON,enableBackground:null,end:null,event:null,exponent:ON,externalResourcesRequired:null,fill:null,fillOpacity:ON,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:AN,g2:AN,glyphName:AN,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ON,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ON,horizOriginX:ON,horizOriginY:ON,id:null,ideographic:ON,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ON,k:ON,k1:ON,k2:ON,k3:ON,k4:ON,kernelMatrix:jN,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ON,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:ON,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:ON,overlineThickness:ON,paintOrder:null,panose1:null,path:null,pathLength:ON,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kN,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ON,pointsAtY:ON,pointsAtZ:ON,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jN,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jN,rev:jN,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jN,requiredFeatures:jN,requiredFonts:jN,requiredFormats:jN,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:ON,specularExponent:ON,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ON,strikethroughThickness:ON,string:null,stroke:null,strokeDashArray:jN,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ON,strokeOpacity:ON,strokeWidth:null,style:null,surfaceScale:ON,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jN,tabIndex:ON,tableValues:null,target:null,targetX:ON,targetY:ON,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jN,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ON,underlineThickness:ON,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ON,values:null,vAlphabetic:ON,vMathematical:ON,vectorEffect:null,vHanging:ON,vIdeographic:ON,version:null,vertAdvY:ON,vertOriginX:ON,vertOriginY:ON,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ON,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:RN}),HN=IN({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()}}),UN=IN({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:zN}),WN=IN({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),GN={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`},KN=/[A-Z]/g,qN=/-[a-z]/g,JN=/^data[-\w.:]+$/i;function YN(e,t){let n=xN(t),r=t,i=SN;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&JN.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(qN,ZN);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!qN.test(e)){let n=e.replace(KN,XN);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=PN}return new i(r,t)}function XN(e){return`-`+e.toLowerCase()}function ZN(e){return e.charAt(1).toUpperCase()}var QN=bN([LN,BN,HN,UN,WN],`html`),$N=bN([LN,VN,HN,UN,WN],`svg`);function eP(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tP(e){return e.join(` `).trim()}var nP=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
258
+ `]:{...Qa(e),marginInlineStart:e.marginXXS},...dA(e),...fA(e),...pA(),"&-rtl":{direction:`rtl`}}}},()=>({titleMarginTop:`1.2em`,titleMarginBottom:`0.5em`})),hA=e=>{let{prefixCls:t,"aria-label":n,className:r,style:i,direction:a,maxLength:o,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:d,component:f,enterIcon:p=v.createElement(oA,null)}=e,m=v.useRef(null),h=v.useRef(!1),g=v.useRef(null),[_,y]=v.useState(c);v.useEffect(()=>{y(c)},[c]),v.useEffect(()=>{if(m.current?.resizableTextArea){let{textArea:e}=m.current.resizableTextArea;e.focus();let{length:t}=e.value;e.setSelectionRange(t,t)}},[]);let b=({target:e})=>{y(e.value.replace(/[\n\r]/g,``))},x=()=>{h.current=!0},S=()=>{h.current=!1},C=({keyCode:e})=>{h.current||(g.current=e)},w=()=>{l(_.trim())},T=({keyCode:e,ctrlKey:t,altKey:n,metaKey:r,shiftKey:i})=>{g.current!==e||h.current||t||n||r||i||(e===K.ENTER?(w(),d?.()):e===K.ESC&&u())},E=()=>{w()},[D,O]=mA(t),k=W(t,`${t}-edit-content`,{[`${t}-rtl`]:a===`rtl`,[`${t}-${f}`]:!!f},r,D,O);return v.createElement(`div`,{className:k,style:i},v.createElement(ND,{ref:m,maxLength:o,value:_,onChange:b,onKeyDown:C,onKeyUp:T,onCompositionStart:x,onCompositionEnd:S,onBlur:E,"aria-label":n,rows:1,autoSize:s}),p===null?null:du(p,{className:`${t}-edit-content-confirm`}))},gA=(e,t)=>{let n=!1,r=r=>{r.stopPropagation(),r.preventDefault(),r.clipboardData?.clearData(),r.clipboardData?.setData(`text/plain`,e),t&&r.clipboardData?.setData(`text/html`,e),n=!0};try{return document.addEventListener(`copy`,r,{capture:!0}),document.execCommand(`copy`),n}catch{return!1}finally{document.removeEventListener(`copy`,r,{capture:!0})}},_A=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:`text/html`}),"text/plain":new Blob([e],{type:`text/plain`})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function vA(e,t){if(typeof e!=`string`)return!1;let n=t?.format===`text/html`;return!!(await _A(e,n)||gA(e,n))}var yA=({copyConfig:e,children:t})=>{let[n,r]=v.useState(!1),[i,a]=v.useState(!1),o=v.useRef(null),s=()=>{o.current&&clearTimeout(o.current)},c={};return e.format&&(c.format=e.format),v.useEffect(()=>s,[]),{copied:n,copyLoading:i,onClick:y(async n=>{n?.preventDefault(),n?.stopPropagation(),a(!0);try{await vA((typeof e.text==`function`?await e.text():e.text)||XO(t,{skipEmpty:!0}).join(``)||``,c),a(!1),r(!0),s(),o.current=setTimeout(()=>{r(!1)},3e3),e.onCopy?.(n)}catch(e){throw a(!1),e}})}};function bA(e,t){return v.useMemo(()=>{let n=!!e;return[n,{...t,...n&&typeof e==`object`?e:null}]},[e])}var xA=e=>{let t=(0,v.useRef)(void 0);return(0,v.useEffect)(()=>{t.current=e}),t.current},SA=(e,t,n)=>(0,v.useMemo)(()=>e===!0?{title:t??n}:(0,v.isValidElement)(e)?{title:e}:fc(e)?{title:t??n,...e}:{title:e},[e,t,n]),CA=v.forwardRef((e,t)=>{let{prefixCls:n,component:r=`article`,className:i,rootClassName:a,children:o,direction:s,style:c,...l}=e,{getPrefixCls:u,direction:d,className:f,style:p}=nt(`typography`),m=s??d,h=u(`typography`,n),[g,_]=mA(h),y=W(h,f,{[`${h}-rtl`]:m===`rtl`},i,a,g,_),b={...p,...c};return v.createElement(r,{className:y,style:b,ref:t,...l},o)}),wA={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z`}}]},name:`copy`,theme:`outlined`};function TA(){return TA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TA.apply(this,arguments)}var EA=v.forwardRef((e,t)=>v.createElement(Do,TA({},e,{ref:t,icon:wA}))),DA=e=>e===!1?[!1,!1]:XO(e);function OA(e,t,n){return e===!0||e===void 0?t:e||n&&t}function kA(e){let t=document.createElement(`em`);e.appendChild(t);let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}var AA=e=>[`string`,`number`].includes(typeof e),jA=e=>{let{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:a,icon:o,tabIndex:s,onCopy:c,loading:l}=e,u=DA(a),d=DA(o),{copied:f,copy:p}=r??{},m=n?f:p,h=OA(u[+!!n],m),g=typeof h==`string`?h:m;return v.createElement(Sx,{title:h},v.createElement(`button`,{type:`button`,className:W(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":g,tabIndex:s},n?OA(d[1],v.createElement(Db,null),!0):OA(d[0],l?v.createElement(ed,null):v.createElement(EA,null),!0)))},MA=v.forwardRef(({style:e,children:t},n)=>{let r=v.useRef(null);return v.useImperativeHandle(n,()=>({isExceed:()=>{let e=r.current;return e.scrollHeight>e.clientHeight},getHeight:()=>r.current.clientHeight})),v.createElement(`span`,{"aria-hidden":!0,ref:r,style:{position:`fixed`,display:`block`,left:0,top:0,pointerEvents:`none`,backgroundColor:`rgba(255, 0, 0, 0.65)`,...e}},t)}),NA=e=>e.reduce((e,t)=>e+(AA(t)?String(t).length:1),0);function PA(e,t){let n=0,r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;let a=e[i],o=AA(a)?String(a).length:1,s=n+o;if(s>t){let e=t-n;return r.push(String(a).slice(0,e)),r}r.push(a),n=s}return e}var FA=0,IA=1,LA=2,RA=3,zA=4,BA={display:`-webkit-box`,overflow:`hidden`,WebkitBoxOrient:`vertical`};function VA(e){let{enableMeasure:t,width:n,text:r,children:i,rows:a,expanded:o,miscDeps:s,onEllipsis:c}=e,l=v.useMemo(()=>ge(r),[r]),u=v.useMemo(()=>NA(l),[r]),d=v.useMemo(()=>i(l,!1),[r]),[f,p]=v.useState(null),m=v.useRef(null),h=v.useRef(null),g=v.useRef(null),_=v.useRef(null),y=v.useRef(null),[b,x]=v.useState(!1),[C,w]=v.useState(FA),[T,E]=v.useState(0),[D,O]=v.useState(null);S(()=>{w(t&&n&&u?IA:FA)},[n,r,a,t,l]),S(()=>{if(C===IA)w(LA),O(h.current&&getComputedStyle(h.current).whiteSpace);else if(C===LA){let e=!!g.current?.isExceed();w(e?RA:zA),p(e?[0,u]:null),x(e);let t=g.current?.getHeight()||0,n=a===1?0:_.current?.getHeight()||0,r=y.current?.getHeight()||0;E(Math.max(t,n+r)+1),c(e)}},[C]);let k=f?Math.ceil((f[0]+f[1])/2):0;S(()=>{let[e,t]=f||[0,0];if(e!==t){let n=(m.current?.getHeight()||0)>T,r=k;t-e===1&&(r=n?e:t),p(n?[e,r]:[r,t])}},[f,k]);let A=v.useMemo(()=>{if(!t)return i(l,!1);if(C!==RA||!f||f[0]!==f[1]){let e=i(l,!1);return[zA,FA].includes(C)?e:v.createElement(`span`,{style:{...BA,WebkitLineClamp:a}},e)}return i(o?l:PA(l,f[0]),b)},[o,C,f,l].concat(We(s))),j={width:n,margin:0,padding:0,whiteSpace:D===`nowrap`?`normal`:`inherit`};return v.createElement(v.Fragment,null,A,C===LA&&v.createElement(v.Fragment,null,v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:a},ref:g},d),v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:a-1},ref:_},d),v.createElement(MA,{style:{...j,...BA,WebkitLineClamp:1},ref:y},i([],!0))),C===RA&&f&&f[0]!==f[1]&&v.createElement(MA,{style:{...j,top:400},ref:m},i(PA(l,k),!0)),C===IA&&v.createElement(`span`,{style:{whiteSpace:`inherit`},ref:h}))}var HA=({enableEllipsis:e,isEllipsis:t,open:n,children:r,tooltipProps:i})=>{if(!i?.title||!e)return r;let a=n&&t;return v.createElement(Sx,{open:a,...i},r)};function UA({mark:e,code:t,underline:n,delete:r,strong:i,keyboard:a,italic:o},s){let c=s;function l(e,t){t&&(c=v.createElement(e,{},c))}return l(`strong`,i),l(`u`,n),l(`del`,r),l(`code`,t),l(`mark`,e),l(`kbd`,a),l(`i`,o),c}var WA=`...`,GA=[`delete`,`mark`,`code`,`underline`,`strong`,`keyboard`,`italic`],KA=v.forwardRef((e,t)=>{let{prefixCls:n,className:r,style:i,type:a,disabled:o,children:s,ellipsis:c,editable:l,copyable:u,component:d,title:f,onMouseEnter:p,onMouseLeave:m,...h}=e,{getPrefixCls:g,direction:_}=v.useContext($e),[y]=ac(`Text`),b=v.useRef(null),x=v.useRef(null),C=g(`typography`,n),w=he(h,GA),[E,D]=bA(l),[O,k]=T(!1,D.editing),{triggerType:A=[`icon`]}=D,j=e=>{e&&D.onStart?.(),k(e)},M=xA(O);S(()=>{!O&&M&&x.current?.focus()},[O]);let N=e=>{e?.preventDefault(),j(!0)},P=e=>{D.onChange?.(e),j(!1)},F=()=>{D.onCancel?.(),j(!1)},[L,R]=bA(u),{copied:z,copyLoading:B,onClick:V}=yA({copyConfig:R,children:s}),[H,U]=v.useState(!1),[ee,te]=v.useState(!1),[ne,re]=v.useState(!1),[ie,ae]=v.useState(!1),[oe,se]=v.useState(!0),[ce,le]=bA(c,{expandable:!1,symbol:e=>e?y?.collapse:y?.expand}),[ue,de]=T(le.defaultExpanded||!1,le.expanded),fe=ce&&(!ue||le.expandable===`collapsible`),{rows:pe=1}=le,me=v.useMemo(()=>fe&&(le.suffix!==void 0||le.onEllipsis||le.expandable||E||L),[fe,le,E,L]);S(()=>{ce&&!me&&(U(Xh(`webkitLineClamp`)),te(Xh(`textOverflow`)))},[me,ce]);let[_e,ve]=v.useState(fe),ye=v.useMemo(()=>me?!1:pe===1?ee:H,[me,ee,H]);S(()=>{ve(ye&&fe)},[ye,fe]);let be=SA(le.tooltip,D.text,s),xe=_e&&!!be.title,Se=fe&&(_e?xe&&ie:ne),Ce=fe&&pe===1&&_e,we=fe&&pe>1&&_e,Te=(e,t)=>{de(t.expanded),le.onExpand?.(e,t)},[Ee,De]=v.useState(0),[Oe,ke]=v.useState(!1),[Ae,je]=v.useState(!1),Me=({offsetWidth:e})=>{De(e)},Ne=e=>{re(e),ne!==e&&le.onEllipsis?.(e)};v.useEffect(()=>{let e=b.current;if(ce&&xe&&e){let t=kA(e);ie!==t&&ae(t)}},[ce,xe,s,we,oe,Ee]),v.useEffect(()=>{let e=b.current;if(typeof IntersectionObserver>`u`||!e||!xe||!fe)return;let t=new IntersectionObserver(()=>{se(!!e.offsetParent)});return t.observe(e),()=>{t.disconnect()}},[xe,fe]);let Pe=v.useMemo(()=>{if(!(!ce||_e))return[D.text,s,f,be.title].find(AA)},[ce,_e,f,be.title,Se]);if(O)return v.createElement(hA,{value:D.text??(typeof s==`string`?s:``),onSave:P,onCancel:F,onEnd:D.onEnd,prefixCls:C,className:r,style:i,direction:_,component:d,maxLength:D.maxLength,autoSize:D.autoSize,enterIcon:D.enterIcon});let Fe=()=>{let{expandable:e,symbol:t}=le;return e?v.createElement(`button`,{type:`button`,key:`expand`,className:`${C}-${ue?`collapse`:`expand`}`,onClick:e=>Te(e,{expanded:!ue}),"aria-label":ue?y.collapse:y?.expand},typeof t==`function`?t(ue):t):null},Ie=()=>{if(!E)return;let{icon:e,tooltip:t,tabIndex:n}=D,r=ge(t)[0]||y?.edit,i=typeof r==`string`?r:``;return A.includes(`icon`)?v.createElement(Sx,{key:`edit`,title:t===!1?``:r},v.createElement(`button`,{type:`button`,ref:x,className:`${C}-edit`,onClick:N,"aria-label":i,tabIndex:n},e||v.createElement(rA,{role:`button`}))):null},Re=()=>L?v.createElement(jA,{key:`copy`,...R,prefixCls:C,copied:z,locale:y,onCopy:V,loading:B,iconOnly:!lc(s)}):null,ze=e=>{let t=e&&Fe(),n=Ie(),r=Re();return!t&&!n&&!r?null:v.createElement(`span`,{key:`operations`,className:`${C}-actions`,onMouseEnter:()=>ke(!0),onMouseLeave:()=>ke(!1)},t,n,r)},Be=e=>[e&&!ue&&v.createElement(`span`,{"aria-hidden":!0,key:`ellipsis`},WA),le.suffix,ze(e)];return v.createElement(Le,{onResize:Me,disabled:!fe},c=>v.createElement(HA,{tooltipProps:be,enableEllipsis:fe,isEllipsis:Se,open:Ae&&!Oe},v.createElement(CA,{onMouseEnter:e=>{je(!0),p?.(e)},onMouseLeave:e=>{je(!1),m?.(e)},className:W({[`${C}-${a}`]:a,[`${C}-disabled`]:o,[`${C}-ellipsis`]:ce,[`${C}-ellipsis-single-line`]:Ce,[`${C}-ellipsis-multiple-line`]:we,[`${C}-link`]:d===`a`},r),prefixCls:n,style:{...i,WebkitLineClamp:we?pe:void 0},component:d,ref:I(c,b,t),direction:_,onClick:A.includes(`text`)?N:void 0,"aria-label":Pe?.toString(),title:f,...w},v.createElement(VA,{enableMeasure:fe&&!_e,text:s,rows:pe,width:Ee,onEllipsis:Ne,expanded:ue,miscDeps:[z,ue,B,E,L,y].concat(We(GA.map(t=>e[t])))},(t,n)=>UA(e,v.createElement(v.Fragment,null,t.length>0&&n&&!ue&&Pe?v.createElement(`span`,{key:`show-content`,"aria-hidden":!0},t):t,Be(n)))))))}),qA=v.forwardRef((e,t)=>{let{ellipsis:n,rel:r,children:i,navigate:a,...o}=e,s={...o,rel:r===void 0&&o.target===`_blank`?`noopener noreferrer`:r};return v.createElement(KA,{...s,ref:t,ellipsis:!!n,component:`a`},i)}),JA=v.forwardRef((e,t)=>{let{children:n,...r}=e;return v.createElement(KA,{ref:t,...r,component:`div`},n)}),YA=v.forwardRef((e,t)=>{let{ellipsis:n,children:r,...i}=e,a=v.useMemo(()=>fc(n)?he(n,[`expandable`,`rows`]):n,[n]);return v.createElement(KA,{ref:t,...i,ellipsis:a,component:`span`},r)}),XA=[1,2,3,4,5],ZA=v.forwardRef((e,t)=>{let{level:n=1,children:r,...i}=e,a=XA.includes(n)?`h${n}`:`h1`;return v.createElement(KA,{ref:t,...i,component:a},r)}),QA=CA;QA.Text=YA,QA.Link=qA,QA.Title=ZA,QA.Paragraph=JA;var $A={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z`}}]},name:`apartment`,theme:`outlined`};function ej(){return ej=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ej.apply(this,arguments)}var tj=v.forwardRef((e,t)=>v.createElement(Do,ej({},e,{ref:t,icon:$A}))),nj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z`}}]},name:`arrows-alt`,theme:`outlined`};function rj(){return rj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rj.apply(this,arguments)}var ij=v.forwardRef((e,t)=>v.createElement(Do,rj({},e,{ref:t,icon:nj}))),aj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z`}}]},name:`message`,theme:`outlined`};function oj(){return oj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oj.apply(this,arguments)}var sj=v.forwardRef((e,t)=>v.createElement(Do,oj({},e,{ref:t,icon:aj}))),cj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`defs`,attrs:{},children:[{tag:`style`,attrs:{}}]},{tag:`path`,attrs:{d:`M640.6 429.8h257.1c7.9 0 14.3-6.4 14.3-14.3V158.3c0-7.9-6.4-14.3-14.3-14.3H640.6c-7.9 0-14.3 6.4-14.3 14.3v92.9H490.6c-3.9 0-7.1 3.2-7.1 7.1v221.5h-85.7v-96.5c0-7.9-6.4-14.3-14.3-14.3H126.3c-7.9 0-14.3 6.4-14.3 14.3v257.2c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3V544h85.7v221.5c0 3.9 3.2 7.1 7.1 7.1h135.7v92.9c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3v-257c0-7.9-6.4-14.3-14.3-14.3h-257c-7.9 0-14.3 6.4-14.3 14.3v100h-78.6v-393h78.6v100c0 7.9 6.4 14.3 14.3 14.3zm53.5-217.9h150V362h-150V211.9zM329.9 587h-150V437h150v150zm364.2 75.1h150v150.1h-150V662.1z`}}]},name:`partition`,theme:`outlined`};function lj(){return lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lj.apply(this,arguments)}var uj=v.forwardRef((e,t)=>v.createElement(Do,lj({},e,{ref:t,icon:cj}))),dj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z`}}]},name:`redo`,theme:`outlined`};function fj(){return fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fj.apply(this,arguments)}var pj=v.forwardRef((e,t)=>v.createElement(Do,fj({},e,{ref:t,icon:dj}))),mj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M881.7 187.4l-45.1-45.1a8.03 8.03 0 00-11.3 0L667.8 299.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L576.1 439c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 157.6-157.6c3-3 3-8.1-.1-11.2zM439 576.1l-189.2 23.5c-6.6.8-9.3 8.9-4.7 13.5l54.7 54.7-157.5 157.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l157.6-157.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L447.9 585a7.9 7.9 0 00-8.9-8.9z`}}]},name:`shrink`,theme:`outlined`};function hj(){return hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hj.apply(this,arguments)}var gj=v.forwardRef((e,t)=>v.createElement(Do,hj({},e,{ref:t,icon:mj}))),_j={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z`}}]},name:`unordered-list`,theme:`outlined`};function vj(){return vj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vj.apply(this,arguments)}var yj=v.forwardRef((e,t)=>v.createElement(Do,vj({},e,{ref:t,icon:_j}))),bj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M859.9 780H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM505.7 669a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V176c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8z`}}]},name:`vertical-align-bottom`,theme:`outlined`};function xj(){return xj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xj.apply(this,arguments)}var Sj=v.forwardRef((e,t)=>v.createElement(Do,xj({},e,{ref:t,icon:bj}))),Cj={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M859.9 474H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zm-353.6-74.7c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H550V104c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v156h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.6zm11.4 225.4a7.14 7.14 0 00-11.3 0L405.6 752.3a7.23 7.23 0 005.7 11.7H474v156c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V764h62.8c6 0 9.4-7 5.7-11.7L517.7 624.7z`}}]},name:`vertical-align-middle`,theme:`outlined`};function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wj.apply(this,arguments)}var Tj=v.forwardRef((e,t)=>v.createElement(Do,wj({},e,{ref:t,icon:Cj})));async function Ej(){return await(await fetch(`/api/review-state`)).json()}async function Dj(e,t){await fetch(`/api/threads`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e.filePath,anchor:e,body:t})})}async function Oj(e,t){let n=await fetch(`/api/threads/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({status:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`更新评论状态失败`}));throw Error(e.error??`更新评论状态失败`)}}async function kj(e){await fetch(`/api/threads/${e}`,{method:`DELETE`})}async function Aj(e,t){await fetch(`/api/threads/${e}/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,author:`user`})})}async function jj(e,t,n){if(!t)throw Error(`Comment id is required`);let r=await fetch(`/api/threads/${e}/comments/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`编辑评论失败`}));throw Error(e.error??`编辑评论失败`)}}async function Mj(e){return await(await fetch(`/api/prompt`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json()}var Nj=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),q=o(((e,t)=>{t.exports=Nj()}))(),Pj=v.createContext(null),Fj=v.createContext(null);function Ij({refreshReviewState:e,onPromptCopied:t}){let n=v.useCallback(async(t,n)=>{await Dj(t,n),await e()},[e]),r=v.useCallback(async(t,n)=>{await Oj(t,n),await e()},[e]),i=v.useCallback(async t=>{await kj(t),await e()},[e]),a=v.useCallback(async(t,n)=>{await Aj(t,n),await e()},[e]),o=v.useCallback(async(t,n,r)=>{await jj(t,n,r),await e()},[e]),s=v.useCallback(async e=>{let n=await Mj(e);await navigator.clipboard.writeText(n.prompt),t()},[t]);return v.useMemo(()=>({createThread:n,patchThread:r,deleteThread:i,replyThread:a,patchComment:o,copyPrompt:s}),[s,n,i,o,r,a])}function Lj({files:e,threads:t,setSelectedPath:n,setLocateTarget:r,setFocusedThreadId:i}){let a=v.useCallback(a=>{let o=t.find(e=>e.id===a);o&&(e.some(e=>e.path===o.filePath)&&n(o.filePath),r({threadId:a,anchor:o.anchor})),i(a)},[e,i,r,n,t]);return v.useMemo(()=>({locateThread:a}),[a])}function Rj({value:e,children:t}){return(0,q.jsx)(Pj.Provider,{value:e,children:t})}function zj({value:e,children:t}){return(0,q.jsx)(Fj.Provider,{value:e,children:t})}function Bj(){let e=v.useContext(Pj);if(!e)throw Error(`useReviewActions must be used within ReviewActionsProvider`);return e}function Vj(){let e=v.useContext(Fj);if(!e)throw Error(`useReviewNavigationActions must be used within ReviewNavigationActionsProvider`);return e}async function Hj(e){return await(await fetch(`/api/markdown-preview?path=${encodeURIComponent(e)}`)).json()}async function Uj(e,t){let n=await fetch(`/api/diff-file-contents?path=${encodeURIComponent(e)}`,{signal:t});return n.ok?await n.json():null}function Wj(e){let t=e.split(`/`).filter(e=>e.length>0&&e!==`.`),n=[];for(let e of t){if(e===`..`){n.pop();continue}n.push(e)}return n}function Gj(e,t){if(!t||/^https?:|^mailto:|^#/i.test(t)||t.startsWith(`/`))return t;let n=t.split(`#`)[0]?.split(`?`)[0]??t,r=Wj(e);r.pop();let i=Wj(n),a=[...r,...i].join(`/`);return a?`/api/markdown-asset?path=${encodeURIComponent(a)}`:t}function Kj(e,t){let[n,r]=v.useState(null);return v.useEffect(()=>{let t=new AbortController,n=!1;r(null);async function i(){try{let i=await Uj(e,t.signal);n||r(i)}catch{n||r(null)}}return i(),()=>{n=!0,t.abort()}},[e,t]),n}function qj(e){return e.anchor.type===`file`?0:e.anchor.lineNumber}function Jj(e,t){return t.filter(t=>t.filePath===e&&t.status!==`resolved`).sort((e,t)=>qj(e)-qj(t)||e.createdAt.localeCompare(t.createdAt))[0]}function Yj(e){return e.status===`deleted`?`old`:`new`}function Xj(e,t){return Zj(e.anchor,t)}function Zj(e,t){return e.type===`diff-line`?{side:e.side,lineNumber:e.lineNumber}:e.type===`markdown-line`?{side:Yj(t),lineNumber:e.lineNumber}:null}function Qj(e,t){let n=Xj(e,t);return n?`${n.side}:${n.lineNumber}`:null}function $j(e,t){return t===`old`?e.oldLines>0?e.oldStart+e.oldLines-1:e.oldStart-1:e.newLines>0?e.newStart+e.newLines-1:e.newStart-1}function eM(e,t){if(!t||e.hunks.length===0)return[];let n=[],r=0,i=0;e.hunks.forEach((t,a)=>{let o=Math.max(0,t.oldStart-r-1),s=Math.max(0,t.newStart-i-1),c=e.status===`added`?`new`:e.status===`deleted`?`old`:`both`,l=c===`old`?o:c===`new`?s:Math.max(o,s);l>0&&n.push({key:`${e.path}-gap-${a}`,mode:c,hiddenCount:l,oldStart:r+1,oldEnd:t.oldStart-1,newStart:i+1,newEnd:t.newStart-1,direction:`up`,position:a}),r=$j(t,`old`),i=$j(t,`new`)});let a=Math.max(0,t.oldTotalLines-r),o=Math.max(0,t.newTotalLines-i),s=e.status===`added`?`new`:e.status===`deleted`?`old`:`both`,c=s===`old`?a:s===`new`?o:Math.max(a,o);return c>0&&n.push({key:`${e.path}-gap-tail`,mode:s,hiddenCount:c,oldStart:r+1,oldEnd:t.oldTotalLines,newStart:i+1,newEnd:t.newTotalLines,direction:`down`,position:`tail`}),n}function tM(e,t,n){if(!e||n<=0)return[];let r=[],i=t.oldStart>0?t.oldStart:1,a=t.oldEnd>0?t.oldEnd:0,o=t.newStart>0?t.newStart:1,s=t.newEnd>0?t.newEnd:0,c=t.direction,l=c===`down`?i:Math.max(i,a-n+1),u=c===`down`?o:Math.max(o,s-n+1);for(let i=0;i<n;i+=1){let n=t.mode===`new`?void 0:l+i,a=t.mode===`old`?void 0:u+i,o=t.mode===`old`?e.oldLines[n?n-1:0]??``:t.mode===`new`?e.newLines[a?a-1:0]??``:e.oldLines[n?n-1:0]??e.newLines[a?a-1:0]??``;r.push({key:`${t.key}-${i}`,line:{type:`context`,content:o,oldLineNumber:n,newLineNumber:a}})}return r}function nM(e,t){let n=[];e.hunks.forEach((e,r)=>{let i=t.get(r);i&&n.push({type:`gap`,key:i.key,gap:i,nextHunk:e,nextIndex:r}),n.push({type:`hunk`,key:`${e.header}-${r}`,hunk:e,index:r})});let r=t.get(`tail`);return r&&n.push({type:`gap`,key:r.key,gap:r}),n}function rM(e){e.scrollTop=0}function iM(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();e.scrollTop+=r.top-n.top}function aM(e){return e===`add`?`+`:e===`remove`?`-`:``}function oM(e){let t=[],n=0;for(;n<e.lines.length;){let r=e.lines[n];if(r.type===`context`){t.push({key:`${e.header}-context-${n}`,oldCell:{lineNumber:r.oldLineNumber,content:r.content,type:`context`,side:`old`},newCell:{lineNumber:r.newLineNumber,content:r.content,type:`context`,side:`new`}}),n+=1;continue}if(r.type===`remove`){let r=[],i=[];for(;n<e.lines.length&&e.lines[n].type===`remove`;)r.push(e.lines[n]),n+=1;for(;n<e.lines.length&&e.lines[n].type===`add`;)i.push(e.lines[n]),n+=1;let a=Math.max(r.length,i.length);for(let o=0;o<a;o+=1){let a=r[o],s=i[o];t.push({key:`${e.header}-change-${n}-${o}`,oldCell:a?{lineNumber:a.oldLineNumber,content:a.content,type:`remove`,side:`old`}:{content:``,type:`empty`,side:`old`},newCell:s?{lineNumber:s.newLineNumber,content:s.content,type:`add`,side:`new`}:{content:``,type:`empty`,side:`new`}})}continue}t.push({key:`${e.header}-add-${n}`,oldCell:{content:``,type:`empty`,side:`old`},newCell:{lineNumber:r.newLineNumber,content:r.content,type:`add`,side:`new`}}),n+=1}return t}function sM(e,t,n){return e.find(e=>{if(e.mode===`new`&&t===`old`||e.mode===`old`&&t===`new`)return!1;let r=t===`old`?e.oldStart:e.newStart,i=t===`old`?e.oldEnd:e.newEnd;return n>=r&&n<=i})??null}function cM({file:e,filePath:t,viewMode:n,threads:r,fileContents:i,gapDescriptors:a,expandedGapLines:o,setExpandedGapLines:s,scrollRef:c,autoScrollKeyRef:l}){v.useLayoutEffect(()=>{let o=c.current;if(!o)return;let u=`${t}:${n}`;if(l.current===u)return;let d=Jj(t,r);if(!d||d.anchor.type===`file`){rM(o),l.current=u;return}let f=Qj(d,e),p=f?o.querySelector(`[data-review-anchor="${CSS.escape(f)}"]`):null;if(!p){if(!i)return;let t=Xj(d,e);if(t){let{side:e,lineNumber:n}=t,r=sM(a,e,n);if(r){s(e=>({...e,[r.key]:r.hiddenCount}));return}}rM(o),l.current=u;return}iM(o,p),l.current=u},[l,o,e,i,t,a,c,s,r,n])}function lM({file:e,filePath:t,locateTarget:n,viewMode:r,fileContents:i,gapDescriptors:a,expandedGapLines:o,setExpandedGapLines:s,scrollRef:c}){v.useLayoutEffect(()=>{let r=c.current;if(!r||!n||n.anchor.filePath!==t)return;if(n.anchor.type===`file`){rM(r);return}let o=Zj(n.anchor,e);if(!o)return;let{side:l,lineNumber:u}=o,d=r.querySelector(`[data-review-anchor="${CSS.escape(`${l}:${u}`)}"]`);if(d){iM(r,d);return}if(!i)return;let f=sM(a,l,u);if(f){s(e=>({...e,[f.key]:f.hiddenCount}));return}let p=[...r.querySelectorAll(`[data-review-anchor]`)].map(e=>{let[t,n]=(e.dataset.reviewAnchor??``).split(`:`),r=Number(n);return t!==`old`&&t!==`new`||!Number.isFinite(r)?null:{node:e,side:t,lineNumber:r}}).filter(e=>!!e).filter(e=>e.side===l).sort((e,t)=>Math.abs(e.lineNumber-u)-Math.abs(t.lineNumber-u));p[0]?iM(r,p[0].node):rM(r)},[o,e,i,t,a,n,c,s,r])}var uM={composer:`_composer_hhgmh_1`};function dM({style:e,placeholder:t,onSubmit:n,submitLabel:r=`添加评论`,onCancel:i}){let[a,o]=v.useState(``),[s,c]=v.useState(!1);return(0,q.jsxs)(`form`,{className:uM.composer,style:e,onSubmit:e=>{e.preventDefault(),a.trim()&&(c(!0),n(a.trim()).then(()=>o(``)).finally(()=>c(!1)))},children:[(0,q.jsx)(PD.TextArea,{placeholder:t,value:a,onChange:e=>o(e.target.value),autoSize:{minRows:3,maxRows:8}}),(0,q.jsxs)($E,{gap:`small`,justify:`end`,children:[(0,q.jsx)(XC,{htmlType:`submit`,loading:s,type:`primary`,size:`small`,children:r}),i?(0,q.jsx)(XC,{onClick:i,size:`small`,children:`取消`}):null]})]})}var fM={popover:`_popover_j0rpl_1`};function pM({onCancel:e,onSubmit:t}){return(0,q.jsx)(`div`,{className:fM.popover,children:(0,q.jsx)(dM,{placeholder:`请输入行内评论...`,submitLabel:`评论`,onSubmit:t,onCancel:e})})}var mM={submit:`待提交`,replied:`已回复`,resolved:`已解决`};function hM(e,t){return e.filePath===t.path&&e.fileSnapshotHash===t.snapshotHash}function gM(e){return e.status===`resolved`?`resolved`:_M(e)}function _M(e){return e.comments.some(e=>e.author===`agent`)?`replied`:`submit`}function vM(e){return e.length>0&&e.every(e=>gM(e)===`resolved`)?`resolved`:e.some(e=>_M(e)===`replied`)?`replied`:`submit`}var yM={inlineThread:`_inlineThread_1qms3_1`,inlineThreadFileLevel:`_inlineThreadFileLevel_1qms3_8`,inlineThreadHeader:`_inlineThreadHeader_1qms3_8`,inlineThreadBody:`_inlineThreadBody_1qms3_11`,inlineThreadActions:`_inlineThreadActions_1qms3_15`,inlineThreadBorderless:`_inlineThreadBorderless_1qms3_18`,inlineThreadSubmit:`_inlineThreadSubmit_1qms3_30`,inlineThreadReplied:`_inlineThreadReplied_1qms3_35`,inlineThreadResolved:`_inlineThreadResolved_1qms3_40`,inlineThreadSection:`_inlineThreadSection_1qms3_52`,threadTag:`_threadTag_1qms3_58`,threadTagResolved:`_threadTagResolved_1qms3_67`,threadTagSubmit:`_threadTagSubmit_1qms3_72`,threadTagReplied:`_threadTagReplied_1qms3_77`,inlineThreadAgentLabel:`_inlineThreadAgentLabel_1qms3_82`,inlineThreadCommentItem:`_inlineThreadCommentItem_1qms3_89`,inlineThreadCommentItemAgent:`_inlineThreadCommentItemAgent_1qms3_97`,inlineThreadCommentActions:`_inlineThreadCommentActions_1qms3_105`,threadIconBtn:`_threadIconBtn_1qms3_111`,commentRow:`_commentRow_1qms3_118`,commentContent:`_commentContent_1qms3_124`,inlineThreadComposer:`_inlineThreadComposer_1qms3_135`,inlineThreadEdit:`_inlineThreadEdit_1qms3_138`,inlineThreadEditActions:`_inlineThreadEditActions_1qms3_144`,threadActionBtn:`_threadActionBtn_1qms3_157`};function bM(e){return e===`submit`?yM.inlineThreadSubmit:e===`replied`?yM.inlineThreadReplied:yM.inlineThreadResolved}function xM(e){return e===`submit`?yM.threadTagSubmit:e===`replied`?yM.threadTagReplied:yM.threadTagResolved}function SM(e){return e.find(e=>gM(e)===`replied`)??e.find(e=>gM(e)===`submit`)??e[0]}function CM(e,t){return e===`submit`?!0:e===`replied`&&t===`user`}function wM({threads:e,onFocus:t,onPatch:n,onDeleteThread:r,onReply:i,onPatchComment:a,onCopy:o,showStatusTag:s=!0,variant:c=`default`}){let l=Bj(),u=Vj(),d=t??u.locateThread,f=n??l.patchThread,p=r??l.deleteThread,m=i??l.replyThread,h=a??l.patchComment,g=o??l.copyPrompt,[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(``),w=e[0],T=vM(e),E=SM(e),D=E?gM(E):T,O=D===`resolved`,k=E?.comments.at(-1),A=CM(D,k?.author);if(!w)return null;let j=c===`fileLevel`?yM.inlineThreadFileLevel:c===`borderless`?yM.inlineThreadBorderless:``;return(0,q.jsxs)(`div`,{className:[yM.inlineThread,bM(T),j].filter(Boolean).join(` `),onClick:()=>d(w.id),children:[(0,q.jsx)(`div`,{className:yM.inlineThreadHeader,children:s&&T!==`replied`?(0,q.jsx)(Zk,{className:`${yM.threadTag} ${xM(T)}`,children:mM[T]}):null}),e.map(e=>{let t=gM(e);return(0,q.jsx)(`div`,{className:yM.inlineThreadSection,onClick:t=>{t.stopPropagation(),d(e.id)},children:e.comments.map(n=>{let r=n.author===`agent`,i=T===`submit`&&t===`submit`&&!r;return(0,q.jsx)(`div`,{className:`${yM.inlineThreadCommentItem} ${r?yM.inlineThreadCommentItemAgent:``}`,children:(0,q.jsxs)(`div`,{className:yM.commentRow,children:[(0,q.jsxs)(`div`,{className:yM.commentContent,children:[r?(0,q.jsx)(QA.Text,{className:yM.inlineThreadAgentLabel,strong:!0,children:`Agent`}):null,b===n.id?(0,q.jsxs)(`div`,{className:yM.inlineThreadEdit,children:[(0,q.jsx)(PD.TextArea,{value:S,autoSize:{minRows:3,maxRows:8},onClick:e=>e.stopPropagation(),onChange:e=>C(e.target.value)}),(0,q.jsxs)(`div`,{className:yM.inlineThreadEditActions,children:[(0,q.jsx)(XC,{size:`small`,onClick:e=>{e.stopPropagation(),x(null),C(``)},children:`取消`}),(0,q.jsx)(XC,{size:`small`,type:`primary`,onClick:async t=>{t.stopPropagation(),await h(e.id,n.id,S),x(null),C(``)},children:`保存`})]})]}):(0,q.jsx)(QA.Paragraph,{className:yM.inlineThreadBody,children:n.body})]}),i&&b!==n.id?(0,q.jsx)(`div`,{className:yM.inlineThreadCommentActions,children:(0,q.jsx)(XC,{className:yM.threadIconBtn,type:`text`,icon:(0,q.jsx)(rA,{}),onClick:e=>{e.stopPropagation(),x(n.id),C(n.body)}})}):null]})},n.id)})},e.id)}),E&&_===E.id?(0,q.jsx)(`div`,{className:yM.inlineThreadComposer,children:(0,q.jsx)(dM,{placeholder:`继续评论...`,submitLabel:`回复`,onCancel:()=>{y(null)},onSubmit:async e=>{await m(E.id,e),y(null)}})}):null,E?(0,q.jsxs)(`div`,{className:yM.inlineThreadActions,children:[A?(0,q.jsx)(XC,{type:`primary`,className:yM.threadActionBtn,icon:(0,q.jsx)(EA,{}),onClick:e=>{e.stopPropagation(),g({type:`thread`,threadId:E.id})},children:`复制`}):null,D===`replied`?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(pj,{}),onClick:e=>{e.stopPropagation(),y(E.id)},children:`要求再改`}):null,D===`replied`?null:(0,q.jsx)(_k,{title:e.length>1?`删除这组评论?`:`删除这条评论线程?`,okText:`删除`,cancelText:`取消`,onConfirm:async()=>{for(let t of e)await p(t.id)},children:(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(eA,{}),danger:!0,onClick:e=>e.stopPropagation(),children:`删除`})}),O?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(bk,{}),onClick:e=>{e.stopPropagation(),f(E.id,`submit`)},children:`重新打开`}):null,D===`replied`?(0,q.jsx)(XC,{className:yM.threadActionBtn,icon:(0,q.jsx)(Db,{}),onClick:e=>{e.stopPropagation(),f(E.id,`resolved`)},children:`确认完成`}):null]}):null]})}var TM={inlineThreadStack:`_inlineThreadStack_1qhr1_1`};function EM({threads:e}){return e.length===0?null:(0,q.jsx)(`div`,{className:TM.inlineThreadStack,children:(0,q.jsx)(wM,{threads:e})})}var DM={diffRow:`_diffRow_res6f_1`,add:`_add_res6f_8`,remove:`_remove_res6f_11`,lineNo:`_lineNo_res6f_14`,lineSign:`_lineSign_res6f_24`,signAdd:`_signAdd_res6f_34`,signRemove:`_signRemove_res6f_37`,codeLine:`_codeLine_res6f_40`,commentTrigger:`_commentTrigger_res6f_49`};function OM({filePath:e,line:t,index:n,hunkKey:r,preferredSide:i,activeLine:a,setActiveLine:o,threads:s}){let{createThread:c}=Bj(),l=i??(t.type===`remove`?`old`:`new`),u=l===`old`?t.oldLineNumber:t.newLineNumber,d=`${r}-${l}-${u}-${n}`,f=s.filter(t=>t.anchor.type===`diff-line`&&t.anchor.filePath===e&&t.anchor.side===l&&t.anchor.lineNumber===u);return(0,q.jsxs)(`div`,{className:t.type===`add`?`${DM.diffRow} ${DM.add}`:t.type===`remove`?`${DM.diffRow} ${DM.remove}`:DM.diffRow,"data-review-anchor":`${l}:${u}`,children:[(0,q.jsx)(`button`,{className:DM.lineNo,onClick:()=>t.oldLineNumber&&o(d),children:t.oldLineNumber??``}),(0,q.jsx)(`button`,{className:DM.lineNo,onClick:()=>t.newLineNumber&&o(d),children:t.newLineNumber??``}),(0,q.jsx)(`span`,{className:t.type===`add`?`${DM.lineSign} ${DM.signAdd}`:t.type===`remove`?`${DM.lineSign} ${DM.signRemove}`:DM.lineSign,children:aM(t.type)}),(0,q.jsx)(`pre`,{className:DM.codeLine,children:t.content||` `}),u&&f.length===0?(0,q.jsx)(`button`,{className:DM.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>o(d),children:(0,q.jsx)(sj,{})}):null,a===d&&u?(0,q.jsx)(pM,{onCancel:()=>o(null),onSubmit:async t=>{await c({type:`diff-line`,filePath:e,side:l,lineNumber:u},t),o(null)}}):null,(0,q.jsx)(EM,{threads:f})]})}var kM={splitCell:`_splitCell_1mqa3_1`,add:`_add_1mqa3_11`,remove:`_remove_1mqa3_14`,emptyCell:`_emptyCell_1mqa3_17`,lineNo:`_lineNo_1mqa3_20`,lineSign:`_lineSign_1mqa3_30`,signAdd:`_signAdd_1mqa3_40`,signRemove:`_signRemove_1mqa3_43`,codeLine:`_codeLine_1mqa3_46`,commentTrigger:`_commentTrigger_1mqa3_55`};function AM({cell:e,rowKey:t,filePath:n,fileStatus:r,activeLine:i,setActiveLine:a,threads:o}){let{createThread:s}=Bj(),c=e.lineNumber?o.filter(t=>{if(t.anchor.filePath!==n)return!1;let i=Xj(t,{status:r});return i?.side===e.side&&i.lineNumber===e.lineNumber}):[],l=`${t}-${e.side}-${e.lineNumber??`empty`}`;return(0,q.jsxs)(`div`,{className:e.type===`add`?`${kM.splitCell} ${kM.add}`:e.type===`remove`?`${kM.splitCell} ${kM.remove}`:e.type===`empty`?`${kM.splitCell} ${kM.emptyCell}`:kM.splitCell,"data-review-anchor":e.lineNumber?`${e.side}:${e.lineNumber}`:void 0,children:[(0,q.jsx)(`button`,{className:kM.lineNo,onClick:()=>e.lineNumber&&a(l),children:e.lineNumber??``}),(0,q.jsx)(`span`,{className:e.type===`add`?`${kM.lineSign} ${kM.signAdd}`:e.type===`remove`?`${kM.lineSign} ${kM.signRemove}`:kM.lineSign,children:aM(e.type)}),(0,q.jsx)(`pre`,{className:kM.codeLine,children:e.content||` `}),e.lineNumber&&c.length===0?(0,q.jsx)(`button`,{className:kM.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>a(l),children:(0,q.jsx)(sj,{})}):null,i===l&&e.lineNumber?(0,q.jsx)(pM,{onCancel:()=>a(null),onSubmit:async t=>{await s({type:`diff-line`,filePath:n,side:e.side,lineNumber:e.lineNumber},t),a(null)}}):null,(0,q.jsx)(EM,{threads:c})]})}var jM={splitRow:`_splitRow_w4xv1_1`,hunkHeader:`_hunkHeader_w4xv1_5`,hunkHeaderRail:`_hunkHeaderRail_w4xv1_11`,hunkHeaderExpand:`_hunkHeaderExpand_w4xv1_20`,hunkHeaderBody:`_hunkHeaderBody_w4xv1_43`,shell:`_shell_w4xv1_50`,sidebar:`_sidebar_w4xv1_72`,threadRail:`_threadRail_w4xv1_73`,reviewPane:`_reviewPane_w4xv1_87`,brand:`_brand_w4xv1_95`,brandMark:`_brandMark_w4xv1_101`,brandCopy:`_brandCopy_w4xv1_112`,repoName:`_repoName_w4xv1_117`,productName:`_productName_w4xv1_127`,sideCard:`_sideCard_w4xv1_131`,threadRailHeader:`_threadRailHeader_w4xv1_140`,topToolbar:`_topToolbar_w4xv1_141`,threadRailTitle:`_threadRailTitle_w4xv1_149`,viewModeSwitcher:`_viewModeSwitcher_w4xv1_158`,reviewSurface:`_reviewSurface_w4xv1_164`,threadRailBody:`_threadRailBody_w4xv1_175`,emptyStateCard:`_emptyStateCard_w4xv1_180`};function MM({headerText:e,position:t,previousGap:n,nextGap:r,getGapVisibleCount:i,getGapHiddenCount:a,onExpandGap:o,onExpandGapWithAnchor:s}){function c(){let e=n?i(n)<n.hiddenCount:!1,c=r?i(r)<r.hiddenCount:!1;if(t===`top`&&n&&e){let e=a(n),t=e<=20?`展开全部 ${e} 行隐藏上下文`:`向上展开 20 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:t=>{s(n,t.currentTarget.closest(`[data-hunk-header="true"]`),{direction:e<=20?void 0:`up`,expandAll:e<=20,alignHeaderToTop:!0})},"aria-label":t,children:(0,q.jsx)(Nx,{})})}if(t===`middle`&&n&&e){let e=a(n);if(e<=20){let t=`展开全部 ${e} 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`down`),"aria-label":t,children:(0,q.jsx)(Tj,{})})}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`down`),"aria-label":`向下展开 20 行隐藏上下文`,children:(0,q.jsx)(Sj,{})}),(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:()=>o(n,`up`),"aria-label":`向上展开 20 行隐藏上下文`,children:(0,q.jsx)(Nx,{})})]})}if(t===`bottom`&&r&&c){let e=a(r);if(e<=20){let t=`展开全部 ${e} 行隐藏上下文`;return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:e=>{s(r,e.currentTarget.closest(`[data-hunk-header="true"]`),{expandAll:!0,alignHeaderToTop:!0})},"aria-label":t,children:(0,q.jsx)(Tj,{})})}return(0,q.jsx)(`button`,{className:jM.hunkHeaderExpand,type:`button`,onClick:e=>{s(r,e.currentTarget.closest(`[data-hunk-header="true"]`),{direction:`up`,alignHeaderToTop:!0})},"aria-label":`向上展开 20 行隐藏上下文`,children:(0,q.jsx)(Nx,{})})}return null}return(0,q.jsxs)(`div`,{className:jM.hunkHeader,"data-hunk-header":`true`,children:[(0,q.jsx)(`div`,{className:jM.hunkHeaderRail,children:c()}),(0,q.jsx)(`div`,{className:jM.hunkHeaderBody,children:e})]})}function NM({gap:e,filePath:t,fileStatus:n,viewMode:r,fileContents:i,activeLine:a,setActiveLine:o,threads:s,getGapDirection:c,getGapVisibleCount:l,onExpandGap:u,onExpandGapAll:d,leadingHunkHeader:f}){let p=Math.min(l(e),e.hiddenCount);e.hiddenCount-p;let m=c(e),h=tM(i,{...e,direction:m},p);return(0,q.jsxs)(v.Fragment,{children:[f,r===`inline`?h.map(({key:n,line:r},i)=>(0,q.jsx)(OM,{filePath:t,line:r,index:i,hunkKey:n,preferredSide:e.mode===`old`?`old`:`new`,activeLine:a,setActiveLine:o,threads:s},`${n}-${i}`)):h.map(({key:e,line:r})=>(0,q.jsxs)(`div`,{className:jM.splitRow,children:[(0,q.jsx)(AM,{cell:r.oldLineNumber?{lineNumber:r.oldLineNumber,content:r.content,type:`context`,side:`old`}:{content:``,type:`empty`,side:`old`},rowKey:e,filePath:t,fileStatus:n,activeLine:a,setActiveLine:o,threads:s}),(0,q.jsx)(AM,{cell:r.newLineNumber?{lineNumber:r.newLineNumber,content:r.content,type:`context`,side:`new`}:{content:``,type:`empty`,side:`new`},rowKey:e,filePath:t,fileStatus:n,activeLine:a,setActiveLine:o,threads:s})]},e))]})}var PM={diffCard:`_diffCard_b316o_1`,hunk:`_hunk_b316o_7`,splitTable:`_splitTable_b316o_14`,splitRow:`_splitRow_b316o_17`};function FM(e,t){return Math.min(t[e.key]??0,e.hiddenCount)}function IM(e,t){return t[e.key]??e.direction}function LM({file:e,threads:t,locateTarget:n,expandAllRequest:r,onExpandedContextChange:i,viewMode:a}){let[o,s]=v.useState(null),[c,l]=v.useState({}),[u,d]=v.useState({}),f=Kj(e.path,e.snapshotHash),p=v.useRef(null),m=v.useRef(``),h=v.useRef(``),g=v.useMemo(()=>eM(e,f),[e,f]),_=v.useMemo(()=>{let e=new Map;return g.forEach(t=>{e.set(t.position,t)}),e},[g]),y=v.useMemo(()=>nM(e,_),[e,_]),b=v.useMemo(()=>g.some(e=>Math.min(c[e.key]??0,e.hiddenCount)>0),[g,c]);v.useLayoutEffect(()=>{p.current&&rM(p.current),s(null),l({}),d({}),h.current=``},[e.path,e.snapshotHash]),v.useEffect(()=>{if(!r||r.filePath!==e.path)return;let t=`${r.filePath}:${r.requestId}`;if(h.current!==t){if(h.current=t,b){l({}),d({});return}l(e=>{let t={...e};return g.forEach(e=>{t[e.key]=e.hiddenCount}),t})}},[r,e.path,g,b]),v.useEffect(()=>{i(e.path,b)},[e.path,b,i]),cM({file:e,filePath:e.path,viewMode:a,threads:t,fileContents:f,gapDescriptors:g,expandedGapLines:c,setExpandedGapLines:l,scrollRef:p,autoScrollKeyRef:m}),lM({file:e,filePath:e.path,locateTarget:n,viewMode:a,fileContents:f,gapDescriptors:g,expandedGapLines:c,setExpandedGapLines:l,scrollRef:p});function x(e,t,n){let r=p.current,i=n?.alignHeaderToTop??!1;n?.expandAll?C(e,n.direction):S(e,n?.direction),!(!i||!r||!t)&&window.requestAnimationFrame(()=>{let e=r.getBoundingClientRect().top,n=t.getBoundingClientRect().top;r.scrollTop+=n-e})}function S(e,t){t&&d(n=>({...n,[e.key]:t})),l(t=>{let n=Math.min(t[e.key]??0,e.hiddenCount),r=e.hiddenCount-n,i=Math.min(20,r||e.hiddenCount);return{...t,[e.key]:Math.min(e.hiddenCount,n+i)}})}function C(e,t){t&&d(n=>({...n,[e.key]:t})),l(t=>({...t,[e.key]:e.hiddenCount}))}function w(e){return Math.max(0,e.hiddenCount-FM(e,c))}function T(e){let t=_.get(e);return t?w(t)>0:!1}function E(e){let t=_.get(e);return t?FM(t,c)>0&&w(t)>0&&IM(t,u)===`up`:!1}function D(e,t){let n=_.get(t);if(!n)return e.header;let r=FM(n,c),i=w(n);return r<=0?`${e.header} · 已隐藏 ${i} 行上下文`:`${e.header} · 已展开 ${r}/${n.hiddenCount} 行上下文`}function O(t,n){let r=_.get(n),i=n===e.hunks.length-1?_.get(`tail`):_.get(n+1),a=n===0?`top`:`middle`;return(0,q.jsx)(MM,{headerText:D(t,n),position:a,previousGap:r,nextGap:i,getGapVisibleCount:e=>FM(e,c),getGapHiddenCount:w,onExpandGap:S,onExpandGapWithAnchor:x})}return(0,q.jsx)(`div`,{className:PM.diffCard,ref:p,children:y.map(n=>n.type===`gap`?(0,q.jsx)(NM,{gap:n.gap,filePath:e.path,fileStatus:e.status,viewMode:a,fileContents:f,activeLine:o,setActiveLine:s,threads:t,getGapDirection:e=>IM(e,u),getGapVisibleCount:e=>FM(e,c),onExpandGap:S,onExpandGapAll:C,leadingHunkHeader:n.nextHunk&&n.nextIndex!=null&&E(n.nextIndex)?O(n.nextHunk,n.nextIndex):null},n.key):(0,q.jsx)(`div`,{className:PM.hunk,children:(()=>{let r=T(n.index),i=E(n.index);return(0,q.jsxs)(q.Fragment,{children:[r&&!i?O(n.hunk,n.index):null,a===`inline`?n.hunk.lines.map((r,i)=>(0,q.jsx)(OM,{filePath:e.path,line:r,index:i,hunkKey:n.key,activeLine:o,setActiveLine:s,threads:t},`${n.key}-${i}`)):(0,q.jsx)(`div`,{className:PM.splitTable,children:oM(n.hunk).map(n=>(0,q.jsxs)(`div`,{className:PM.splitRow,children:[(0,q.jsx)(AM,{cell:n.oldCell,rowKey:n.key,filePath:e.path,fileStatus:e.status,activeLine:o,setActiveLine:s,threads:t}),(0,q.jsx)(AM,{cell:n.newCell,rowKey:n.key,filePath:e.path,fileStatus:e.status,activeLine:o,setActiveLine:s,threads:t})]},n.key))})]})})()},n.key))})}var RM=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),zM=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),BM=o(((e,t)=>{var n=zM(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),VM=o(((e,t)=>{var n=BM();t.exports=function(){return n.Date.now()}})),HM=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),UM=o(((e,t)=>{var n=HM(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),WM=o(((e,t)=>{t.exports=BM().Symbol})),GM=o(((e,t)=>{var n=WM(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),KM=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),qM=o(((e,t)=>{var n=WM(),r=GM(),i=KM(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),JM=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),YM=o(((e,t)=>{var n=qM(),r=JM(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),XM=o(((e,t)=>{var n=UM(),r=RM(),i=YM(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),ZM=l(o(((e,t)=>{var n=RM(),r=VM(),i=XM(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c}))(),1);function QM(e){return e.mode.kind===`revision`?`范围:${e.mode.base}..${e.mode.target}`:e.mode.kind===`staged`?`范围:暂存区`:e.mode.kind===`working`?`范围:工作区`:`范围:未知`}function $M(e){return e.anchor.type===`file`?e.filePath:e.anchor.type===`diff-line`?`${e.filePath}:${e.anchor.side}:${e.anchor.lineNumber}`:`${e.filePath}:${e.anchor.lineNumber}`}function eN(e){return e===`added`?`A`:e===`modified`?`M`:e===`deleted`?`D`:e===`renamed`?`R`:e}function tN(e,t,n){if(e.length<=t)return e;let r=Math.min(n,t-4),i=t-r-3;return`${e.slice(0,i)}...${e.slice(-r)}`}function nN(e){let t={name:``,path:``,isDirectory:!0,children:[]};e.forEach(e=>{let n=e.path.split(`/`).filter(Boolean),r=t;n.forEach((t,i)=>{let a=i===n.length-1,o=n.slice(0,i+1).join(`/`);r.children??=[];let s=r.children.find(e=>e.name===t);s||(s={name:t,path:o,isDirectory:!a,children:a?void 0:[],file:a?e:void 0},r.children.push(s)),r=s})});let n=e=>{if(!e.isDirectory||!e.children)return e;let t=e.children.map(n);if(e.name&&t.length===1&&t[0]?.isDirectory&&t[0].children){let n=t[0];return{...e,name:`${e.name}/${n.name}`,path:n.path,children:n.children}}return{...e,children:t}};return n(t)}function rN(e){return!e.isDirectory||!e.children?[]:[...e.path?[e.path]:[],...e.children.flatMap(e=>rN(e))]}function iN(e,t){return e.file?t.get(e.file.path)??0:e.children?.reduce((e,n)=>e+iN(n,t),0)??0}function aN(e,t){let n=t.trim().toLowerCase();if(!n)return e;if(e.file)return e.file.path.toLowerCase().includes(n)?e:null;if(e.path.toLowerCase().includes(n)||e.name.toLowerCase().includes(n))return e;let r=e.children?.map(e=>aN(e,n)).filter(e=>!!e);return r?.length?{...e,children:r}:null}var oN={fileRailHeader:`_fileRailHeader_1rouv_1`,fileRailModeSwitcher:`_fileRailModeSwitcher_1rouv_8`,fileSearch:`_fileSearch_1rouv_15`,fileSearchIcon:`_fileSearchIcon_1rouv_19`,fileList:`_fileList_1rouv_22`,fileItem:`_fileItem_1rouv_28`,fileItemActive:`_fileItemActive_1rouv_38`,lineItemActive:`_lineItemActive_1rouv_42`,fileTree:`_fileTree_1rouv_46`,fileTreeDirectory:`_fileTreeDirectory_1rouv_49`,fileTreeChevron:`_fileTreeChevron_1rouv_66`,fileTreeFolderIcon:`_fileTreeFolderIcon_1rouv_72`,fileIcon:`_fileIcon_1rouv_77`,fileStatusBadge:`_fileStatusBadge_1rouv_80`,fileStatusBadgeA:`_fileStatusBadgeA_1rouv_92`,fileStatusBadgeM:`_fileStatusBadgeM_1rouv_96`,fileStatusBadgeD:`_fileStatusBadgeD_1rouv_100`,fileStatusBadgeR:`_fileStatusBadgeR_1rouv_104`,fileTreeDirectoryName:`_fileTreeDirectoryName_1rouv_108`,fileMeta:`_fileMeta_1rouv_116`,fileName:`_fileName_1rouv_126`,fileStats:`_fileStats_1rouv_135`,fileStatAdd:`_fileStatAdd_1rouv_138`,fileStatDelete:`_fileStatDelete_1rouv_142`,fileThreadCount:`_fileThreadCount_1rouv_146`};function sN({files:e,threads:t,selectedPath:n,onSelectFile:r}){let[i,a]=v.useState(`list`),[o,s]=v.useState(``),[c,l]=v.useState(``),[u,d]=v.useState(()=>new Set),f=v.useMemo(()=>(0,ZM.default)(e=>l(e),200),[]),p=c.trim().toLowerCase(),m=p.length>0,h=v.useMemo(()=>nN(e),[e]),g=v.useMemo(()=>m?e.filter(e=>e.path.toLowerCase().includes(p)):e,[e,m,p]),_=v.useMemo(()=>m?aN(h,p):h,[h,m,p]),y=v.useMemo(()=>{let n=new Map;return e.forEach(e=>{n.set(e.path,t.filter(t=>hM(t,e)&&t.status!==`resolved`).length)}),n},[e,t]);v.useEffect(()=>{f(o)},[f,o]),v.useEffect(()=>()=>{f.cancel()},[f]),v.useEffect(()=>{m||d(new Set(rN(h)))},[h,m]),v.useEffect(()=>{!m||!_||d(new Set(rN(_)))},[m,_]);function b(e){d(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function x(e){s(e.target.value)}function S(){f.cancel(),l(o)}function C(e,t=e.path,i=!1){let a=e.path===n,o=y.get(e.path)??0,s=[oN.fileItem,a&&i?oN.fileItemActive:``,a&&!i?oN.lineItemActive:``].filter(Boolean).join(` `);return(0,q.jsx)(YO.Item,{className:s,onClick:()=>r(e.path),children:(0,q.jsxs)(`div`,{className:oN.fileMeta,children:[i?(0,q.jsx)(Mk,{className:oN.fileIcon}):null,i?null:(0,q.jsx)(`span`,{className:`${oN.fileStatusBadge} ${oN[`fileStatusBadge${eN(e.status)}`]}`,children:eN(e.status)}),(0,q.jsx)(Sx,{title:i?void 0:e.path,children:(0,q.jsx)(QA.Text,{strong:!0,className:oN.fileName,title:e.path,children:i?t:tN(e.path,36,18)})}),(0,q.jsxs)(QA.Text,{className:oN.fileStats,type:`secondary`,children:[(0,q.jsxs)(`span`,{className:oN.fileStatAdd,children:[`+`,e.additions]}),` / `,(0,q.jsxs)(`span`,{className:oN.fileStatDelete,children:[`-`,e.deletions]})]}),o>0?(0,q.jsx)(Zk,{className:oN.fileThreadCount,icon:(0,q.jsx)(sj,{}),children:o}):null]})})}function w(e,t=0){if(e.file)return(0,q.jsx)(`div`,{style:{paddingLeft:t*18},children:C(e.file,e.name,!0)},e.file.path);if(!e.children?.length)return null;if(!e.path)return e.children.map(e=>w(e,t));let n=u.has(e.path),r=iN(e,y);return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`button`,{type:`button`,className:oN.fileTreeDirectory,style:{paddingLeft:t*18+8},onClick:()=>b(e.path),children:[n?(0,q.jsx)(Ab,{className:oN.fileTreeChevron}):(0,q.jsx)(Qf,{className:oN.fileTreeChevron}),n?(0,q.jsx)(Fk,{className:oN.fileTreeFolderIcon}):(0,q.jsx)(Rk,{className:oN.fileTreeFolderIcon}),(0,q.jsx)(QA.Text,{strong:!0,className:oN.fileTreeDirectoryName,title:e.path,children:e.name}),r>0?(0,q.jsx)(Zk,{className:oN.fileThreadCount,icon:(0,q.jsx)(sj,{}),children:r}):null]}),n?e.children.map(e=>w(e,t+1)):null]},e.path)}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:oN.fileRailHeader,children:[(0,q.jsx)(QA.Text,{strong:!0,children:`文件列表`}),(0,q.jsx)(fE,{className:oN.fileRailModeSwitcher,size:`small`,options:[{value:`list`,icon:(0,q.jsx)(yj,{})},{value:`tree`,icon:(0,q.jsx)(tj,{})}],value:i,onChange:e=>a(e)})]}),(0,q.jsx)(PD,{className:oN.fileSearch,placeholder:`搜索文件路径`,allowClear:!0,prefix:(0,q.jsx)(Nb,{className:oN.fileSearchIcon}),value:o,onChange:x,onPressEnter:S}),i===`list`?(0,q.jsx)(YO,{className:oN.fileList,dataSource:g,locale:{emptyText:(0,q.jsx)(cb,{image:cb.PRESENTED_IMAGE_SIMPLE,description:`没有匹配的文件`})},renderItem:e=>C(e)}):(0,q.jsx)(`div`,{className:`${oN.fileList} ${oN.fileTree}`,role:`tree`,children:_?w(_):(0,q.jsx)(cb,{image:cb.PRESENTED_IMAGE_SIMPLE,description:`没有匹配的文件`})})]})}var cN={fileHeader:`_fileHeader_yun72_1`,headerTop:`_headerTop_yun72_9`,filePathBlock:`_filePathBlock_yun72_15`,filePathText:`_filePathText_yun72_21`,fileExpandBtn:`_fileExpandBtn_yun72_25`,filePathCopyBtn:`_filePathCopyBtn_yun72_33`,headerActions:`_headerActions_yun72_40`,headerAction:`_headerAction_yun72_40`,threadCount:`_threadCount_yun72_52`,fileLevelInlineThreads:`_fileLevelInlineThreads_yun72_55`};function lN({file:e,threads:t,showToggleAllLines:n,hasExpandedContext:r,onToggleAllLines:i}){let{copyPrompt:a,createThread:o}=Bj(),[s,c]=v.useState(!1),[l,u]=uk.useMessage(),d=r?`隐藏当前文件未改动行`:`展开当前文件所有未改动行`,f=r?`隐藏当前文件未改动行`:`展开当前文件所有未改动行`,p=t.filter(t=>t.filePath===e.path&&t.status!==`resolved`),m=t.filter(t=>t.filePath===e.path&&t.anchor.type===`file`);async function h(){await navigator.clipboard.writeText(e.path),l.success(`完整文件路径已复制到剪贴板`)}return(0,q.jsxs)(WT,{className:cN.fileHeader,children:[u,(0,q.jsxs)(`div`,{className:cN.headerTop,children:[(0,q.jsxs)(`div`,{className:cN.filePathBlock,children:[n?(0,q.jsx)(Sx,{title:d,children:(0,q.jsx)(XC,{className:cN.fileExpandBtn,type:`text`,icon:r?(0,q.jsx)(gj,{}):(0,q.jsx)(ij,{}),"aria-label":f,onClick:()=>i(e.path)})}):null,(0,q.jsx)(QA.Text,{strong:!0,className:cN.filePathText,children:e.path}),(0,q.jsx)(XC,{className:cN.filePathCopyBtn,type:`text`,icon:(0,q.jsx)(EA,{}),"aria-label":`复制完整文件路径`,onClick:()=>void h()})]}),(0,q.jsxs)(`div`,{className:cN.headerActions,children:[(0,q.jsx)(XC,{disabled:p.length===0,type:`primary`,className:cN.headerAction,icon:(0,q.jsx)(EA,{}),onClick:()=>void a({type:`file-unresolved`,filePath:e.path}),children:`批量提交当前文件的review`}),(0,q.jsx)(XC,{className:cN.headerAction,icon:(0,q.jsx)(sj,{}),type:s?`primary`:`default`,onClick:()=>c(e=>!e),children:`文件级评论`})]})]}),s?(0,q.jsx)(dM,{style:{marginTop:16},placeholder:`请输入文件级审查评论...`,onSubmit:async t=>{await o({type:`file`,filePath:e.path},t),c(!1)},onCancel:()=>c(!1)}):null,p.length>0?(0,q.jsxs)(Zk,{className:cN.threadCount,color:`gold`,children:[p.length,` 个评论线程`]}):null,m.length>0?(0,q.jsx)(`div`,{className:cN.fileLevelInlineThreads,children:(0,q.jsx)(wM,{threads:m,variant:`fileLevel`})}):null]})}function uN(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function dN(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var fN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mN={};function hN(e,t){return((t||mN).jsx?pN:fN).test(e)}var gN=/[ \t\n\f\r]/g;function _N(e){return typeof e==`object`?e.type===`text`?vN(e.value):!1:vN(e)}function vN(e){return e.replace(gN,``)===``}var yN=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};yN.prototype.normal={},yN.prototype.property={},yN.prototype.space=void 0;function bN(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new yN(n,r,t)}function xN(e){return e.toLowerCase()}var SN=class{constructor(e,t){this.attribute=t,this.property=e}};SN.prototype.attribute=``,SN.prototype.booleanish=!1,SN.prototype.boolean=!1,SN.prototype.commaOrSpaceSeparated=!1,SN.prototype.commaSeparated=!1,SN.prototype.defined=!1,SN.prototype.mustUseProperty=!1,SN.prototype.number=!1,SN.prototype.overloadedBoolean=!1,SN.prototype.property=``,SN.prototype.spaceSeparated=!1,SN.prototype.space=void 0;var CN=s({boolean:()=>TN,booleanish:()=>EN,commaOrSpaceSeparated:()=>jN,commaSeparated:()=>AN,number:()=>ON,overloadedBoolean:()=>DN,spaceSeparated:()=>kN}),wN=0,TN=MN(),EN=MN(),DN=MN(),ON=MN(),kN=MN(),AN=MN(),jN=MN();function MN(){return 2**++wN}var NN=Object.keys(CN),PN=class extends SN{constructor(e,t,n,r){let i=-1;if(super(e,t),FN(this,`space`,r),typeof n==`number`)for(;++i<NN.length;){let e=NN[i];FN(this,NN[i],(n&CN[e])===CN[e])}}};PN.prototype.defined=!0;function FN(e,t,n){n&&(e[t]=n)}function IN(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new PN(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xN(r)]=r,n[xN(a.attribute)]=r}return new yN(t,n,e.space)}var LN=IN({properties:{ariaActiveDescendant:null,ariaAtomic:EN,ariaAutoComplete:null,ariaBusy:EN,ariaChecked:EN,ariaColCount:ON,ariaColIndex:ON,ariaColSpan:ON,ariaControls:kN,ariaCurrent:null,ariaDescribedBy:kN,ariaDetails:null,ariaDisabled:EN,ariaDropEffect:kN,ariaErrorMessage:null,ariaExpanded:EN,ariaFlowTo:kN,ariaGrabbed:EN,ariaHasPopup:null,ariaHidden:EN,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kN,ariaLevel:ON,ariaLive:null,ariaModal:EN,ariaMultiLine:EN,ariaMultiSelectable:EN,ariaOrientation:null,ariaOwns:kN,ariaPlaceholder:null,ariaPosInSet:ON,ariaPressed:EN,ariaReadOnly:EN,ariaRelevant:null,ariaRequired:EN,ariaRoleDescription:kN,ariaRowCount:ON,ariaRowIndex:ON,ariaRowSpan:ON,ariaSelected:EN,ariaSetSize:ON,ariaSort:null,ariaValueMax:ON,ariaValueMin:ON,ariaValueNow:ON,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function RN(e,t){return t in e?e[t]:t}function zN(e,t){return RN(e,t.toLowerCase())}var BN=IN({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:AN,acceptCharset:kN,accessKey:kN,action:null,allow:null,allowFullScreen:TN,allowPaymentRequest:TN,allowUserMedia:TN,alt:null,as:null,async:TN,autoCapitalize:null,autoComplete:kN,autoFocus:TN,autoPlay:TN,blocking:kN,capture:null,charSet:null,checked:TN,cite:null,className:kN,cols:ON,colSpan:null,content:null,contentEditable:EN,controls:TN,controlsList:kN,coords:ON|AN,crossOrigin:null,data:null,dateTime:null,decoding:null,default:TN,defer:TN,dir:null,dirName:null,disabled:TN,download:DN,draggable:EN,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:TN,formTarget:null,headers:kN,height:ON,hidden:DN,high:ON,href:null,hrefLang:null,htmlFor:kN,httpEquiv:kN,id:null,imageSizes:null,imageSrcSet:null,inert:TN,inputMode:null,integrity:null,is:null,isMap:TN,itemId:null,itemProp:kN,itemRef:kN,itemScope:TN,itemType:kN,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:TN,low:ON,manifest:null,max:null,maxLength:ON,media:null,method:null,min:null,minLength:ON,multiple:TN,muted:TN,name:null,nonce:null,noModule:TN,noValidate:TN,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:TN,optimum:ON,pattern:null,ping:kN,placeholder:null,playsInline:TN,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:TN,referrerPolicy:null,rel:kN,required:TN,reversed:TN,rows:ON,rowSpan:ON,sandbox:kN,scope:null,scoped:TN,seamless:TN,selected:TN,shadowRootClonable:TN,shadowRootDelegatesFocus:TN,shadowRootMode:null,shape:null,size:ON,sizes:null,slot:null,span:ON,spellCheck:EN,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ON,step:null,style:null,tabIndex:ON,target:null,title:null,translate:null,type:null,typeMustMatch:TN,useMap:null,value:EN,width:ON,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kN,axis:null,background:null,bgColor:null,border:ON,borderColor:null,bottomMargin:ON,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:TN,declare:TN,event:null,face:null,frame:null,frameBorder:null,hSpace:ON,leftMargin:ON,link:null,longDesc:null,lowSrc:null,marginHeight:ON,marginWidth:ON,noResize:TN,noHref:TN,noShade:TN,noWrap:TN,object:null,profile:null,prompt:null,rev:null,rightMargin:ON,rules:null,scheme:null,scrolling:EN,standby:null,summary:null,text:null,topMargin:ON,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ON,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:TN,disableRemotePlayback:TN,prefix:null,property:null,results:ON,security:null,unselectable:null},space:`html`,transform:zN}),VN=IN({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:jN,accentHeight:ON,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ON,amplitude:ON,arabicForm:null,ascent:ON,attributeName:null,attributeType:null,azimuth:ON,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ON,by:null,calcMode:null,capHeight:ON,className:kN,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:ON,diffuseConstant:ON,direction:null,display:null,dur:null,divisor:ON,dominantBaseline:null,download:TN,dx:null,dy:null,edgeMode:null,editable:null,elevation:ON,enableBackground:null,end:null,event:null,exponent:ON,externalResourcesRequired:null,fill:null,fillOpacity:ON,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:AN,g2:AN,glyphName:AN,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ON,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ON,horizOriginX:ON,horizOriginY:ON,id:null,ideographic:ON,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ON,k:ON,k1:ON,k2:ON,k3:ON,k4:ON,kernelMatrix:jN,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ON,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:ON,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:ON,overlineThickness:ON,paintOrder:null,panose1:null,path:null,pathLength:ON,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kN,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ON,pointsAtY:ON,pointsAtZ:ON,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jN,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jN,rev:jN,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jN,requiredFeatures:jN,requiredFonts:jN,requiredFormats:jN,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:ON,specularExponent:ON,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ON,strikethroughThickness:ON,string:null,stroke:null,strokeDashArray:jN,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ON,strokeOpacity:ON,strokeWidth:null,style:null,surfaceScale:ON,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jN,tabIndex:ON,tableValues:null,target:null,targetX:ON,targetY:ON,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jN,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ON,underlineThickness:ON,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ON,values:null,vAlphabetic:ON,vMathematical:ON,vectorEffect:null,vHanging:ON,vIdeographic:ON,version:null,vertAdvY:ON,vertOriginX:ON,vertOriginY:ON,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ON,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:RN}),HN=IN({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()}}),UN=IN({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:zN}),WN=IN({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),GN={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`},KN=/[A-Z]/g,qN=/-[a-z]/g,JN=/^data[-\w.:]+$/i;function YN(e,t){let n=xN(t),r=t,i=SN;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&JN.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(qN,ZN);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!qN.test(e)){let n=e.replace(KN,XN);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=PN}return new i(r,t)}function XN(e){return`-`+e.toLowerCase()}function ZN(e){return e.charAt(1).toUpperCase()}var QN=bN([LN,BN,HN,UN,WN],`html`),$N=bN([LN,VN,HN,UN,WN],`svg`);function eP(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tP(e){return e.join(` `).trim()}var nP=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
259
259
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),rP=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(nP());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),iP=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),aP=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(rP()),r=iP();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),oP=cP(`end`),sP=cP(`start`);function cP(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function lP(e){let t=sP(e),n=oP(e);if(t&&n)return{start:t,end:n}}function uP(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?dP(e):``}function dP(e){return pP(e&&e.line)+`:`+pP(e&&e.column)}function fP(e){return dP(e&&e.start)+`-`+dP(e&&e.end)}function pP(e){return e&&typeof e==`number`?e:1}var mP=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=uP(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};mP.prototype.file=``,mP.prototype.name=``,mP.prototype.reason=``,mP.prototype.message=``,mP.prototype.stack=``,mP.prototype.column=void 0,mP.prototype.line=void 0,mP.prototype.ancestors=void 0,mP.prototype.cause=void 0,mP.prototype.fatal=void 0,mP.prototype.place=void 0,mP.prototype.ruleId=void 0,mP.prototype.source=void 0;var hP=l(aP(),1),gP={}.hasOwnProperty,_P=new Map,vP=/[A-Z]/g,yP=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bP=new Set([`td`,`th`]),xP=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function SP(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=NP(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=MP(n,t.jsx,t.jsxs)}let 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`?$N:QN,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=CP(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function CP(e,t,n){if(t.type===`element`)return wP(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return TP(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return DP(e,t,n);if(t.type===`mdxjsEsm`)return EP(e,t);if(t.type===`root`)return OP(e,t,n);if(t.type===`text`)return kP(e,t)}function wP(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=$N,e.schema=i),e.ancestors.push(t);let a=zP(e,t.tagName,!1),o=PP(e,t),s=IP(e,t);return yP.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!_N(e):!0})),AP(e,o,a,t),jP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function TP(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}BP(e,t.position)}function EP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);BP(e,t.position)}function DP(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=$N,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:zP(e,t.name,!0),o=FP(e,t),s=IP(e,t);return AP(e,o,a,t),jP(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function OP(e,t,n){let r={};return jP(r,IP(e,t)),e.create(t,e.Fragment,r,n)}function kP(e,t){return t.value}function AP(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jP(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function MP(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function NP(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=sP(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function PP(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&gP.call(t.properties,i)){let a=LP(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bP.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function FP(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else BP(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else BP(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function IP(e,t){let n=[],r=-1,i=e.passKeys?new Map:_P;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=CP(e,a,o);s!==void 0&&n.push(s)}return n}function LP(e,t,n){let r=YN(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?dN(n):tP(n)),r.property===`style`){let t=typeof n==`object`?n:RP(e,String(n));return e.stylePropertyNameCase===`css`&&(t=VP(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?GN[r.property]||r.property:r.attribute,n]}}function RP(e,t){try{return(0,hP.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new mP("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=xP+`#cannot-parse-style-attribute`,r}}function zP(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=hN(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=hN(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return gP.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);BP(e)}function BP(e,t){let n=new mP("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=xP+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function VP(e){let t={},n;for(n in e)gP.call(e,n)&&(t[HP(n)]=e[n]);return t}function HP(e){let t=e.replace(vP,UP);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function UP(e){return`-`+e.toLowerCase()}var WP={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`]},GP={};function KP(e,t){let n=t||GP;return qP(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function qP(e,t,n){if(YP(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 JP(e.children,t,n)}return Array.isArray(e)?JP(e,t,n):``}function JP(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=qP(e[i],t,n);return r.join(``)}function YP(e){return!!(e&&typeof e==`object`)}var XP=document.createElement(`i`);function ZP(e){let t=`&`+e+`;`;XP.innerHTML=t;let n=XP.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function QP(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function $P(e,t){return e.length>0?(QP(e,e.length,0,t),e):t}var eF={}.hasOwnProperty;function tF(e){let t={},n=-1;for(;++n<e.length;)nF(t,e[n]);return t}function nF(e,t){let n;for(n in t){let r=(eF.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){eF.call(r,a)||(r[a]=[]);let e=i[a];rF(r[a],Array.isArray(e)?e:e?[e]:[])}}}function rF(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);QP(e,0,0,r)}function iF(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function aF(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var oF=vF(/[A-Za-z]/),sF=vF(/[\dA-Za-z]/),cF=vF(/[#-'*+\--9=?A-Z^-~]/);function lF(e){return e!==null&&(e<32||e===127)}var uF=vF(/\d/),dF=vF(/[\dA-Fa-f]/),fF=vF(/[!-/:-@[-`{-~]/);function pF(e){return e!==null&&e<-2}function mF(e){return e!==null&&(e<0||e===32)}function hF(e){return e===-2||e===-1||e===32}var gF=vF(/\p{P}|\p{S}/u),_F=vF(/\s/);function vF(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function yF(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&sF(e.charCodeAt(n+1))&&sF(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function bF(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return hF(r)?(e.enter(n),s(r)):t(r)}function s(r){return hF(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var xF={tokenize:SF};function SF(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),bF(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return pF(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var CF={tokenize:TF},wF={tokenize:EF};function TF(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return QP(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wF,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(wF,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return pF(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;QP(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function EF(e,t,n){return bF(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function DF(e){if(e===null||mF(e)||_F(e))return 1;if(gF(e))return 2}function OF(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var kF={name:`attention`,resolveAll:AF,tokenize:jF};function AF(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};MF(d,-c),MF(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=$P(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=$P(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=$P(l,OF(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=$P(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=$P(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,QP(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function jF(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=DF(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=DF(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function MF(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var NF={name:`autolink`,tokenize:PF};function PF(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return oF(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||sF(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||sF(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||lF(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):cF(t)?(e.consume(t),l):n(t)}function u(e){return sF(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||sF(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var FF={partial:!0,tokenize:IF};function IF(e,t,n){return r;function r(t){return hF(t)?bF(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||pF(e)?t(e):n(e)}}var LF={continuation:{tokenize:zF},exit:BF,name:`blockQuote`,tokenize:RF};function RF(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return hF(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function zF(e,t,n){let r=this;return i;function i(t){return hF(t)?bF(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(LF,t,n)(r)}}function BF(e){e.exit(`blockQuote`)}var VF={name:`characterEscape`,tokenize:HF};function HF(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return fF(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var UF={name:`characterReference`,tokenize:WF};function WF(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=sF,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=dF,u):(e.enter(`characterReferenceValue`),a=7,o=uF,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===sF&&!ZP(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var GF={partial:!0,tokenize:JF},KF={concrete:!0,name:`codeFenced`,tokenize:qF};function qF(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),hF(t)?bF(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||pF(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(GF,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||pF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):hF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),bF(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||pF(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||pF(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&hF(t)?bF(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||pF(t)?e.check(GF,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||pF(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),hF(t)?bF(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),hF(t)?bF(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||pF(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function JF(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var YF={name:`codeIndented`,tokenize:ZF},XF={partial:!0,tokenize:QF};function ZF(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),bF(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):pF(t)?e.attempt(XF,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||pF(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function QF(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):pF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):bF(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):pF(e)?i(e):n(e)}}var $F={name:`codeText`,previous:tI,resolve:eI,tokenize:nI};function eI(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 tI(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function nI(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):pF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||pF(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var rI=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&iI(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),iI(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),iI(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);iI(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);iI(this.left,t.reverse())}}};function iI(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 aI(e){let t={},n=-1,r,i,a,o,s,c,l,u=new rI(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,oI(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return QP(e,0,1/0,u.slice(0)),!l}function oI(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var sI={resolve:lI,tokenize:uI},cI={partial:!0,tokenize:dI};function lI(e){return aI(e),e}function uI(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):pF(t)?e.check(cI,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function dI(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bF(e,a,`linePrefix`)}function a(i){if(i===null||pF(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function fI(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||lF(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||pF(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||mF(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||lF(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function pI(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):pF(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||pF(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!hF(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function mI(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):pF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),bF(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||pF(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function hI(e,t){let n;return r;function r(i){return pF(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):hF(i)?bF(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var gI={name:`definition`,tokenize:vI},_I={partial:!0,tokenize:yI};function vI(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return pI.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=aF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return mF(t)?hI(e,l)(t):l(t)}function l(t){return fI(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(_I,d,d)(t)}function d(t){return hF(t)?bF(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||pF(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function yI(e,t,n){return r;function r(t){return mF(t)?hI(e,i)(t):n(t)}function i(t){return mI(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return hF(t)?bF(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||pF(e)?t(e):n(e)}}var bI={name:`hardBreakEscape`,tokenize:xI};function xI(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return pF(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var SI={name:`headingAtx`,resolve:CI,tokenize:wI};function CI(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},QP(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function wI(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||mF(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||pF(n)?(e.exit(`atxHeading`),t(n)):hF(n)?bF(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||mF(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var TI=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),EI=[`pre`,`script`,`style`,`textarea`],DI={concrete:!0,name:`htmlFlow`,resolveTo:AI,tokenize:jI},OI={partial:!0,tokenize:NI},kI={partial:!0,tokenize:MI};function AI(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 jI(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):oF(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):oF(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return oF(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||mF(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&EI.includes(l)?(i=1,r.interrupt?t(s):O(s)):TI.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||sF(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return hF(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||oF(t)?(e.consume(t),b):hF(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||sF(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):hF(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):hF(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||pF(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||mF(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||hF(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||pF(t)?O(t):hF(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):pF(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(OI,R,k)(t)):t===null||pF(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(kI,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||pF(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return EI.includes(n)?(e.consume(t),L):O(t)}return oF(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||pF(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function MI(e,t,n){let r=this;return i;function i(t){return pF(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function NI(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(FF,t,n)}}var PI={name:`htmlText`,tokenize:FI};function FI(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):oF(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):oF(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):pF(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):pF(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):pF(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):pF(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return oF(t)?(e.consume(t),S):n(t)}function S(t){return t===45||sF(t)?(e.consume(t),S):C(t)}function C(t){return pF(t)?(o=C,N(t)):hF(t)?(e.consume(t),C):M(t)}function w(t){return t===45||sF(t)?(e.consume(t),w):t===47||t===62||mF(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||oF(t)?(e.consume(t),E):pF(t)?(o=T,N(t)):hF(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||sF(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):pF(t)?(o=D,N(t)):hF(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):pF(t)?(o=O,N(t)):hF(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):pF(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||mF(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||mF(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return hF(t)?bF(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var II={name:`labelEnd`,resolveAll:BI,resolveTo:VI,tokenize:HI},LI={tokenize:UI},RI={tokenize:WI},zI={tokenize:GI};function BI(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&QP(e,0,e.length,n),e}function VI(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=$P(s,e.slice(a+1,a+r+3)),s=$P(s,[[`enter`,u,t]]),s=$P(s,OF(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=$P(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=$P(s,e.slice(o+1)),s=$P(s,[[`exit`,c,t]]),QP(e,a,e.length,s),e}function HI(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(aF(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(LI,u,o?u:d)(t):t===91?e.attempt(RI,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(zI,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function UI(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return mF(t)?hI(e,a)(t):a(t)}function a(t){return t===41?u(t):fI(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return mF(t)?hI(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?mI(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return mF(t)?hI(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function WI(e,t,n){let r=this;return i;function i(t){return pI.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(aF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function GI(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var KI={name:`labelStartImage`,resolveAll:II.resolveAll,tokenize:qI};function qI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var JI={name:`labelStartLink`,resolveAll:II.resolveAll,tokenize:YI};function YI(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var XI={name:`lineEnding`,tokenize:ZI};function ZI(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),bF(e,t,`linePrefix`)}}var QI={name:`thematicBreak`,tokenize:$I};function $I(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||pF(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),hF(t)?bF(e,s,`whitespace`)(t):s(t))}}var eL={continuation:{tokenize:iL},exit:oL,name:`list`,tokenize:rL},tL={partial:!0,tokenize:sL},nL={partial:!0,tokenize:aL};function rL(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:uF(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(QI,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return uF(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(FF,r.interrupt?n:u,e.attempt(tL,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return hF(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function iL(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(FF,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bF(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!hF(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(nL,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,bF(e,e.attempt(eL,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function aL(e,t,n){let r=this;return bF(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function oL(e){e.exit(this.containerState.type)}function sL(e,t,n){let r=this;return bF(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!hF(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var cL={name:`setextUnderline`,resolveTo:lL,tokenize:uL};function lL(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function uL(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),hF(t)?bF(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||pF(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var dL={tokenize:fL};function fL(e){let t=this,n=e.attempt(FF,r,e.attempt(this.parser.constructs.flowInitial,i,bF(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sI,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var pL={resolveAll:_L()},mL=gL(`string`),hL=gL(`text`);function gL(e){return{resolveAll:_L(e===`text`?vL:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function _L(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function vL(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var yL=s({attentionMarkers:()=>DL,contentInitial:()=>xL,disable:()=>OL,document:()=>bL,flow:()=>CL,flowInitial:()=>SL,insideSpan:()=>EL,string:()=>wL,text:()=>TL}),bL={42:eL,43:eL,45:eL,48:eL,49:eL,50:eL,51:eL,52:eL,53:eL,54:eL,55:eL,56:eL,57:eL,62:LF},xL={91:gI},SL={[-2]:YF,[-1]:YF,32:YF},CL={35:SI,42:QI,45:[cL,QI],60:DI,61:cL,95:QI,96:KF,126:KF},wL={38:UF,92:VF},TL={[-5]:XI,[-4]:XI,[-3]:XI,33:KI,38:UF,42:kF,60:[NF,PI],91:JI,92:[bI,VF],93:II,95:kF,96:$F},EL={null:[kF,pL]},DL={null:[42,95]},OL={null:[]};function kL(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=$P(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=OF(a,l.events,l),l.events):[]}function f(e,t){return jL(p(e),t)}function p(e){return AL(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){pF(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&QP(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function AL(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function jL(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
260
260
  `;break;case-3:o=`\r
261
261
  `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ML(e){let t={constructs:tF([yL,...(e||{}).extensions||[]]),content:n(xF),defined:[],document:n(CF),flow:n(dL),lazy:{},string:n(mL),text:n(hL)};return t;function n(e){return n;function n(n){return kL(t,e,n)}}}function NL(e){for(;!aI(e););return e}var PL=/[\0\t\n\r]/g;function FL(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(PL.lastIndex=u,c=PL.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var IL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LL(e){return e.replace(IL,RL)}function RL(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return iF(n.slice(t?2:1),t?16:10)}return ZP(n)||e}var zL={}.hasOwnProperty;function BL(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),VL(n)(NL(ML(n).document().write(FL()(e,t,!0))))}function VL(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(de),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(se),blockQuote:a(ne),characterEscape:T,characterReference:T,codeFenced:a(re),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(re,o),codeText:a(ie,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ae),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(oe),hardBreakEscape:a(ce),hardBreakTrailing:a(ce),htmlFlow:a(le,o),htmlFlowData:T,htmlText:a(le,o),htmlTextData:T,image:a(ue),label:o,link:a(de),listItem:a(pe),listItemValue:f,listOrdered:a(fe,d),listUnordered:a(fe),paragraph:a(me),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(se),strong:a(he),thematicBreak:a(_e)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:te,autolinkProtocol:ee,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,characterReference:U,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};UL(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];zL.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||GL).call(a,void 0,e[0])}for(r.position={start:HL(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:HL(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:HL(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||GL).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+uP({start:e.start,end:e.end})+`): it’s not open`);n.position.end=HL(e.end)}function u(){return KP(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=aF(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:HL(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=HL(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=HL(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=LL(t),n.identifier=aF(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=aF(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function V(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=iF(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ZP(t);let i=this.stack[this.stack.length-1];i.value+=r}function U(e){let t=this.stack.pop();t.position.end=HL(e.end)}function ee(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function te(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ne(){return{type:`blockquote`,children:[]}}function re(){return{type:`code`,lang:null,meta:null,value:``}}function ie(){return{type:`inlineCode`,value:``}}function ae(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function oe(){return{type:`emphasis`,children:[]}}function se(){return{type:`heading`,depth:0,children:[]}}function ce(){return{type:`break`}}function le(){return{type:`html`,value:``}}function ue(){return{type:`image`,title:null,url:``,alt:null}}function de(){return{type:`link`,title:null,url:``,children:[]}}function fe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function pe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function me(){return{type:`paragraph`,children:[]}}function he(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function HL(e){return{line:e.line,column:e.column,offset:e.offset}}function UL(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?UL(e,r):WL(e,r)}}function WL(e,t){let n;for(n in t)if(zL.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function GL(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+uP({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+uP({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+uP({start:t.start,end:t.end})+`) is still open`)}function KL(e){let t=this;t.parser=n;function n(n){return BL(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function qL(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JL(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -286,4 +286,4 @@ html body {
286
286
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
287
287
  `,...a.current()});return/^[\t ]/.test(l)&&(l=sq(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}pq.peek=mq;function pq(e){return e.value||``}function mq(){return`<`}hq.peek=gq;function hq(e,t,n,r){let i=iq(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function gq(){return`!`}_q.peek=vq;function _q(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function vq(){return`!`}yq.peek=bq;function yq(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function bq(){return"`"}function xq(e,t){let n=KP(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))}Sq.peek=Cq;function Sq(e,t,n,r){let i=iq(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(xq(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Cq(e,t,n){return xq(e,n)?`<`:`[`}wq.peek=Tq;function wq(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Tq(){return`[`}function Eq(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Dq(e){let t=Eq(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Oq(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function kq(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Aq(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Oq(n):Eq(n),s=e.ordered?o===`.`?`)`:`.`:Dq(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),kq(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function jq(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Mq(e,t,n,r){let i=jq(n),a=n.bulletCurrent||Eq(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Nq(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Pq=BR([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Fq(e,t,n,r){return(e.children.some(function(e){return Pq(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Iq(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Lq.peek=Rq;function Lq(e,t,n,r){let i=Iq(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=cq(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=sq(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=cq(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+sq(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Rq(e,t,n){return n.options.strong||`*`}function zq(e,t,n,r){return n.safe(e.value,r)}function Bq(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Vq(e,t,n){let r=(kq(n)+(n.options.ruleSpaces?` `:``)).repeat(Bq(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Hq={blockquote:JK,break:QK,code:nq,definition:aq,emphasis:lq,hardBreak:QK,heading:fq,html:pq,image:hq,imageReference:_q,inlineCode:yq,link:Sq,linkReference:wq,list:Aq,listItem:Mq,paragraph:Nq,root:Fq,strong:Lq,text:zq,thematicBreak:Vq};function Uq(){return{enter:{table:Wq,tableData:Jq,tableHeader:Jq,tableRow:Kq},exit:{codeText:Yq,table:Gq,tableData:qq,tableHeader:qq,tableRow:qq}}}function Wq(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Gq(e){this.exit(e),this.data.inTable=void 0}function Kq(e){this.enter({type:`tableRow`,children:[]},e)}function qq(e){this.exit(e)}function Jq(e){this.enter({type:`tableCell`,children:[]},e)}function Yq(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Xq));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Xq(e,t){return t===`|`?t:e}function Zq(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
288
288
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
289
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return GK(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Hq.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Qq(){return{exit:{taskListCheckValueChecked:eJ,taskListCheckValueUnchecked:eJ,paragraph:tJ}}}function $q(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nJ}}}function eJ(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tJ(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nJ(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Hq.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rJ(){return[lK(),NK(),RK(),Uq(),Qq()]}function iJ(e){return{extensions:[uK(),PK(e),zK(),Zq(e),$q()]}}var aJ={tokenize:yJ,partial:!0},oJ={tokenize:bJ,partial:!0},sJ={tokenize:xJ,partial:!0},cJ={tokenize:SJ,partial:!0},lJ={tokenize:CJ,partial:!0},uJ={name:`wwwAutolink`,tokenize:_J,previous:wJ},dJ={name:`protocolAutolink`,tokenize:vJ,previous:TJ},fJ={name:`emailAutolink`,tokenize:gJ,previous:EJ},pJ={};function mJ(){return{text:pJ}}for(var hJ=48;hJ<123;)pJ[hJ]=fJ,hJ++,hJ===58?hJ=65:hJ===91&&(hJ=97);pJ[43]=fJ,pJ[45]=fJ,pJ[46]=fJ,pJ[95]=fJ,pJ[72]=[fJ,dJ],pJ[104]=[fJ,dJ],pJ[87]=[fJ,uJ],pJ[119]=[fJ,uJ];function gJ(e,t,n){let r=this,i,a;return o;function o(t){return!DJ(t)||!EJ.call(r,r.previous)||OJ(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return DJ(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(lJ,u,l)(t):t===45||t===95||sF(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&oF(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function _J(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!wJ.call(r,r.previous)||OJ(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(aJ,e.attempt(oJ,e.attempt(sJ,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function vJ(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&TJ.call(r,r.previous)&&!OJ(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(oF(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||lF(t)||mF(t)||_F(t)||gF(t)?n(t):e.attempt(oJ,e.attempt(sJ,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function yJ(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function bJ(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(cJ,c,s)(t):t===null||mF(t)||_F(t)||t!==45&&gF(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function xJ(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(cJ,t,a)(o):o===null||mF(o)||_F(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function SJ(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||mF(o)||_F(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||mF(e)||_F(e)?t(e):r(e)}function a(e){return oF(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):oF(t)?(e.consume(t),o):n(t)}}function CJ(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return sF(e)?n(e):t(e)}}function wJ(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mF(e)}function TJ(e){return!oF(e)}function EJ(e){return!(e===47||DJ(e))}function DJ(e){return e===43||e===45||e===46||e===95||sF(e)}function OJ(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var kJ={tokenize:LJ,partial:!0};function AJ(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:PJ,continuation:{tokenize:FJ},exit:IJ}},text:{91:{name:`gfmFootnoteCall`,tokenize:NJ},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jJ,resolveTo:MJ}}}}function jJ(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=aF(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function MJ(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function NJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||mF(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(aF(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return mF(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function PJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||mF(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=aF(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return mF(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bF(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function FJ(e,t,n){return e.check(FF,t,e.attempt(kJ,t,n))}function IJ(e){e.exit(`gfmFootnoteDefinition`)}function LJ(e,t,n){let r=this;return bF(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function RJ(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&QP(o,o.length,0,OF(s,e.slice(r+1,n),t)),QP(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),QP(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=DF(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=DF(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zJ=class{constructor(){this.map=[]}add(e,t,n){BJ(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function BJ(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 VJ(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function HJ(){return{flow:{null:{name:`table`,tokenize:UJ,resolveAll:WJ}}}}function UJ(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):pF(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):hF(t)?bF(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||mF(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,hF(t)?bF(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return hF(t)?bF(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||pF(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return hF(t)?bF(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||pF(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||pF(n)?(e.exit(`tableRow`),t(n)):hF(n)?bF(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||mF(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function WJ(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zJ;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(KJ(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=GJ(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=GJ(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=GJ(f,t,o,i,n,d)):(o[0]=o[1],d=GJ(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&KJ(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=VJ(t.events,n))}return e}function GJ(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},qJ(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=qJ(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=qJ(t.events,n[2]),a=qJ(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},qJ(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function KJ(e,t,n,r,i){let a=[],o=qJ(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function qJ(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var JJ={name:`tasklistCheck`,tokenize:XJ};function YJ(){return{text:{91:JJ}}}function XJ(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return mF(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return pF(r)?t(r):hF(r)?e.check({tokenize:ZJ},t,n)(r):n(r)}}function ZJ(e,t,n){return bF(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function QJ(e){return tF([mJ(),AJ(),RJ(e),HJ(),YJ()])}var $J={};function eY(e){let t=this,n=e||$J,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QJ(n)),a.push(rJ()),o.push(iJ(n))}var tY={markdownLoading:`_markdownLoading_3zeiw_1`,markdownShell:`_markdownShell_3zeiw_6`,deletedBanner:`_deletedBanner_3zeiw_12`,markdownArticle:`_markdownArticle_3zeiw_15`,markdownBody:`_markdownBody_3zeiw_21`,markdownHeading:`_markdownHeading_3zeiw_39`,markdownInlineCode:`_markdownInlineCode_3zeiw_46`,markdownPre:`_markdownPre_3zeiw_56`,markdownBlockquote:`_markdownBlockquote_3zeiw_92`,markdownTableScroll:`_markdownTableScroll_3zeiw_107`,commentBlockSpacingSm:`_commentBlockSpacingSm_3zeiw_115`,commentBlockSpacingMd:`_commentBlockSpacingMd_3zeiw_118`,commentBlockSpacingLg:`_commentBlockSpacingLg_3zeiw_121`},nY={markdownCommentBlock:`_markdownCommentBlock_15y2w_1`,markdownCommentContent:`_markdownCommentContent_15y2w_7`,commentTrigger:`_commentTrigger_15y2w_11`,inlineThreadStack:`_inlineThreadStack_15y2w_38`},rY=v.memo(function({lineNumber:e,filePath:t,lineThreads:n,children:r,className:i}){let{createThread:a}=Bj(),[o,s]=v.useState(!1);return(0,q.jsxs)(`div`,{className:[nY.markdownCommentBlock,i].filter(Boolean).join(` `),"data-review-anchor":`line:${e}`,"data-review-line":e,children:[(0,q.jsx)(`div`,{className:nY.markdownCommentContent,children:r}),n.length===0?(0,q.jsx)(`button`,{className:nY.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>s(!0),children:(0,q.jsx)(sj,{})}):null,o?(0,q.jsx)(pM,{onCancel:()=>s(!1),onSubmit:async n=>{await a({type:`markdown-line`,filePath:t,lineNumber:e,blockId:`line-${e}`},n),s(!1)}}):null,n.length>0?(0,q.jsx)(`div`,{className:nY.inlineThreadStack,children:(0,q.jsx)(wM,{threads:n})}):null]})}),iY={mermaidDiagram:`_mermaidDiagram_1g6lk_1`,mermaidLoading:`_mermaidLoading_1g6lk_2`,mermaidFallback:`_mermaidFallback_1g6lk_3`,mermaidError:`_mermaidError_1g6lk_29`},aY=`modulepreload`,oY=function(e){return`/`+e},sY={},cY=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=oY(t,n),t in sY)return;sY[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:aY,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function lY({chart:e}){let t=v.useId(),n=v.useMemo(()=>`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,``)}`,[t]),[r,i]=v.useState(``),[a,o]=v.useState(``);return v.useEffect(()=>{let t=!0;async function r(){try{let r=(await cY(async()=>{let{default:e}=await import(`./mermaid.core-CyzXwwXp.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))).default;r.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`default`});let a=await r.render(n,e);if(!t)return;i(a.svg),o(``)}catch(e){if(!t)return;i(``),o(e instanceof Error?e.message:`Mermaid 图表渲染失败`)}}return r(),()=>{t=!1}},[e,n]),a?(0,q.jsxs)(`div`,{className:iY.mermaidFallback,children:[(0,q.jsxs)(`div`,{className:iY.mermaidError,children:[`Mermaid 渲染失败:`,a]}),(0,q.jsx)(`pre`,{children:(0,q.jsx)(`code`,{children:e})})]}):r?(0,q.jsx)(`div`,{className:iY.mermaidDiagram,dangerouslySetInnerHTML:{__html:r}}):(0,q.jsx)(`div`,{className:iY.mermaidLoading,children:`正在渲染图表...`})}function uY(e){return e.anchor.type===`file`?0:e.anchor.type===`markdown-line`||e.anchor.type===`diff-line`&&e.anchor.side===`new`?e.anchor.lineNumber:2**53-1}function dY(e,t){return t.filter(t=>t.filePath===e&&t.status!==`resolved`).sort((e,t)=>uY(e)-uY(t)||e.createdAt.localeCompare(t.createdAt))[0]}function fY(e){e.scrollTop=0}function pY(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();e.scrollTop+=r.top-n.top}function mY(e,t){let n=[...e.querySelectorAll(`[data-review-line]`)];return n.filter(e=>Number(e.dataset.reviewLine)<=t).at(-1)??n.find(e=>Number(e.dataset.reviewLine)>=t)??null}function hY(e,t){let n=e.blocks.find(e=>t>=e.startLine&&t<=e.endLine);return n?n.startLine:e.blocks.find(e=>e.startLine>=t)?.startLine??e.blocks.at(-1)?.startLine??t}function gY(e,t){return t.anchor.type===`file`||t.anchor.type===`diff-line`&&t.anchor.side!==`new`?null:hY(e,t.anchor.lineNumber)}function _Y(e){return/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim())}function vY(e,t){return Gj(e,t)}function yY(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(yY).join(``):v.isValidElement(e)?yY(e.props.children):``}function bY(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).join(` `):typeof e==`string`?e:``}function xY(e){return v.isValidElement(e)&&!!(e.props.className||e.props.children)}function SY(e){let t=e?.position?.start?.line;return typeof t==`number`?t:void 0}function CY(e){let t=e?.children?.find(e=>e.tagName===`code`);return bY(t?.properties?.className)}function wY(e){return e?e.type===`text`?e.value??``:e.children?.map(wY).join(``)??``:``}function TY(e){let t=e?.children?.find(e=>e.tagName===`code`);return wY(t)}function EY(e,t){return t?e.split(/\r?\n/)[t-1]??``:``}function DY(e,t){return/^(?:\s*(?:[-*+]|\d+\.)\s+)#{1,6}(?:\s|$)/.test(EY(e,t))}function OY(...e){return e.filter(Boolean).join(` `)}function kY(e){if(e!==1)return e===2?tY.commentBlockSpacingLg:tY.commentBlockSpacingMd}var AY=/==(.+?)==/g;function jY(){return e=>{MY(e)}}function MY(e){e.children&&=e.children.flatMap(e=>e.type!==`text`||typeof e.value!=`string`?(MY(e),[e]):NY(e.value))}function NY(e){let t=[],n=0;for(let r of e.matchAll(AY)){let i=r.index??0;i>n&&t.push({type:`text`,value:e.slice(n,i)}),t.push({type:`html`,value:`<mark>`},{type:`text`,value:r[1]},{type:`html`,value:`</mark>`}),n=i+r[0].length}return n===0?[{type:`text`,value:e}]:(n<e.length&&t.push({type:`text`,value:e.slice(n)}),t)}var PY=[tK,eY,jY],FY=[mG,[NG,{...gG,tagNames:[...gG.tagNames??[],`mark`]}]];function IY({file:e,threads:t,locateTarget:n}){let[r,i]=v.useState(null),a=v.useRef(null),o=v.useRef(``);v.useEffect(()=>{i(null),Hj(e.path).then(e=>i(e)).catch(()=>i(null))},[e.path]),v.useEffect(()=>{let n=a.current;if(!n||!r||r.filePath!==e.path||o.current===e.path)return;o.current=e.path;let i=dY(e.path,t);window.requestAnimationFrame(()=>{let e=i?gY(r,i):null;if(!e){fY(n);return}let t=n.querySelector(`[data-review-line="${e}"]`)??mY(n,e);if(!t){fY(n);return}pY(n,t)})},[e.path,r,t]),v.useEffect(()=>{let t=a.current;if(!t||!r||!n||n.anchor.filePath!==e.path)return;if(n.anchor.type===`file`){fY(t);return}if(n.anchor.type===`diff-line`&&n.anchor.side!==`new`)return;let i=hY(r,n.anchor.lineNumber),o=t.querySelector(`[data-review-line="${i}"]`)??mY(t,i);o?pY(t,o):fY(t)},[e.path,n,r]);let s=v.useMemo(()=>{let n=new Map;for(let i of t){if(i.anchor.filePath!==e.path||!r)continue;let t=gY(r,i);if(!t)continue;let a=n.get(t)??[];a.push(i),n.set(t,a)}return n},[e.path,r,t]),c=v.useCallback((t,n,r)=>t?(0,q.jsx)(rY,{lineNumber:t,filePath:e.path,lineThreads:s.get(t)??[],className:r?.className,children:n}):n,[e.path,s]),l=v.useCallback((e,t,n,i,a)=>{let o=`h${e}`,s=v.createElement(o,{...n,className:OY(n.className,tY.markdownHeading),style:{...n.style,...a,marginTop:0}},i);return r&&DY(r.content,t)?s:c(t,s,{className:kY(e)})},[r,c]),u=v.useMemo(()=>({h1({children:e,node:t,...n}){return l(1,SY(t),n,e)},h2({children:e,node:t,style:n,...r}){return l(2,SY(t),{...r,style:n},e,{marginBottom:12})},h3({children:e,node:t,...n}){return l(3,SY(t),n,e)},h4({children:e,node:t,...n}){return l(4,SY(t),n,e)},h5({children:e,node:t,...n}){return l(5,SY(t),n,e)},h6({children:e,node:t,...n}){return l(6,SY(t),n,e)},p({children:e,node:t,...n}){return r&&/^(?:\s*>|\s*([-*+]|\d+\.)\s+)/.test(EY(r.content,SY(t)))?(0,q.jsx)(`p`,{...n,children:e}):c(SY(t),(0,q.jsx)(`p`,{...n,children:e}))},ul({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`ul`,{...n,children:e}))},ol({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`ol`,{...n,children:e}))},li({children:e,node:t,...n}){return(0,q.jsx)(`li`,{...n,children:e})},blockquote({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`blockquote`,{...n,className:OY(n.className,tY.markdownBlockquote),children:e}),{className:tY.commentBlockSpacingSm})},pre({children:e,node:t,...n}){let r=v.Children.toArray(e).find(xY),i=yY(r??e)||TY(t),a=r?.props.className??CY(t),o=/language-(\S+)/.exec(a)?.[1],s=i.replace(/\n$/,``),l=SY(t);return o===`mermaid`&&s.trim()?c(l,(0,q.jsx)(lY,{chart:s}),{className:tY.commentBlockSpacingMd}):c(l,(0,q.jsx)(`pre`,{className:tY.markdownPre,...n,children:e}))},code({className:e,children:t,node:n,...r}){return e?(0,q.jsx)(`code`,{className:e,...r,children:t}):(0,q.jsx)(`code`,{className:tY.markdownInlineCode,...r,children:t})},table({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`div`,{className:tY.markdownTableScroll,children:(0,q.jsx)(`table`,{...n,children:e})}),{className:tY.commentBlockSpacingMd})},a({href:e,children:t,node:n,...r}){let i=e??``;if(!i||!_Y(i))return(0,q.jsx)(`span`,{children:t});let a=/^https?:/i.test(i);return(0,q.jsx)(`a`,{href:i,target:a?`_blank`:void 0,rel:a?`noreferrer`:void 0,...r,children:t})},img({src:t,alt:n,node:r,...i}){let a=t??``;return!a||!_Y(a)?null:(0,q.jsx)(`img`,{src:vY(e.path,a),alt:n??``,loading:`lazy`,...i})}}),[e.path,r,c,l]);return r?(0,q.jsxs)(`div`,{className:tY.markdownShell,ref:a,children:[r.deleted?(0,q.jsx)($c,{className:tY.deletedBanner,message:`该文件已删除,仅展示删除前预览`,type:`warning`,showIcon:!0}):null,(0,q.jsx)(`article`,{className:tY.markdownArticle,children:(0,q.jsx)(`div`,{className:tY.markdownBody,children:(0,q.jsx)(Yz,{remarkPlugins:PY,rehypePlugins:FY,urlTransform:e=>_Y(e)?e:``,components:u,children:r.content})})})]}):(0,q.jsx)(`div`,{className:tY.markdownLoading,children:(0,q.jsx)(VO,{})})}var LY={threads:`_threads_1i06v_1`,threadScopeBar:`_threadScopeBar_1i06v_5`,threadScopeLabel:`_threadScopeLabel_1i06v_15`,threadScopeSwitchRow:`_threadScopeSwitchRow_1i06v_22`,threadScopeSwitchRowDisabled:`_threadScopeSwitchRowDisabled_1i06v_32`,threadScopeOption:`_threadScopeOption_1i06v_35`,threadScopeOptionActive:`_threadScopeOptionActive_1i06v_57`,threadScopeSwitch:`_threadScopeSwitch_1i06v_22`,threadListToolbar:`_threadListToolbar_1i06v_69`,threadFilterWrap:`_threadFilterWrap_1i06v_78`,threadBatchButton:`_threadBatchButton_1i06v_89`,thread:`_thread_1i06v_1`,threadFocused:`_threadFocused_1i06v_133`,submit:`_submit_1i06v_138`,replied:`_replied_1i06v_142`,resolved:`_resolved_1i06v_146`,threadLocateFlash:`_threadLocateFlash_1i06v_150`,threadTopButton:`_threadTopButton_1i06v_156`,threadTop:`_threadTop_1i06v_156`,threadAnchor:`_threadAnchor_1i06v_178`,threadTag:`_threadTag_1i06v_185`,threadTagResolved:`_threadTagResolved_1i06v_194`,threadTagSubmit:`_threadTagSubmit_1i06v_199`,threadTagReplied:`_threadTagReplied_1i06v_204`,threadEmpty:`_threadEmpty_1i06v_209`},RY={submit:0,replied:1,resolved:2};function zY(e){return e===`submit`?LY.threadTagSubmit:e===`replied`?LY.threadTagReplied:LY.threadTagResolved}function BY(e){return e===`submit`?LY.submit:e===`replied`?LY.replied:LY.resolved}function VY({threads:e,currentFiles:t,currentFilePath:n,focusedThreadId:r}){let{deleteThread:i}=Bj(),{locateThread:a}=Vj(),[o,s]=v.useState(`all`),[c,l]=v.useState(`current-file`),[u,d]=v.useState(null),f=v.useRef({}),p=v.useMemo(()=>n?e.filter(e=>e.filePath===n).length:0,[n,e]),m=v.useMemo(()=>c===`all-diff`?e:n?e.filter(e=>e.filePath===n):[],[n,c,e]),h=v.useMemo(()=>m.map(e=>({key:e.id,thread:e})),[m]),g=v.useMemo(()=>h.filter(e=>{let t=gM(e.thread);return o===`resolved`?t===`resolved`:o===`pending`?t!==`resolved`:!0}).sort((e,t)=>{let n=gM(e.thread),r=gM(t.thread);return RY[n]-RY[r]}),[o,h]),_=v.useMemo(()=>({resolved:m.filter(e=>gM(e)===`resolved`),submit:m.filter(e=>gM(e)===`submit`)}),[m]),y=v.useCallback(async e=>{let t=[];e===`delete-resolved`&&(t=_.resolved),e===`delete-submit`&&(t=_.submit),e===`delete-all`&&(t=m);for(let e of t)await i(e.id)},[_.resolved,_.submit,i,m]),b=v.useCallback(e=>{let t=e===`delete-resolved`?_.resolved.length:e===`delete-submit`?_.submit.length:m.length,n=e===`delete-resolved`?`删除全部已解决评论(${t})?`:e===`delete-submit`?`删除全部 submit 评论(${t})?`:`清空全部评论(${t})?`,r=e===`delete-all`?`清空`:`删除`;pk.confirm({title:n,okText:r,cancelText:`取消`,okButtonProps:e===`delete-all`?{danger:!0}:void 0,onOk:async()=>y(e)})},[_.resolved.length,_.submit.length,y,m.length]);return v.useEffect(()=>{n||l(`all-diff`)},[n]),v.useEffect(()=>{if(!r)return;let e=g.find(e=>e.thread.id===r);e&&f.current[e.key]?.scrollIntoView({block:`start`,behavior:`smooth`})},[r,g]),v.useEffect(()=>{if(!r)return;d(r);let e=window.setTimeout(()=>{d(e=>e===r?null:e)},1400);return()=>window.clearTimeout(e)},[r]),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:LY.threadScopeBar,children:[(0,q.jsx)(QA.Text,{className:LY.threadScopeLabel,children:`查看范围`}),(0,q.jsxs)(`div`,{className:n?LY.threadScopeSwitchRow:`${LY.threadScopeSwitchRow} ${LY.threadScopeSwitchRowDisabled}`,children:[(0,q.jsxs)(`button`,{type:`button`,className:c===`current-file`?`${LY.threadScopeOption} ${LY.threadScopeOptionActive}`:LY.threadScopeOption,onClick:()=>l(`current-file`),disabled:!n,children:[`当前文件 (`,p,`)`]}),(0,q.jsx)(kk,{className:LY.threadScopeSwitch,checked:c===`all-diff`,onChange:e=>l(e?`all-diff`:`current-file`),disabled:!n,size:`small`}),(0,q.jsxs)(`button`,{type:`button`,className:c===`all-diff`?`${LY.threadScopeOption} ${LY.threadScopeOptionActive}`:LY.threadScopeOption,onClick:()=>l(`all-diff`),disabled:!n,children:[`全部评论 (`,e.length,`)`]})]})]}),(0,q.jsxs)(`div`,{className:LY.threadListToolbar,children:[(0,q.jsx)(`div`,{className:LY.threadFilterWrap,children:(0,q.jsx)(fE,{value:o,onChange:e=>s(e),options:[{label:`全部 (${h.length})`,value:`all`},{label:`未解决 (${h.filter(e=>gM(e.thread)!==`resolved`).length})`,value:`pending`},{label:`已解决 (${h.filter(e=>gM(e.thread)===`resolved`).length})`,value:`resolved`}],size:`small`})}),(0,q.jsx)(zE,{menu:{items:[{key:`delete-resolved`,label:`删除已解决(${_.resolved.length})`,disabled:_.resolved.length===0},{key:`delete-submit`,label:`删除待提交(${_.submit.length})`,disabled:_.submit.length===0},{type:`divider`},{key:`delete-all`,label:`清空全部(${m.length})`,danger:!0,disabled:m.length===0}],onClick:({key:e})=>{(e===`delete-resolved`||e===`delete-submit`||e===`delete-all`)&&b(e)}},trigger:[`click`],children:(0,q.jsxs)(XC,{size:`small`,className:LY.threadBatchButton,children:[`批量操作 `,(0,q.jsx)(Ab,{})]})})]}),g.length===0?(0,q.jsx)(cb,{className:LY.threadEmpty,description:`暂无评论,悬停到行右侧或添加文件级评论即可开始。`}):(0,q.jsx)(`div`,{className:LY.threads,children:g.map(e=>{let n=e.thread,i=gM(n),o=r===n.id,s=!t.some(e=>hM(n,e));return(0,q.jsxs)(WT,{className:[LY.thread,BY(i),o?LY.threadFocused:``,u===n.id?LY.threadLocateFlash:``].filter(Boolean).join(` `),ref:t=>{f.current[e.key]=t},children:[(0,q.jsx)(`button`,{type:`button`,className:LY.threadTopButton,onClick:()=>a(n.id),children:(0,q.jsxs)(LE,{className:LY.threadTop,align:`start`,size:8,children:[(0,q.jsx)(QA.Text,{className:LY.threadAnchor,strong:!0,children:$M(n)}),(0,q.jsxs)($E,{gap:`small`,children:[i===`replied`?null:(0,q.jsx)(Zk,{className:`${LY.threadTag} ${zY(i)}`,children:mM[i]}),s?(0,q.jsx)(Zk,{className:LY.threadTag,children:`历史快照`}):null]})]})}),(0,q.jsx)(`div`,{children:(0,q.jsx)(wM,{threads:[n],variant:`borderless`,showStatusTag:!1})})]},e.key)})})]})}function HY(e){return/\.(avif|bmp|gif|heic|heif|ico|jpe?g|png|svg|tiff?|webp)$/i.test(e)}function UY(e){return e?e.repoName||e.repoRoot.split(/[\\/]/).filter(Boolean).at(-1)||e.repoRoot:`正在加载仓库`}function WY(e,t){return e===t?!0:e.length===t.length?JSON.stringify(e)===JSON.stringify(t):!1}function GY(e){return[...e].sort((e,t)=>e.path.localeCompare(t.path))}function KY(){let{message:e}=$_.useApp(),[t,n]=v.useState(null),[r,i]=v.useState([]),[a,o]=v.useState([]),[s,c]=v.useState(``),[l,u]=v.useState(`split`),[d,f]=v.useState(`preview`),[p,m]=v.useState(null),[h,g]=v.useState(null),[_,y]=v.useState(null),[b,x]=v.useState({}),S=v.useRef(null),C=v.useRef(null),w=v.useMemo(()=>GY(r),[r]),T=r.find(e=>e.path===s)??w[0],E=v.useMemo(()=>a.filter(e=>r.some(t=>hM(e,t))),[r,a]),D=v.useMemo(()=>T?E.filter(e=>hM(e,T)):[],[E,T]),O=E.filter(e=>e.status!==`resolved`).length,k=v.useCallback(async(e=!1)=>{let t=await Ej();if(e||S.current!==t.session.id){n(t.session),S.current=t.session.id,i(t.files);let e=GY(t.files);c(n=>t.files.some(e=>e.path===n)?n:e[0]?.path??``)}o(e=>WY(e,t.threads)?e:t.threads),C.current&&!t.threads.some(e=>e.id===C.current)&&(C.current=null,m(null))},[]);v.useEffect(()=>{k(!0)},[k]),v.useEffect(()=>{let e=()=>{document.visibilityState===`visible`&&k()},t=window.setInterval(e,2500);return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[k]);function A(e){y(t=>({filePath:e,requestId:(t?.requestId??0)+1}))}function j(e,t){x(n=>(n[e]??!1)===t?n:{...n,[e]:t})}v.useEffect(()=>{C.current=null,m(null)},[s]),v.useEffect(()=>{if(h&&r.find(e=>e.path===h.anchor.filePath)?.isMarkdown){if(h.anchor.type===`markdown-line`){f(`preview`);return}h.anchor.type===`diff-line`&&h.anchor.side===`old`&&f(`diff`)}},[r,h]);let M=v.useCallback(()=>{e.success(`提示词已复制到剪贴板`)},[e]),N=v.useCallback(e=>{m(t=>{let n=typeof e==`function`?e(t):e;return C.current=n,n})},[]),P=Ij({refreshReviewState:k,onPromptCopied:M});return(0,q.jsx)(Rj,{value:P,children:(0,q.jsx)(zj,{value:Lj({files:r,threads:a,setSelectedPath:c,setLocateTarget:g,setFocusedThreadId:N}),children:(0,q.jsxs)(UD,{className:jM.shell,children:[(0,q.jsxs)(`aside`,{className:jM.sidebar,children:[(0,q.jsxs)(`div`,{className:jM.brand,children:[(0,q.jsx)(`div`,{className:jM.brandMark,children:`DR`}),(0,q.jsxs)(`div`,{className:jM.brandCopy,children:[(0,q.jsx)(QA.Text,{className:jM.repoName,title:t?.repoRoot,children:UY(t)}),(0,q.jsx)(QA.Text,{className:jM.productName,children:`Diff 审查台`}),(0,q.jsx)(QA.Text,{type:`secondary`,children:t?QM(t):`正在加载会话`})]})]}),(0,q.jsx)(WT,{className:jM.sideCard,children:(0,q.jsxs)(LE,{size:8,wrap:!0,children:[(0,q.jsx)(Zk,{color:`blue`,children:t?.mode.kind===`revision`?`混合模式`:`本地模式`}),(0,q.jsxs)(Zk,{color:`gold`,children:[r.length,` files`]})]})}),(0,q.jsx)(sN,{files:w,threads:E,selectedPath:T?.path??``,onSelectFile:c})]}),(0,q.jsx)(`section`,{className:jM.reviewPane,children:T?(0,q.jsxs)(q.Fragment,{children:[T.isMarkdown?(0,q.jsx)(`div`,{className:jM.topToolbar,children:(0,q.jsx)(fE,{className:jM.viewModeSwitcher,options:[{label:`Preview`,value:`preview`,icon:(0,q.jsx)(fD,{})},{label:`Code diff`,value:`diff`,icon:(0,q.jsx)(uj,{})}],value:d,onChange:e=>f(e)})}):(0,q.jsx)(`div`,{className:jM.topToolbar,children:(0,q.jsx)(fE,{className:jM.viewModeSwitcher,options:[{label:`Side by side`,value:`split`,icon:(0,q.jsx)(uj,{})},{label:`Inline`,value:`inline`,icon:(0,q.jsx)(fD,{})}],value:l,onChange:e=>u(e)})}),(0,q.jsxs)(`div`,{className:jM.reviewSurface,children:[(0,q.jsx)(lN,{file:T,threads:D,showToggleAllLines:!HY(T.path)&&(!T.isMarkdown||d===`diff`),hasExpandedContext:T?b[T.path]??!1:!1,onToggleAllLines:A}),T.isMarkdown&&d===`preview`?(0,q.jsx)(IY,{file:T,threads:D,locateTarget:h},t?.id):(0,q.jsx)(LM,{file:T,threads:D,locateTarget:h,expandAllRequest:_,onExpandedContextChange:j,viewMode:T.isMarkdown?`split`:l},t?.id)]})]}):(0,q.jsx)(WT,{className:jM.emptyStateCard,bordered:!1,children:(0,q.jsx)(QA.Text,{type:`secondary`,children:`未发现变更,当前工作区很安静。`})})}),(0,q.jsxs)(`aside`,{className:jM.threadRail,children:[(0,q.jsxs)(`div`,{className:jM.threadRailHeader,children:[(0,q.jsxs)(QA.Title,{className:jM.threadRailTitle,level:4,children:[`评论 (`,O,`)`]}),(0,q.jsx)(XC,{disabled:O===0,icon:(0,q.jsx)(EA,{}),type:`primary`,onClick:()=>void P.copyPrompt({type:`all-unresolved`}),children:`批量提交给 Agent`})]}),(0,q.jsx)(`div`,{className:jM.threadRailBody,children:(0,q.jsx)(VY,{threads:a,currentFiles:r,currentFilePath:T?.path??``,focusedThreadId:p})})]})]})})})}(0,gd.createRoot)(document.getElementById(`root`)).render((0,q.jsx)(v.StrictMode,{children:(0,q.jsx)(Iu,{theme:{token:{colorPrimary:`#2f6fed`,colorSuccess:`#2f8f63`,colorWarning:`#d59b2a`,colorTextBase:`#16181d`,colorBgBase:`#f4f6fa`,fontFamily:`"SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif`,borderRadius:14}},children:(0,q.jsx)($_,{children:(0,q.jsx)(KY,{})})})}));export{ar as a,vn as c,hn as d,o as f,fr as i,pn as l,pr as n,un as o,l as p,dr as r,_n as s,cY as t,yn as u};
289
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return GK(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Hq.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Qq(){return{exit:{taskListCheckValueChecked:eJ,taskListCheckValueUnchecked:eJ,paragraph:tJ}}}function $q(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:nJ}}}function eJ(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function tJ(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function nJ(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Hq.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function rJ(){return[lK(),NK(),RK(),Uq(),Qq()]}function iJ(e){return{extensions:[uK(),PK(e),zK(),Zq(e),$q()]}}var aJ={tokenize:yJ,partial:!0},oJ={tokenize:bJ,partial:!0},sJ={tokenize:xJ,partial:!0},cJ={tokenize:SJ,partial:!0},lJ={tokenize:CJ,partial:!0},uJ={name:`wwwAutolink`,tokenize:_J,previous:wJ},dJ={name:`protocolAutolink`,tokenize:vJ,previous:TJ},fJ={name:`emailAutolink`,tokenize:gJ,previous:EJ},pJ={};function mJ(){return{text:pJ}}for(var hJ=48;hJ<123;)pJ[hJ]=fJ,hJ++,hJ===58?hJ=65:hJ===91&&(hJ=97);pJ[43]=fJ,pJ[45]=fJ,pJ[46]=fJ,pJ[95]=fJ,pJ[72]=[fJ,dJ],pJ[104]=[fJ,dJ],pJ[87]=[fJ,uJ],pJ[119]=[fJ,uJ];function gJ(e,t,n){let r=this,i,a;return o;function o(t){return!DJ(t)||!EJ.call(r,r.previous)||OJ(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return DJ(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(lJ,u,l)(t):t===45||t===95||sF(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&oF(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function _J(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!wJ.call(r,r.previous)||OJ(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(aJ,e.attempt(oJ,e.attempt(sJ,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function vJ(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&TJ.call(r,r.previous)&&!OJ(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(oF(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||lF(t)||mF(t)||_F(t)||gF(t)?n(t):e.attempt(oJ,e.attempt(sJ,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function yJ(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function bJ(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(cJ,c,s)(t):t===null||mF(t)||_F(t)||t!==45&&gF(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function xJ(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(cJ,t,a)(o):o===null||mF(o)||_F(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function SJ(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||mF(o)||_F(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||mF(e)||_F(e)?t(e):r(e)}function a(e){return oF(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):oF(t)?(e.consume(t),o):n(t)}}function CJ(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return sF(e)?n(e):t(e)}}function wJ(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mF(e)}function TJ(e){return!oF(e)}function EJ(e){return!(e===47||DJ(e))}function DJ(e){return e===43||e===45||e===46||e===95||sF(e)}function OJ(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var kJ={tokenize:LJ,partial:!0};function AJ(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:PJ,continuation:{tokenize:FJ},exit:IJ}},text:{91:{name:`gfmFootnoteCall`,tokenize:NJ},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:jJ,resolveTo:MJ}}}}function jJ(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=aF(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function MJ(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function NJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||mF(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(aF(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return mF(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function PJ(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||mF(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=aF(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return mF(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),bF(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function FJ(e,t,n){return e.check(FF,t,e.attempt(kJ,t,n))}function IJ(e){e.exit(`gfmFootnoteDefinition`)}function LJ(e,t,n){let r=this;return bF(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function RJ(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&QP(o,o.length,0,OF(s,e.slice(r+1,n),t)),QP(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),QP(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=DF(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=DF(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var zJ=class{constructor(){this.map=[]}add(e,t,n){BJ(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function BJ(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 VJ(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function HJ(){return{flow:{null:{name:`table`,tokenize:UJ,resolveAll:WJ}}}}function UJ(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):pF(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):hF(t)?bF(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||mF(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,hF(t)?bF(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return hF(t)?bF(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||pF(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return hF(t)?bF(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||pF(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||pF(n)?(e.exit(`tableRow`),t(n)):hF(n)?bF(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||mF(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function WJ(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new zJ;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(KJ(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=GJ(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=GJ(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=GJ(f,t,o,i,n,d)):(o[0]=o[1],d=GJ(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&KJ(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=VJ(t.events,n))}return e}function GJ(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},qJ(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=qJ(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=qJ(t.events,n[2]),a=qJ(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},qJ(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function KJ(e,t,n,r,i){let a=[],o=qJ(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function qJ(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var JJ={name:`tasklistCheck`,tokenize:XJ};function YJ(){return{text:{91:JJ}}}function XJ(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return mF(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return pF(r)?t(r):hF(r)?e.check({tokenize:ZJ},t,n)(r):n(r)}}function ZJ(e,t,n){return bF(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function QJ(e){return tF([mJ(),AJ(),RJ(e),HJ(),YJ()])}var $J={};function eY(e){let t=this,n=e||$J,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QJ(n)),a.push(rJ()),o.push(iJ(n))}var tY={markdownLoading:`_markdownLoading_3zeiw_1`,markdownShell:`_markdownShell_3zeiw_6`,deletedBanner:`_deletedBanner_3zeiw_12`,markdownArticle:`_markdownArticle_3zeiw_15`,markdownBody:`_markdownBody_3zeiw_21`,markdownHeading:`_markdownHeading_3zeiw_39`,markdownInlineCode:`_markdownInlineCode_3zeiw_46`,markdownPre:`_markdownPre_3zeiw_56`,markdownBlockquote:`_markdownBlockquote_3zeiw_92`,markdownTableScroll:`_markdownTableScroll_3zeiw_107`,commentBlockSpacingSm:`_commentBlockSpacingSm_3zeiw_115`,commentBlockSpacingMd:`_commentBlockSpacingMd_3zeiw_118`,commentBlockSpacingLg:`_commentBlockSpacingLg_3zeiw_121`},nY={markdownCommentBlock:`_markdownCommentBlock_15y2w_1`,markdownCommentContent:`_markdownCommentContent_15y2w_7`,commentTrigger:`_commentTrigger_15y2w_11`,inlineThreadStack:`_inlineThreadStack_15y2w_38`},rY=v.memo(function({lineNumber:e,filePath:t,lineThreads:n,children:r,className:i}){let{createThread:a}=Bj(),[o,s]=v.useState(!1);return(0,q.jsxs)(`div`,{className:[nY.markdownCommentBlock,i].filter(Boolean).join(` `),"data-review-anchor":`line:${e}`,"data-review-line":e,children:[(0,q.jsx)(`div`,{className:nY.markdownCommentContent,children:r}),n.length===0?(0,q.jsx)(`button`,{className:nY.commentTrigger,type:`button`,"aria-label":`添加行评论`,onClick:()=>s(!0),children:(0,q.jsx)(sj,{})}):null,o?(0,q.jsx)(pM,{onCancel:()=>s(!1),onSubmit:async n=>{await a({type:`markdown-line`,filePath:t,lineNumber:e,blockId:`line-${e}`},n),s(!1)}}):null,n.length>0?(0,q.jsx)(`div`,{className:nY.inlineThreadStack,children:(0,q.jsx)(wM,{threads:n})}):null]})}),iY={mermaidDiagram:`_mermaidDiagram_1g6lk_1`,mermaidLoading:`_mermaidLoading_1g6lk_2`,mermaidFallback:`_mermaidFallback_1g6lk_3`,mermaidError:`_mermaidError_1g6lk_29`},aY=`modulepreload`,oY=function(e){return`/`+e},sY={},cY=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=oY(t,n),t in sY)return;sY[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:aY,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function lY({chart:e}){let t=v.useId(),n=v.useMemo(()=>`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,``)}`,[t]),[r,i]=v.useState(``),[a,o]=v.useState(``);return v.useEffect(()=>{let t=!0;async function r(){try{let r=(await cY(async()=>{let{default:e}=await import(`./mermaid.core-DtosVHuJ.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))).default;r.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`default`});let a=await r.render(n,e);if(!t)return;i(a.svg),o(``)}catch(e){if(!t)return;i(``),o(e instanceof Error?e.message:`Mermaid 图表渲染失败`)}}return r(),()=>{t=!1}},[e,n]),a?(0,q.jsxs)(`div`,{className:iY.mermaidFallback,children:[(0,q.jsxs)(`div`,{className:iY.mermaidError,children:[`Mermaid 渲染失败:`,a]}),(0,q.jsx)(`pre`,{children:(0,q.jsx)(`code`,{children:e})})]}):r?(0,q.jsx)(`div`,{className:iY.mermaidDiagram,dangerouslySetInnerHTML:{__html:r}}):(0,q.jsx)(`div`,{className:iY.mermaidLoading,children:`正在渲染图表...`})}function uY(e){return e.anchor.type===`file`?0:e.anchor.type===`markdown-line`||e.anchor.type===`diff-line`&&e.anchor.side===`new`?e.anchor.lineNumber:2**53-1}function dY(e,t){return t.filter(t=>t.filePath===e&&t.status!==`resolved`).sort((e,t)=>uY(e)-uY(t)||e.createdAt.localeCompare(t.createdAt))[0]}function fY(e){e.scrollTop=0}function pY(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();e.scrollTop+=r.top-n.top}function mY(e,t){let n=[...e.querySelectorAll(`[data-review-line]`)];return n.filter(e=>Number(e.dataset.reviewLine)<=t).at(-1)??n.find(e=>Number(e.dataset.reviewLine)>=t)??null}function hY(e,t){let n=e.blocks.find(e=>t>=e.startLine&&t<=e.endLine);return n?n.startLine:e.blocks.find(e=>e.startLine>=t)?.startLine??e.blocks.at(-1)?.startLine??t}function gY(e,t){return t.anchor.type===`file`||t.anchor.type===`diff-line`&&t.anchor.side!==`new`?null:hY(e,t.anchor.lineNumber)}function _Y(e){return/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim())}function vY(e,t){return Gj(e,t)}function yY(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(yY).join(``):v.isValidElement(e)?yY(e.props.children):``}function bY(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).join(` `):typeof e==`string`?e:``}function xY(e){return v.isValidElement(e)&&!!(e.props.className||e.props.children)}function SY(e){let t=e?.position?.start?.line;return typeof t==`number`?t:void 0}function CY(e){let t=e?.children?.find(e=>e.tagName===`code`);return bY(t?.properties?.className)}function wY(e){return e?e.type===`text`?e.value??``:e.children?.map(wY).join(``)??``:``}function TY(e){let t=e?.children?.find(e=>e.tagName===`code`);return wY(t)}function EY(e,t){return t?e.split(/\r?\n/)[t-1]??``:``}function DY(e,t){return/^(?:\s*(?:[-*+]|\d+\.)\s+)#{1,6}(?:\s|$)/.test(EY(e,t))}function OY(...e){return e.filter(Boolean).join(` `)}function kY(e){if(e!==1)return e===2?tY.commentBlockSpacingLg:tY.commentBlockSpacingMd}var AY=/==(.+?)==/g;function jY(){return e=>{MY(e)}}function MY(e){e.children&&=e.children.flatMap(e=>e.type!==`text`||typeof e.value!=`string`?(MY(e),[e]):NY(e.value))}function NY(e){let t=[],n=0;for(let r of e.matchAll(AY)){let i=r.index??0;i>n&&t.push({type:`text`,value:e.slice(n,i)}),t.push({type:`html`,value:`<mark>`},{type:`text`,value:r[1]},{type:`html`,value:`</mark>`}),n=i+r[0].length}return n===0?[{type:`text`,value:e}]:(n<e.length&&t.push({type:`text`,value:e.slice(n)}),t)}var PY=[tK,eY,jY],FY=[mG,[NG,{...gG,tagNames:[...gG.tagNames??[],`mark`]}]];function IY({file:e,threads:t,locateTarget:n}){let[r,i]=v.useState(null),a=v.useRef(null),o=v.useRef(``);v.useEffect(()=>{i(null),Hj(e.path).then(e=>i(e)).catch(()=>i(null))},[e.path]),v.useEffect(()=>{let n=a.current;if(!n||!r||r.filePath!==e.path||o.current===e.path)return;o.current=e.path;let i=dY(e.path,t);window.requestAnimationFrame(()=>{let e=i?gY(r,i):null;if(!e){fY(n);return}let t=n.querySelector(`[data-review-line="${e}"]`)??mY(n,e);if(!t){fY(n);return}pY(n,t)})},[e.path,r,t]),v.useEffect(()=>{let t=a.current;if(!t||!r||!n||n.anchor.filePath!==e.path)return;if(n.anchor.type===`file`){fY(t);return}if(n.anchor.type===`diff-line`&&n.anchor.side!==`new`)return;let i=hY(r,n.anchor.lineNumber),o=t.querySelector(`[data-review-line="${i}"]`)??mY(t,i);o?pY(t,o):fY(t)},[e.path,n,r]);let s=v.useMemo(()=>{let n=new Map;for(let i of t){if(i.anchor.filePath!==e.path||!r)continue;let t=gY(r,i);if(!t)continue;let a=n.get(t)??[];a.push(i),n.set(t,a)}return n},[e.path,r,t]),c=v.useCallback((t,n,r)=>t?(0,q.jsx)(rY,{lineNumber:t,filePath:e.path,lineThreads:s.get(t)??[],className:r?.className,children:n}):n,[e.path,s]),l=v.useCallback((e,t,n,i,a)=>{let o=`h${e}`,s=v.createElement(o,{...n,className:OY(n.className,tY.markdownHeading),style:{...n.style,...a,marginTop:0}},i);return r&&DY(r.content,t)?s:c(t,s,{className:kY(e)})},[r,c]),u=v.useMemo(()=>({h1({children:e,node:t,...n}){return l(1,SY(t),n,e)},h2({children:e,node:t,style:n,...r}){return l(2,SY(t),{...r,style:n},e,{marginBottom:12})},h3({children:e,node:t,...n}){return l(3,SY(t),n,e)},h4({children:e,node:t,...n}){return l(4,SY(t),n,e)},h5({children:e,node:t,...n}){return l(5,SY(t),n,e)},h6({children:e,node:t,...n}){return l(6,SY(t),n,e)},p({children:e,node:t,...n}){return r&&/^(?:\s*>|\s*([-*+]|\d+\.)\s+)/.test(EY(r.content,SY(t)))?(0,q.jsx)(`p`,{...n,children:e}):c(SY(t),(0,q.jsx)(`p`,{...n,children:e}))},ul({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`ul`,{...n,children:e}))},ol({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`ol`,{...n,children:e}))},li({children:e,node:t,...n}){return(0,q.jsx)(`li`,{...n,children:e})},blockquote({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`blockquote`,{...n,className:OY(n.className,tY.markdownBlockquote),children:e}),{className:tY.commentBlockSpacingSm})},pre({children:e,node:t,...n}){let r=v.Children.toArray(e).find(xY),i=yY(r??e)||TY(t),a=r?.props.className??CY(t),o=/language-(\S+)/.exec(a)?.[1],s=i.replace(/\n$/,``),l=SY(t);return o===`mermaid`&&s.trim()?c(l,(0,q.jsx)(lY,{chart:s}),{className:tY.commentBlockSpacingMd}):c(l,(0,q.jsx)(`pre`,{className:tY.markdownPre,...n,children:e}))},code({className:e,children:t,node:n,...r}){return e?(0,q.jsx)(`code`,{className:e,...r,children:t}):(0,q.jsx)(`code`,{className:tY.markdownInlineCode,...r,children:t})},table({children:e,node:t,...n}){return c(SY(t),(0,q.jsx)(`div`,{className:tY.markdownTableScroll,children:(0,q.jsx)(`table`,{...n,children:e})}),{className:tY.commentBlockSpacingMd})},a({href:e,children:t,node:n,...r}){let i=e??``;if(!i||!_Y(i))return(0,q.jsx)(`span`,{children:t});let a=/^https?:/i.test(i);return(0,q.jsx)(`a`,{href:i,target:a?`_blank`:void 0,rel:a?`noreferrer`:void 0,...r,children:t})},img({src:t,alt:n,node:r,...i}){let a=t??``;return!a||!_Y(a)?null:(0,q.jsx)(`img`,{src:vY(e.path,a),alt:n??``,loading:`lazy`,...i})}}),[e.path,r,c,l]);return r?(0,q.jsxs)(`div`,{className:tY.markdownShell,ref:a,children:[r.deleted?(0,q.jsx)($c,{className:tY.deletedBanner,message:`该文件已删除,仅展示删除前预览`,type:`warning`,showIcon:!0}):null,(0,q.jsx)(`article`,{className:tY.markdownArticle,children:(0,q.jsx)(`div`,{className:tY.markdownBody,children:(0,q.jsx)(Yz,{remarkPlugins:PY,rehypePlugins:FY,urlTransform:e=>_Y(e)?e:``,components:u,children:r.content})})})]}):(0,q.jsx)(`div`,{className:tY.markdownLoading,children:(0,q.jsx)(VO,{})})}var LY={threads:`_threads_1i06v_1`,threadScopeBar:`_threadScopeBar_1i06v_5`,threadScopeLabel:`_threadScopeLabel_1i06v_15`,threadScopeSwitchRow:`_threadScopeSwitchRow_1i06v_22`,threadScopeSwitchRowDisabled:`_threadScopeSwitchRowDisabled_1i06v_32`,threadScopeOption:`_threadScopeOption_1i06v_35`,threadScopeOptionActive:`_threadScopeOptionActive_1i06v_57`,threadScopeSwitch:`_threadScopeSwitch_1i06v_22`,threadListToolbar:`_threadListToolbar_1i06v_69`,threadFilterWrap:`_threadFilterWrap_1i06v_78`,threadBatchButton:`_threadBatchButton_1i06v_89`,thread:`_thread_1i06v_1`,threadFocused:`_threadFocused_1i06v_133`,submit:`_submit_1i06v_138`,replied:`_replied_1i06v_142`,resolved:`_resolved_1i06v_146`,threadLocateFlash:`_threadLocateFlash_1i06v_150`,threadTopButton:`_threadTopButton_1i06v_156`,threadTop:`_threadTop_1i06v_156`,threadAnchor:`_threadAnchor_1i06v_178`,threadTag:`_threadTag_1i06v_185`,threadTagResolved:`_threadTagResolved_1i06v_194`,threadTagSubmit:`_threadTagSubmit_1i06v_199`,threadTagReplied:`_threadTagReplied_1i06v_204`,threadEmpty:`_threadEmpty_1i06v_209`},RY={submit:0,replied:1,resolved:2};function zY(e){return e===`submit`?LY.threadTagSubmit:e===`replied`?LY.threadTagReplied:LY.threadTagResolved}function BY(e){return e===`submit`?LY.submit:e===`replied`?LY.replied:LY.resolved}function VY({threads:e,currentFiles:t,currentFilePath:n,focusedThreadId:r}){let{deleteThread:i}=Bj(),{locateThread:a}=Vj(),[o,s]=v.useState(`all`),[c,l]=v.useState(`current-file`),[u,d]=v.useState(null),f=v.useRef({}),p=v.useMemo(()=>n?e.filter(e=>e.filePath===n).length:0,[n,e]),m=v.useMemo(()=>c===`all-diff`?e:n?e.filter(e=>e.filePath===n):[],[n,c,e]),h=v.useMemo(()=>m.map(e=>({key:e.id,thread:e})),[m]),g=v.useMemo(()=>h.filter(e=>{let t=gM(e.thread);return o===`resolved`?t===`resolved`:o===`pending`?t!==`resolved`:!0}).sort((e,t)=>{let n=gM(e.thread),r=gM(t.thread);return RY[n]-RY[r]}),[o,h]),_=v.useMemo(()=>({resolved:m.filter(e=>gM(e)===`resolved`),submit:m.filter(e=>gM(e)===`submit`)}),[m]),y=v.useCallback(async e=>{let t=[];e===`delete-resolved`&&(t=_.resolved),e===`delete-submit`&&(t=_.submit),e===`delete-all`&&(t=m);for(let e of t)await i(e.id)},[_.resolved,_.submit,i,m]),b=v.useCallback(e=>{let t=e===`delete-resolved`?_.resolved.length:e===`delete-submit`?_.submit.length:m.length,n=e===`delete-resolved`?`删除全部已解决评论(${t})?`:e===`delete-submit`?`删除全部 submit 评论(${t})?`:`清空全部评论(${t})?`,r=e===`delete-all`?`清空`:`删除`;pk.confirm({title:n,okText:r,cancelText:`取消`,okButtonProps:e===`delete-all`?{danger:!0}:void 0,onOk:async()=>y(e)})},[_.resolved.length,_.submit.length,y,m.length]);return v.useEffect(()=>{n||l(`all-diff`)},[n]),v.useEffect(()=>{if(!r)return;let e=g.find(e=>e.thread.id===r);e&&f.current[e.key]?.scrollIntoView({block:`start`,behavior:`smooth`})},[r,g]),v.useEffect(()=>{if(!r)return;d(r);let e=window.setTimeout(()=>{d(e=>e===r?null:e)},1400);return()=>window.clearTimeout(e)},[r]),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:LY.threadScopeBar,children:[(0,q.jsx)(QA.Text,{className:LY.threadScopeLabel,children:`查看范围`}),(0,q.jsxs)(`div`,{className:n?LY.threadScopeSwitchRow:`${LY.threadScopeSwitchRow} ${LY.threadScopeSwitchRowDisabled}`,children:[(0,q.jsxs)(`button`,{type:`button`,className:c===`current-file`?`${LY.threadScopeOption} ${LY.threadScopeOptionActive}`:LY.threadScopeOption,onClick:()=>l(`current-file`),disabled:!n,children:[`当前文件 (`,p,`)`]}),(0,q.jsx)(kk,{className:LY.threadScopeSwitch,checked:c===`all-diff`,onChange:e=>l(e?`all-diff`:`current-file`),disabled:!n,size:`small`}),(0,q.jsxs)(`button`,{type:`button`,className:c===`all-diff`?`${LY.threadScopeOption} ${LY.threadScopeOptionActive}`:LY.threadScopeOption,onClick:()=>l(`all-diff`),disabled:!n,children:[`全部评论 (`,e.length,`)`]})]})]}),(0,q.jsxs)(`div`,{className:LY.threadListToolbar,children:[(0,q.jsx)(`div`,{className:LY.threadFilterWrap,children:(0,q.jsx)(fE,{value:o,onChange:e=>s(e),options:[{label:`全部 (${h.length})`,value:`all`},{label:`未解决 (${h.filter(e=>gM(e.thread)!==`resolved`).length})`,value:`pending`},{label:`已解决 (${h.filter(e=>gM(e.thread)===`resolved`).length})`,value:`resolved`}],size:`small`})}),(0,q.jsx)(zE,{menu:{items:[{key:`delete-resolved`,label:`删除已解决(${_.resolved.length})`,disabled:_.resolved.length===0},{key:`delete-submit`,label:`删除待提交(${_.submit.length})`,disabled:_.submit.length===0},{type:`divider`},{key:`delete-all`,label:`清空全部(${m.length})`,danger:!0,disabled:m.length===0}],onClick:({key:e})=>{(e===`delete-resolved`||e===`delete-submit`||e===`delete-all`)&&b(e)}},trigger:[`click`],children:(0,q.jsxs)(XC,{size:`small`,className:LY.threadBatchButton,children:[`批量操作 `,(0,q.jsx)(Ab,{})]})})]}),g.length===0?(0,q.jsx)(cb,{className:LY.threadEmpty,description:`暂无评论,悬停到行右侧或添加文件级评论即可开始。`}):(0,q.jsx)(`div`,{className:LY.threads,children:g.map(e=>{let n=e.thread,i=gM(n),o=r===n.id,s=!t.some(e=>hM(n,e));return(0,q.jsxs)(WT,{className:[LY.thread,BY(i),o?LY.threadFocused:``,u===n.id?LY.threadLocateFlash:``].filter(Boolean).join(` `),ref:t=>{f.current[e.key]=t},children:[(0,q.jsx)(`button`,{type:`button`,className:LY.threadTopButton,onClick:()=>a(n.id),children:(0,q.jsxs)(LE,{className:LY.threadTop,align:`start`,size:8,children:[(0,q.jsx)(QA.Text,{className:LY.threadAnchor,strong:!0,children:$M(n)}),(0,q.jsxs)($E,{gap:`small`,children:[i===`replied`?null:(0,q.jsx)(Zk,{className:`${LY.threadTag} ${zY(i)}`,children:mM[i]}),s?(0,q.jsx)(Zk,{className:LY.threadTag,children:`历史快照`}):null]})]})}),(0,q.jsx)(`div`,{children:(0,q.jsx)(wM,{threads:[n],variant:`borderless`,showStatusTag:!1})})]},e.key)})})]})}function HY(e){return/\.(avif|bmp|gif|heic|heif|ico|jpe?g|png|svg|tiff?|webp)$/i.test(e)}function UY(e){return e?e.repoName||e.repoRoot.split(/[\\/]/).filter(Boolean).at(-1)||e.repoRoot:`正在加载仓库`}function WY(e,t){return e===t?!0:e.length===t.length?JSON.stringify(e)===JSON.stringify(t):!1}function GY(e,t){return e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r&&e.path===r.path&&e.snapshotHash===r.snapshotHash&&e.status===r.status&&e.additions===r.additions&&e.deletions===r.deletions}):!1}function KY(e){return[...e].sort((e,t)=>e.path.localeCompare(t.path))}function qY(){let{message:e}=$_.useApp(),[t,n]=v.useState(null),[r,i]=v.useState([]),[a,o]=v.useState([]),[s,c]=v.useState(``),[l,u]=v.useState(`split`),[d,f]=v.useState(`preview`),[p,m]=v.useState(null),[h,g]=v.useState(null),[_,y]=v.useState(null),[b,x]=v.useState({}),S=v.useRef(null),C=v.useRef(null),w=v.useMemo(()=>KY(r),[r]),T=r.find(e=>e.path===s)??w[0],E=v.useMemo(()=>a.filter(e=>r.some(t=>hM(e,t))),[r,a]),D=v.useMemo(()=>T?E.filter(e=>hM(e,T)):[],[E,T]),O=E.filter(e=>e.status!==`resolved`).length,k=v.useCallback(async(e=!1)=>{let t=await Ej(),r=KY(t.files),a=e||S.current!==t.session.id;S.current=t.session.id,n(n=>!e&&n&&n.id===t.session.id&&n.diffHash===t.session.diffHash&&n.createdAt===t.session.createdAt?n:t.session),i(e=>a||!GY(e,t.files)?t.files:e),c(e=>t.files.some(t=>t.path===e)?e:r[0]?.path??``),o(e=>WY(e,t.threads)?e:t.threads),C.current&&!t.threads.some(e=>e.id===C.current)&&(C.current=null,m(null))},[]);v.useEffect(()=>{k(!0)},[k]),v.useEffect(()=>{let e=()=>{document.visibilityState===`visible`&&k()},t=window.setInterval(e,2500);return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.clearInterval(t),window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[k]);function A(e){y(t=>({filePath:e,requestId:(t?.requestId??0)+1}))}function j(e,t){x(n=>(n[e]??!1)===t?n:{...n,[e]:t})}v.useEffect(()=>{C.current=null,m(null)},[s]),v.useEffect(()=>{if(h&&r.find(e=>e.path===h.anchor.filePath)?.isMarkdown){if(h.anchor.type===`markdown-line`){f(`preview`);return}h.anchor.type===`diff-line`&&h.anchor.side===`old`&&f(`diff`)}},[r,h]);let M=v.useCallback(()=>{e.success(`提示词已复制到剪贴板`)},[e]),N=v.useCallback(e=>{m(t=>{let n=typeof e==`function`?e(t):e;return C.current=n,n})},[]),P=Ij({refreshReviewState:k,onPromptCopied:M});return(0,q.jsx)(Rj,{value:P,children:(0,q.jsx)(zj,{value:Lj({files:r,threads:a,setSelectedPath:c,setLocateTarget:g,setFocusedThreadId:N}),children:(0,q.jsxs)(UD,{className:jM.shell,children:[(0,q.jsxs)(`aside`,{className:jM.sidebar,children:[(0,q.jsxs)(`div`,{className:jM.brand,children:[(0,q.jsx)(`div`,{className:jM.brandMark,children:`DR`}),(0,q.jsxs)(`div`,{className:jM.brandCopy,children:[(0,q.jsx)(QA.Text,{className:jM.repoName,title:t?.repoRoot,children:UY(t)}),(0,q.jsx)(QA.Text,{className:jM.productName,children:`Diff 审查台`}),(0,q.jsx)(QA.Text,{type:`secondary`,children:t?QM(t):`正在加载会话`})]})]}),(0,q.jsx)(WT,{className:jM.sideCard,children:(0,q.jsxs)(LE,{size:8,wrap:!0,children:[(0,q.jsx)(Zk,{color:`blue`,children:t?.mode.kind===`revision`?`混合模式`:`本地模式`}),(0,q.jsxs)(Zk,{color:`gold`,children:[r.length,` files`]})]})}),(0,q.jsx)(sN,{files:w,threads:E,selectedPath:T?.path??``,onSelectFile:c})]}),(0,q.jsx)(`section`,{className:jM.reviewPane,children:T?(0,q.jsxs)(q.Fragment,{children:[T.isMarkdown?(0,q.jsx)(`div`,{className:jM.topToolbar,children:(0,q.jsx)(fE,{className:jM.viewModeSwitcher,options:[{label:`Preview`,value:`preview`,icon:(0,q.jsx)(fD,{})},{label:`Code diff`,value:`diff`,icon:(0,q.jsx)(uj,{})}],value:d,onChange:e=>f(e)})}):(0,q.jsx)(`div`,{className:jM.topToolbar,children:(0,q.jsx)(fE,{className:jM.viewModeSwitcher,options:[{label:`Side by side`,value:`split`,icon:(0,q.jsx)(uj,{})},{label:`Inline`,value:`inline`,icon:(0,q.jsx)(fD,{})}],value:l,onChange:e=>u(e)})}),(0,q.jsxs)(`div`,{className:jM.reviewSurface,children:[(0,q.jsx)(lN,{file:T,threads:D,showToggleAllLines:!HY(T.path)&&(!T.isMarkdown||d===`diff`),hasExpandedContext:T?b[T.path]??!1:!1,onToggleAllLines:A}),T.isMarkdown&&d===`preview`?(0,q.jsx)(IY,{file:T,threads:D,locateTarget:h},`${t?.id??`session`}:${T.path}:${T.snapshotHash}:preview`):(0,q.jsx)(LM,{file:T,threads:D,locateTarget:h,expandAllRequest:_,onExpandedContextChange:j,viewMode:T.isMarkdown?`split`:l},`${t?.id??`session`}:${T.path}:${T.snapshotHash}:${T.isMarkdown?`split`:l}`)]})]}):(0,q.jsx)(WT,{className:jM.emptyStateCard,bordered:!1,children:(0,q.jsx)(QA.Text,{type:`secondary`,children:`未发现变更,当前工作区很安静。`})})}),(0,q.jsxs)(`aside`,{className:jM.threadRail,children:[(0,q.jsxs)(`div`,{className:jM.threadRailHeader,children:[(0,q.jsxs)(QA.Title,{className:jM.threadRailTitle,level:4,children:[`评论 (`,O,`)`]}),(0,q.jsx)(XC,{disabled:O===0,icon:(0,q.jsx)(EA,{}),type:`primary`,onClick:()=>void P.copyPrompt({type:`all-unresolved`}),children:`批量提交给 Agent`})]}),(0,q.jsx)(`div`,{className:jM.threadRailBody,children:(0,q.jsx)(VY,{threads:a,currentFiles:r,currentFilePath:T?.path??``,focusedThreadId:p})})]})]})})})}(0,gd.createRoot)(document.getElementById(`root`)).render((0,q.jsx)(v.StrictMode,{children:(0,q.jsx)(Iu,{theme:{token:{colorPrimary:`#2f6fed`,colorSuccess:`#2f8f63`,colorWarning:`#d59b2a`,colorTextBase:`#16181d`,colorBgBase:`#f4f6fa`,fontFamily:`"SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif`,borderRadius:14}},children:(0,q.jsx)($_,{children:(0,q.jsx)(qY,{})})})}));export{ar as a,vn as c,hn as d,o as f,fr as i,pn as l,pr as n,un as o,l as p,dr as r,_n as s,cY as t,yn as u};